LemonStand Forum: add column to related products grid - LemonStand Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

add column to related products grid

#1 User is offline   dardub 

  • Lemonholic
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • Group: Members
  • Posts: 491
  • Joined: 30-August 10

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!
0

#2 User is offline   Eric Muyser 

  • Web Developer
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • Group: Members
  • Posts: 1,317
  • Joined: 04-August 10
  • LocationVancouver, Canada

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).
0

#3 User is offline   dardub 

  • Lemonholic
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • Group: Members
  • Posts: 491
  • Joined: 30-August 10

Posted 30 September 2010 - 09:20 AM

Quote

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.
0

#4 User is offline   Eric Muyser 

  • Web Developer
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • Group: Members
  • Posts: 1,317
  • Joined: 04-August 10
  • LocationVancouver, Canada

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.
0

#5 User is offline   dardub 

  • Lemonholic
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • Group: Members
  • Posts: 491
  • Joined: 30-August 10

Posted 30 September 2010 - 10:52 AM

Quote

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!
0

#6 User is offline   Aleksey 

  • Co-Founder
  • Group: +Administrators
  • Posts: 4,066
  • Joined: 31-October 09

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

Share this topic:


Page 1 of 1

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users