Hi,
I want to show the cart even when it is empty.
I included the cart in a global element that is placed on all pages. Works fine.
The only problem i have is that the full content of cart.html is not displayed when cart is empty. I want instead a alternative cart that says: your cart is empty.
How can i make this happen?
Kind regards,
Niek Brinkman
Developer forum
E-mail notifications
Show cart if empty
Posted on 25/02/2010 14:26:00
Replies
Posted on 01/03/2010 09:44:51
Hi Niek
It is not possible to render a template if the cart is empty. The only option in the cart at the moment is to redirect to a specific page if the cart is empty.
- Lasse
It is not possible to render a template if the cart is empty. The only option in the cart at the moment is to redirect to a specific page if the cart is empty.
- Lasse
Posted on 01/03/2010 12:10:51
Hi Niek Brinkman
I had the same problem but managed to solve it like this:
- Use and If defined tag to check the globalparagraph or simply the module tag (where the shopping cart is inserted)
- with the if Not Defined, get the global page tags for the cart
The tags for the cart can be rendered in the page template, which gives you a lot of liberty. With XSLT you can manage this very easily.
Best Regards,
Nuno
I had the same problem but managed to solve it like this:
- Use and If defined tag to check the globalparagraph or simply the module tag (where the shopping cart is inserted)
- with the if Not Defined, get the global page tags for the cart
The tags for the cart can be rendered in the page template, which gives you a lot of liberty. With XSLT you can manage this very easily.
Best Regards,
Nuno
Posted on 01/03/2010 12:23:52
Hi Nuno,
Thanks, will try it.
Niek
Thanks, will try it.
Niek
Posted on 01/03/2010 12:50:56
Hi Nuno,
I tried the following but it will only show Empty. Do i reference the right tag?
<!--@If Defined(Global:Ecom.Cart)--> <!--@Global:Page.Content(2665)--> <!--@EndIf(Global:Ecom.Cart)--> <!--@If Not Defined(Global:Ecom.Cart)-->
<p>Empty</p>
<!--@EndIf(Global:Ecom.Cart)-->
Best, Niek
I tried the following but it will only show Empty. Do i reference the right tag?
<!--@If Defined(Global:Ecom.Cart)--> <!--@Global:Page.Content(2665)--> <!--@EndIf(Global:Ecom.Cart)--> <!--@If Not Defined(Global:Ecom.Cart)-->
<p>Empty</p>
<!--@EndIf(Global:Ecom.Cart)-->
Best, Niek
You must be logged in to post in the forum