BigCommerce Cart Count - cart

Wondering if there's a way to pull just the item quantity number in Big Commerce to be displayed elsewhere. I'm using a bootstrap badge image to show the cart count but can't figure out how to get the number only to populate.
This is how it appears now:
This is how I want it to look:
Code for cart/badge setup:
<li class="CartLink">
<span><i class="icon-large sprite-glyphicons_halflings_115_shopping-cart2x icon-2x" style="position: absolute; top: 16px; right: 485px;"></i><span class="badge badge-info" style="position: absolute; top: 20px; margin-left: -60px;">0</span></span>
</li>

No, that is how Bigcommerce outputs the number of items. However, you can just use javascript to hide the parts you don't want.

Use javascript to hide the parts you don't need.
To only show numbers and hide text using JS you can use this guide. How do I remove letters and dashes and dollar signs in a string using a regular expression?

Related

Remove Hyperlink in Outlook mail template

I want to remove the link like appearance in the below code.
For your information this template is being used in outlook
<span th:text="${SomeUrl}" th:remove="tag"
style="justify-content: normal;width: 100%; word-break: break-all;
text-decoration: none;pointer-events: none;cursor: default;">
</span>

Set kendo ui dropdownlist width

I would like to use a kendo drop-down list, which has a fixed size since is constrained by other fields in the page, but when it shows the drop-down items of the list, the drop-down area should resize to the maximum length of the items. Sort of fixed width for the item displayed, but auto width for the drop down list.
Something like
|my choice | <-- fixed width displayed on the page
|next choice |
|previous choice | <-- dropdown area to select another item
|dummy |
Is this possible through CSS or drop-down list properties set through jQuery?
You can set the width of a DropDown List both using a CSS or using a method.
If the id of you DropDownList is my-dropdown then you should write:
Using CSS
#my-dropdown-list {
width: auto !important;
}
NOTE: We have appended -list to the original id. The "!important" is important since you want to overwrite original width definition.
Using a method
$("#my-dropdown").data("kendoDropDownList").list.width("auto");
In addition to use "auto" for getting the width automatically adjusted to the text, you can use a fixed width:
#my-dropdown-list {
width: 300px !important;
}
or:
$("#my-dropdown").data("kendoDropDownList").list.width(300);
The above answer didn't work for me. I have a the advantage of knowing that my dropdown is inside of a div.
<div class="myDivClass">
<select id="myDropDown"><option>First</option><option>Second></option></select>
<!--... other stuff in the div-->
<div>
I found that the span has the class k-dropdown so I added the CSS
.myDivClass span.k-dropdown {
width: 300px
}
What worked for me is to render an extra class on the base element:
<input .. class="ExtraLarge ..
Which produced:
<span style="" class="k-widget k-dropdown k-header ExtraLarge" ..
With this ExtraLarge class in place, this worked great in FireFox and Chrome:
span.k-dropdown.ExtraLarge
{
width:400px;
}
Using the following code to be the template of the kendo dropdownlist:
<div class="myDivClass">
<select id="myDropDown"><option>First</option><option>Second></option></select>
<!--... other stuff in the div-->
<div>
you will initiate the kendoDropDownList using jQuery as follows:
$("#myDropDown").kendoDropDownList().data("kendoDropDownList");
Now, to set this controller to take up the full width, what you have to do, is to set the width of the select element to 100%, or whatever is your desire.
e.g.:
<select id="myDropDown" style="width: 100%"><option>First</option><option>Second></option></select>
OR, is a css file:
#myDropDown { width: 100% }
If the id of you DropDownList is my-dropdown then you should write:
#my-dropdown-list {
width: auto !important;
-moz-min-width: 120px;
-ms-min-width: 120px;
-o-min-width: 120px;
-webkit-min-width: 120px;
min-width: 120px;
/*max-width: 210px;*/
}
Read the explanation below.
http://docs.telerik.com/kendo-ui/controls/editors/dropdownlist/how-to/auto-adjust-the-width

Magento How do i add showcase etc label on products in a category

