Display image in View cart (cmsms cart module)

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Post Reply
aletsix
New Member
New Member
Posts: 9
Joined: Tue Jan 19, 2010 8:01 pm

Display image in View cart (cmsms cart module)

Post 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
Last edited by aletsix on Thu May 27, 2010 3:20 am, edited 1 time in total.
aletsix
New Member
New Member
Posts: 9
Joined: Tue Jan 19, 2010 8:01 pm

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

Post 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
aletsix
New Member
New Member
Posts: 9
Joined: Tue Jan 19, 2010 8:01 pm

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

Post 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 ?
JornB
Forum Members
Forum Members
Posts: 18
Joined: Wed Apr 15, 2009 10:53 am

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

Post 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...
Post Reply

Return to “CMSMS Core”