Problems, need help? Have a tip or advice? Post it here.
3 posts Page 1 of 1
Hello dear admins, I've just discovered Couch and try to make the Shopping Cart.

The products in page-view have many images using
Code: Select all
<cms:repeatable>
in list-view the thumbnail of the first image is automatically created through
Code: Select all
<cms:show_repeatable 'my_multiple_images' startcount='1' ><cms:if k_count='1' >
<img src="<cms:thumbnail my_image width='143' enforce_max='1' />" /></cms:if></cms:show_repeatable>

But the Cart seems to be not working with Repeatable region (even if it's name "pp_my_multiple_images").
I've found only one classical solution - using
Code: Select all
<cms:editable name='pp_product_thumb'>
It works great, but the admin should fill it in back-end.

Is there a clearer way to make the Thumbnail in the Cart, automatically?

Thanks in advance, Couch is a really great system!
Hi,

The cms:pp_cart_items tags, of other variables, also sets a variable named 'id' that shows the page_id of the actual cloned page representing the product.

We can use this 'id' with cms:pages tag to get the full data of that page - including the repeatable regions.

Supposing the name of the repeatable region is 'my_multiple_images' and it is defined in 'products.php' template - the following code placed with the cms:pp_cart_items loop on the cart page will get you the thumbnail -
Code: Select all
<cms:pp_cart_items>    
    ..
    ..
    <cms:pages masterpage='products.php' id=id count='1'>                                               
        <cms:show_repeatable 'my_multiple_images' startcount='1' >
            <cms:if k_count='1' >
                <img src="<cms:thumbnail my_image width='143' enforce_max='1' />" />
            </cms:if>
        </cms:show_repeatable>
    </cms:pages>
    ..
    ..   
</cms:pp_cart_items>

Hope this helps. Do let us know.
Thanks.
Thanks, KK!
The approach of using cms:pages with id=page_id is great and will help me to do what I need (I've tested it with a lot of options and it works perfect).
I'll certainly buy a commercial lisence as soon as finish the first template - really great product.
3 posts Page 1 of 1