sebastians Posted August 1, 2013 Share Posted August 1, 2013 I read many postings about how to add products weight to the cart - however, I am not sure how to add a custom product feature (lets say height or weight) to a column in the shopping cart. Anyone solved this one yet? This is quite important as here in the EU, shop owners need to show important specs / features of the products to the customers in the shopping cart summary... Link to comment Share on other sites More sharing options...
vekia Posted August 2, 2013 Share Posted August 2, 2013 to the shopping-cart.tpl file located in your theme, just add this code: {assign var='features' value=Product::getFrontFeaturesStatic($cookie->id_lang, $product.id_product)} {if isset($features) && $features} {foreach from=$features item=feature} {if isset($feature.value)} {$feature.value|escape:'htmlall':'UTF-8'}: {$feature.name|escape:'htmlall':'UTF-8'} {/if} {/foreach} {/if} 2 Link to comment Share on other sites More sharing options...
sebastians Posted August 2, 2013 Author Share Posted August 2, 2013 Thanks, vekia! I integrated your suggestion into 1.5.4 and it works perfectly. Thanks for your help! Also, I tweaked it a bit: Put it in a div to unbold it when inserting it in the product description cell in the cart; changed the order of name and value of the features; but a line break, so that each feature is displayed on a separate line. <div class="normalfeaturesfont"> {assign var='features' value=Product::getFrontFeaturesStatic($cookie->id_lang, $product.id_product)} {if isset($features) && $features} {foreach from=$features item=feature} {if isset($feature.value)} {$feature.name|escape:'htmlall':'UTF-8'}: {$feature.value|escape:'htmlall':'UTF-8'} <br/> {/if} {/foreach} {/if} </div> Link to comment Share on other sites More sharing options...
vekia Posted August 2, 2013 Share Posted August 2, 2013 thanks for information and your tweak im going to mark this thread as solved best regards Link to comment Share on other sites More sharing options...
onno1000 Posted November 29, 2013 Share Posted November 29, 2013 Thanks, vekia! I integrated your suggestion into 1.5.4 and it works perfectly. Thanks for your help! Also, I tweaked it a bit: Put it in a div to unbold it when inserting it in the product description cell in the cart; changed the order of name and value of the features; but a line break, so that each feature is displayed on a separate line. <div class="normalfeaturesfont"> {assign var='features' value=Product::getFrontFeaturesStatic($cookie->id_lang, $product.id_product)} {if isset($features) && $features} {foreach from=$features item=feature} {if isset($feature.value)} {$feature.name|escape:'htmlall':'UTF-8'}: {$feature.value|escape:'htmlall':'UTF-8'} <br/> {/if} {/foreach} {/if} </div> hi there can you show me a picture of how this looks like now? Link to comment Share on other sites More sharing options...
vekia Posted December 1, 2013 Share Posted December 1, 2013 it will be much easier for you if you will be able to test it on your own believe me, it's always the best to test code, especially when you use non-default theme Link to comment Share on other sites More sharing options...
ALMAJ Posted January 21, 2014 Share Posted January 21, 2014 it will be much easier for you if you will be able to test it on your own believe me, it's always the best to test code, especially when you use non-default theme Hi Vekia, tanks but this code is not working on prestashop ver 1.5.6.2 Link to comment Share on other sites More sharing options...
vekia Posted January 21, 2014 Share Posted January 21, 2014 what you see instead of features? Link to comment Share on other sites More sharing options...
ALMAJ Posted January 21, 2014 Share Posted January 21, 2014 (edited) what you see instead of features? Tanks for the reply Vekia. in Prestashop 1.5.6.2 works only if I insert this code in the file "shopping-cart-product-line.tpl" not in the file "shopping-cart.tpl" But still this is not what I'm looking for, I'm looking for a better solution for displaying the Weight of the products at Shopping-cart summary, like in this topic: link Tanks again. Edited January 21, 2014 by majority (see edit history) Link to comment Share on other sites More sharing options...
formel Posted December 6, 2022 Share Posted December 6, 2022 Hello folks, For legal security reasons, I need to display product properties in the shopping cart. I have Prestashop 1.7.8.7 Does anyone have a solution for this so that the properties are displayed in the shopping cart at checkout? Thanks in advance Johann Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now