Hi guys...
know this will appear very novice like to some...but id like to know how i can add SHOWCASE or a stamp with any other name to a product in a category?
The thing is i want to add an image across the product image (preferably in the upper right corner), for a product that i can setup in the backend. The image across will have to be visible in the GRID display and also on the individual product page.
So i basically have TWO questions:-
Qs. Do i have to add a special attribute to the product in the backend for something of this kind to become possible? i guess, it may have to be something similar to NEW FROM this date to that date!!. Any guidance is highly appreciated...
and than Qs2. How do i actually call the across image in both the list.phtml and view.phtml??
I hope this makes sense!!
thanxs
You don't have to add a special attribute to the product, you could do it based on the 'Set Product as New from Date' and 'Set Product as New to Date'. You can do it with a boolean too though, just create an attribute with the Yes/No input type and add it to your default attribute set. Give it an attribute code of showcase.
In your template files (templates/catalog/product/list.phtml and templates/catalog/product/view/media.phtml if you want it on the product view page) you'd add in a piece of conditional code that added in an extra absolutely positioned element to the markup if the product was flagged as being a showcase product,
ie
<div class="product-image">
<?php if($_product->getShowcase()) { ?>
<div class="showcase"></div>
<?php } ?>
<?php
$_img = '<img id="image" src="'.$this->helper('catalog/image')->init($_product, 'image').'" alt="'.$this->htmlEscape($this->getImageLabel()).'" title="'.$this->htmlEscape($this->getImageLabel()).'" />';
echo $_helper->productAttribute($_product, $_img, 'image');
?>
</div>
and then you'd create css like the following to produce the wee icon in the top corner;
.products-grid .product-image {
position: relative;
display: block;
width: 244px;
height: 156px;
margin: 0 0 10px;
}
.showcase {
position: absolute;
right: 0;
top: 0;
width: 65px;
height: 66px;
display: block;
z-index: 2;
background: url(../images/showcase.png) no-repeat;
}
This is an example I did myself last week, so it uses my image sizes but you get the idea. Hope this helps.

CSS 'float' vs. 'inline-block' in an unordered list

i am struggling with the CSS of an unordered list which i want to use in order to provide links to a number of online profiles. the list is displayed in the footer of every page, like so (bottom right): http://www.alexbrunner.com.
my understanding is the following:
either, i make use of the CSS property 'display:inline-block;' - but given its relatively poor cross-browser support i would prefer not to.
or, i float the list and define the 'inline'-characteristic on the ul-level - here, however, is where my trouble begins.
if i float the li-elements left, it is obviously positioned on the wrong side of the text. if i float the li-elements right, obviously each item is floated to the right of the following item, which results in my list being displayed in the reverse order.
the html is:
<div id="footer-right">
<p>E-mail me at mail#alexbrunner.com<br />or visit my profiles at <ul id="profiles">
<li><img src="../images/icons/16/facebook_bw.png" class="profile" alt="Facebook" /></li>
<li><img src="../images/icons/16/googleplus_bw.png" class="profile" alt="Google plus" /></li>
<li><img src="../images/icons/16/xing_bw.png" class="profile" alt="Xing" /></li>
<li><img src="../images/icons/16/linkedin_bw.png" class="profile" alt="Linkedin" /></li>
</ul></p>
</div>
and the css is:
#footer-right { float:right; width:17em; border:0; border-top:1px dotted #333; text-align:right; margin:0; padding:1.25em 0; }
.profile { width:1em; height:1em; margin-left:0.3em; }
#footer-right p { display:inline; font-size:.75em; color:#666; }
#footer-right ul { display:inline; margin:0; padding:0; }
#profiles li { float:right; list-style:none; }
of course, i could just reverse the order in my html document and start with the last - but i really want to figure out what is the semantically correct way of doing this. i am sure there is a better way than what i have applied and i would really appreciate any comments on this.
eventually i want to put all those icons in a sprite - but i figure i have to solve this issue here first.
thank you!
best,
alex
Try this instead:
#profiles li { display: inline; list-style:none; }
http://jsfiddle.net/AcTu7/1/
This should display semantically and you don't have to bother with floats.
Not sure from reading if this is what you are looking for:
http://jsfiddle.net/RSMFw/
To maintain the desired display order, apply float: left; to ALL of the child elements of your div#footer-right, i.e: #footer-right * { float: left;}
Example: http://jsfiddle.net/wqneM/

How to get an image to show up over a joomla menu bar

I'm trying to get one div containing an image to show up over a joomla menu-bar... The one I want on top is at the bottom of the code called "wings.gif", but for some reason it won't show up over the user3 joomla bar, which I put in a Div. any ideas how to do this? thanks.
<div style="position:relative; z-index: 2;overflow: visible;"><jdoc:include >type="modules" name="user3" /></div>
<jdoc:include type="modules" name="banner1" style="artstyle" artstyle="art-nostyle" />
<?php echo artxPositions($document, array('top1', 'top2', 'top3'), 'art-block'); ?>
<div class="art-contentLayout">
<div class="art-<?php echo artxCountModules($document, 'right') ? 'content' : 'content->wide'; ?>">
<div style=" position:relative; "> < src="images/stories/image" width="898" height="126" style="position:relative; top: 0; left: 0;"/></div>
<div style=" position: absolute;top:-50px; left:647px; z-index: 1; overflow: visible; ">< src="images/stories/**IMAGE**" width="199" height="136" /></div>
as far as I can see from the code you posted, the absolute div you created is the child of one of the children of the "brother" of your user-3 div :D This means that it floats on top of the last relative positioned item in his parent. But it wont magically fly outside the scope of its parent towards your user-3 div.
Advice: Dont start putting things randomly on relative coz this will make your quest even harder, just make the absolute div a child of your user-3 div, or a "brother".
ps: why is brother quoted? I forgot the name of a same-level node and figured the name was suiting... :D

Resources