Jump to content


Photo

add column to related products grid


This topic has been archived. This means that you cannot reply to this topic.
5 replies to this topic

#1 dardub

dardub

    Lemonholic

  • Members
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 491 posts

Posted 30 September 2010 - 08:15 AM

How can I add one of the columns I added to the shop_products table to display in the related products grid in addition to Name, SKU, and Price.

I tried digging around but couldn't find where the individual columns were defined. I just saw it defined and rendered as one related field in the shop_product model.

Thanks!

#2 Eric Muyser

Eric Muyser

    Web Developer

  • Members
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 1321 posts

Posted 30 September 2010 - 09:12 AM

If you add the column to the table using the standard method, you can simply access it as a member of the Shop_Product. So in the shop:related_products partial it uses the shop:product_list partial to list the products. You could extend shop:product_list to show the new information, and if you only want it to display for related products, then tell the shop:product_list (via passing it a key/value in the array 2nd argument). Alternatively you could manually output the product list inside shop:related_products instead of using shop:product_list, or create a new partial called shop:related_product_list and use that (just copy shop:product_list and use the new column).

#3 dardub

dardub

    Lemonholic

  • Members
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 491 posts

Posted 30 September 2010 - 09:20 AM

If you add the column to the table using the standard method, you can simply access it as a member of the Shop_Product. So in the shop:related_products partial it uses the shop:product_list partial to list the products.


Sorry I wasn't clear. I meant in the backend. I'd like to add to the related products tab for the product form.

#4 Eric Muyser

Eric Muyser

    Web Developer

  • Members
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 1321 posts

Posted 30 September 2010 - 10:38 AM

My mistake, I can see it's defined in /modules/shop/controllers/shop_products/_add_related_form.htm but that's not too helpful sorry.

#5 dardub

dardub

    Lemonholic

  • Members
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 491 posts

Posted 30 September 2010 - 10:52 AM

My mistake, I can see it's defined in /modules/shop/controllers/shop_products/_add_related_form.htm but that's not too helpful sorry.


That looks like it defines the pop-up when adding a related product. Anyways, thanks for trying, I appreciate it!

#6 Aleksey

Aleksey

    Co-Founder

  • +Administrators
  • 4168 posts

Posted 01 October 2010 - 03:36 PM

Hi, dardub!

At the moment there is no way to extend the related product list in the Administration Area. I added a corresponding task to our to-do list.

Thank you