Problems, need help? Have a tip or advice? Post it here.
3 posts Page 1 of 1
Hello,

I need help with a simple trick. I want to be able to display in my cart page the number of items already added onto the shopping cart.

How can I do that?

Below is the code I was able to come up with, but it only output '1' as the count despite more than one entries made

Code: Select all

         <cms:set item_count='0' 'global' />

         <cms:repeat count='1' startcount='0' >
                           
               <tr>
                  <td >
                                                      <------  entries ------->
                                                </td>
                    </tr>
                              
      <cms:incr item_count />
                              
   </cms:repeat>

Hi,

I am sorry but I couldn't completely understand your question.
If you wish to list out all the items contained in the cart, you can use the <cms:pp_cart_items> .. </cms:pp_cart_items> loop.
If, however, you wish to only display the count of items in cart, you can use the <cms:pp_count_items /> tag.
Both are shown in the docs at http://docs.couchcms.com/concepts/shopp ... cart-items.

Please let me know on more detail if it is another use-case you are searching the solution for.
Thanks KK,

I have sorted it out using the same <cms:pp_count_items /> tag just after I posted this.

Thank you once again
3 posts Page 1 of 1

Who is online

In total there are 2 users online :: 0 registered, 0 hidden and 2 guests
(based on users active over the past 5 minutes)

Users browsing this forum: No registered users and 2 guests