Page 1 of 1

Display image in View cart (cmsms cart module)

Posted: Thu May 27, 2010 2:09 am
by aletsix
Hi cmsms lovers,

After a few days of playing around with the cart and products modules I think I've finally made it work, there is only just one piece missing though. Given that i have looked through almost every post about this topic without the right answer for this problem, I will leave it for any expert user who come across this post. The question is:

I  have managed to display the product image in the {products} summary thanks to an old post I've found, however I can't find the way to display the product image next to the summary list on the View cart {Cart action=viewcart} template. Does anyone have done this before?  ???

If I manage to fix this I would like to develop a detailed tutorial on how to use and customize these modules, this might save a few weeks of research to other cmsms users trying to implement a shopping cart in their websites.

Thanks a lot for your help on this

Re: Display image in View cart (cmsms cart module)

Posted: Thu May 27, 2010 3:23 am
by aletsix
Forgot to ask in my previous post, is it possible to hide the prices of the {products} module when the user is not logged in ? i know this is more of an advanced feature but I thought why not ask? it might not be that difficult.....thanks a lot for your help ;D

Re: Display image in View cart (cmsms cart module)

Posted: Tue Jun 15, 2010 8:36 am
by aletsix
aletsix wrote: Forgot to ask in my previous post, is it possible to hide the prices of the {products} module when the user is not logged in ? i know this is more of an advanced feature but I thought why not ask? it might not be that difficult.....thanks a lot for your help ;D
Found the answer for this: just edit the summary template from the product manager module and replace:

Price: {$currency_symbol}{$entry->price|number_format:2};

for:

{if $ccuser->loggedin()}
Price: {$currency_symbol}{$entry->price|number_format:2};
{else}
Sorry
{/if}

I still haven't find the way to display the image of the product in the summary page, ideas anyone ?

Re: Display image in View cart (cmsms cart module)

Posted: Sat Aug 14, 2010 7:44 am
by JornB
As CLJ83 wrote in this post
... all you need to do is create a custom detail template in the 'Products' module with the information you want to show in the cart which is not available through the cart array itself, in this case just a photo. Then within your 'Cart' template you add a call for the detail template you just created using $oneitem->product_id for your productid call, like this;

{Products action='details' productid=$oneitem->product_id detailtemplate='Your_Basket_Image'}

That's it really. You can use the same technique to get any information from your product which is not available in the cart array...