Jump to content

Display atributes full text in cart


MilkSheikh

Recommended Posts

Hello all,

 

First of all I must say that I learn a lot of things through this forum and thanks to all contributors with more knowledge than people like me (I am absolutely not from a web devt background !) who help us a lot solving our daily issues.

 

I have done couple of research on the subjet and I am not yet able to find an answer to my issue.

 

In the cart, when products are added, the atributes are displayed only with their quantities and I would like the full text to appear.

 

For exemple, on a product page where clients can chose a kids and an adults rate, the cart would only summarize the product like that

 

1 x Waterpark tickets
3, 1
• 1x On 23/07/2015

$150

 

My question, is what do I need to do so as in the cart we can read the attribute full description like this:

 

1 x Waterpark tickets
Adults: 3 , Kid: 1
• 1x On 23/07/2015

$150

 

I assume the modification should be somewhere in themes/yourtheme/modules/blockcart/blockcart.tpl but I am not sure what is the line to change there and what to add.

 

Thanks

Edited by MilkSheikh (see edit history)
Link to comment
Share on other sites

In themes/YOUR-THEME/modules/blockcart/blockcart.tpl around line 70 you should find this line

<a href="{$link->getProductLink($product, $product.link_rewrite, $product.category, null, null, $product.id_shop, $product.id_product_attribute)|escape:'html':'UTF-8'}" title="{l s='Product detail' mod='blockcart'}">{$product.attributes_small}</a>
											

Try changing it to 

<a href="{$link->getProductLink($product, $product.link_rewrite, $product.category, null, null, $product.id_shop, $product.id_product_attribute)|escape:'html':'UTF-8'}" title="{l s='Product detail' mod='blockcart'}">{$product.attributes}</a>
											
  • Like 1
Link to comment
Share on other sites

Hello Mickeyboy1,

 

That worked !! Thanks so much, I ve been struggling with that for couple of days !

 

HOWEVER, this had 2 unwanted effects: 

 

- it only shows after refreshing the page, not when adding the product to the cart the first time

- it removes the line for the product customization in the cart (date selection for the activity, through a 3rd party module)

 

Any idea why did this happen?...

Link to comment
Share on other sites

I found the answer to one of my questions:

 

- it only shows after refreshing the page, not when adding the product to the cart the first time : 

 

For that I had to go to theme/modules/blockcart/blockcart-json.tpl  and replace

 "attributes": {$product.attributes_small|json_encode}

by

"attributes": {$product.attributes|json_encode}

However still curious about my other question

 

- it removes the line for the product customization in the cart (date selection for the activity, through a 3rd party module)

Edited by MilkSheikh (see edit history)
Link to comment
Share on other sites

  • 3 weeks later...

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...