Hello,
Is there a way or a module which would display in a small area the number of article in the cart and the Total ?
Thanks for your help
Hello,
Is there a way or a module which would display in a small area the number of article in the cart and the Total ?
Thanks for your help
shopping cart does that. use the simple template. And if that is not simple enough create a new one using simple as a starting point;
- Use the Contao templates module to copy iso_cart_simple.xxx (name may be off and choose the appropriate extension).[/*:m:nz7czvmg]
- Rename the new template to something else like iso_cart_minimal, but only change the name after the last underscore (_).[/*:m:nz7czvmg]
- Create a module, choose typoe shopping cart and select the new template.[/*:m:nz7czvmg]
- Add the module to a page or layout.[/*:m:nz7czvmg]
- Then strip away from the template what you don't need until desired result reached[/*:m:nz7czvmg]
Great it works fine !
Two more questions ...
- How could I remove the message when the cart is empty ?
- Is it possible to access $GLOBAL string within a module (to have the same module for several language)?
Thanks very much
I always remove that message using CSS, I think it is the mod_something template that controls that, or even the source code. Either way you may find it hard to remove, but easy to hide.
I don't know what you want to do, but you can access GLOBALS from any template or php file.
Good idea to remove with the CSS because removing it within the module affects other part...
here is what I wanted to do...
using the resource file to have the same module in several language
Code:<div class="cart_info"> <div class="productWrapper"> <div class="product"><span class="label"><?php echo (count($this->products) == 1) ? $GLOBALS['TL_LANG']['ISO']['productSingle'] : sprintf($GLOBALS['TL_LANG']['ISO']['productMultiple'], count($this->products)); ?></span> <div class="subtotal"><span class="label"><?php echo $this->subTotalLabel; ?></span> <?php echo $this->subTotalPrice; ?></div> </div> </div>
I assume you tried that, but doesn't that work? You would have to make sure those variables exist in the correct language file, otherwise Contao won't load the file. But other then that I wouldn't know why that wouldn't work.
Bookmarks