Jump to content

  • You cannot start a new topic
  • You cannot reply to this topic

Get The Box_Length Attribute Value In Category Page Rate Topic   - - - - -

 
  • lparodi
  • Member
  • Trial users
  • Join Date: 08-Dec 14
  • 46 posts

Posted 12 February 2016 - 10:20 AM #1

Hello,

I'm customizing a website the sells wallpapers and other goods, and I need to add the feature to buy a wallpaper sample.

I have solved the problem by adding one hidden product for each wallpaper to use it as a sample, and by using the box length field (not in use for shipping pourpose) to put in it the sample product_id.

This way I have the relation berween the wallpaper and its sample.

I'm able to show a "buy a sample" button in the product detail page with a little customization on the tpl file and using the $product.box_length attribute.

Now I have to do the same in the category page (where all the wallpapers are listed), but the "box_length" attribute seems to be empty.

 

<div class="ty-column{$columns}">
                        {if $product}
                            {assign var="obj_id" value=$product.product_id}
                            {assign var="obj_id_sample" value=$product.box_length} <--- this is empty

 

For example this is a wallpaper detail page where the $product.box_length is populated correctly

http://www.santorus....arch-coriander/

 

On the category page I still have to add the "order a sample" button

http://www.santorus....shop/wallpaper/

 

 

Any idea regarding this issue ?