WebSite X5Help Center

 
Agron K.
Agron K.
User

Cart items update  en

Author: Agron K.
Visited 1553, Followers 2, Shared 17  

How did you put the dynamic number of items in the shopping cart in your T-store? You have it on the upper-right corner. Every time someone adds a new item in the shopping cart, that number updates. I want to add it in my website as well. Agron

Posted on the
5 ANSWERS - 1 CORRECT
Mark M.
Mark M.
User

Agron,

you insert a html code box on the header and insert the following:

<!-- E-Commerce.ShoppingCart: START -->
Items =
<span style="color: #555555; font-family: Trebuchet MS; font-size: 12pt; font-weight: normal; font-style: normal;" class="widget_quantity_total"></span>
<br> Price =
<span style="color: #555555; font-family: Trebuchet MS; font-size: 12pt; font-weight: normal; font-style: normal;" class="widget_amount_total"></span>
<!-- E-Commerce.ShoppingCart: END -->

This will give you the number of items and the total price of them in the shopping cart.

Mark.

Read more
Posted on the from Mark M.
Agron K.
Agron K.
User
Author

Mark, Thank you very much. This accomplishes the task.

However, the Tee X5 Store has a very nice looking cart items in the header. The HTML you included gives me "Items =2 Price =79.98$". The words "Items" amd "Price" are in Times New Roman font. How do I change that font?

The font for the dynamic items (2, and the price) are in Trebuchet font, which is my website's main font-so that's good. Also, how do I make it so that the word "Items" comes after the number of items, like in the Tee store I am refering to? Eg. "2  items" or "1 item".

Thanks again

Read more
Posted on the from Agron K.
Mark M.
Mark M.
User

I have just had a quick look at the tee store code and I think they have just put the number box over a background text, you can do the same by deleting the 'price =' and 'items =' from the script.

Or you could re-arrange the script

e.g.

<!-- E-Commerce.ShoppingCart: START -->
<span style="color: #555555; font-family: Trebuchet MS; font-size: 12pt; font-weight: normal; font-style: normal;" class="widget_quantity_total"></span>
<p style="font-family:verdana; font-size:110%">Items</p>
<br><p style="font-family:verdana; font-size:110%"> Price = </p>
<span style="color: #555555; font-family: Trebuchet MS; font-size: 12pt; font-weight: normal; font-style: normal;" class="widget_amount_total"></span>
<!-- E-Commerce.ShoppingCart: END -->

Mark

Read more
Posted on the from Mark M.
Mark M.
Mark M.
User

Or

<!-- E-Commerce.ShoppingCart: START -->
<span style="color: #555555; font-family: Trebuchet MS; font-size: 12pt; font-weight: normal; font-style: normal;" class="widget_quantity_total"></span>
<p style="font-family:Trebuchet MS; font-size:110%">Items</p>
<br><p style="font-family:Trebuchet MS; font-size:110%"> Price = </p>
<span style="color: #555555; font-family: Trebuchet MS; font-size: 12pt; font-weight: normal; font-style: normal;" class="widget_amount_total"></span>
<!-- E-Commerce.ShoppingCart: END -->

To give you all Trebuchet font.

Mark.

Read more
Posted on the from Mark M.
Agron K.
Agron K.
User
Author

Thanks Mark,

Here is what is put:

<!-- E-Commerce.ShoppingCart: START -->

<span style=
    "font-family: Trebuchet MS;
    font-size: 12px;
    font-variant: small-caps;
    text-transform: capitalize;
    color: #903;" Items =

</style>

Items =
<span style="color: #C09; font-family: Trebuchet MS; font-size: 10pt; font-weight: normal; font-style: normal;" class="widget_quantity_total"></span>
<br>Price =
<span style="color: #C09; font-family: Trebuchet MS; font-size: 10pt; font-weight: normal; font-style: normal;" class="widget_amount_total"></span>
<!-- E-Commerce.ShoppingCart: END -->

Read more
Posted on the from Agron K.