The Foxy forums are on the move!

We're in the process of moving our forums over to a new system, and so these forums are now read-only.
If you have a question about your store in the meantime, please don't hesitate to reach out to us via email.

Editing Related Products section

christinechristine Member
in Bugs & Feature Requests edited February 2013
Hey there,

Two things: (1)editing the related products output on the page and (2)adding custom field to related product selection section in WP admin on individual products.

First part: I'd like to add the quantity box and add to cart button next to the price when related products are output on the single product template. Should I edit directly the helperfunctions.php or copy the function into my theme functions? In addition, I'd like to add a brief excerpt to each related product (more detail in next part of my question).

Second part: The client would like to add a brief excerpt to a related product that is specific to the product it is being related to. For example: say I'm editing Product A. I scroll down to related products custom section and choose Product B from the list. I'd like to add a custom field to include an excerpt for Product B that only displays on the Product A detail page. If Product B is also related to Product C, the excerpt that displays on the Product C detail page for Product B will be a different excerpt than the one on the Product A detail page. Does this make sense and is there a way to make this happen?

Thanks for your help,
Christine
Comments
  • sparkwebsparkweb Member, Integration Developer, FoxyShop, Order Desk
    Hi Christine,

    First off, these are both FoxyShop issues (they are completely within WordPress) so you can write to me directly for support on this stuff at http://www.foxy-shop.com/.

    To answer your question, though: you definitely don't want to edit anything in helperfunctions.php or it will be quite difficult to upgrade. Just copy that function, name it my_related_products() or something like that and put it in your functions.php file.

    To do the complicated display stuff, it will just take some custom fields. Maybe use product codes and call the excerpt something like related_excerpt_productacode. Then do a get_post_meta($product, "related_excerpt_" . $original_product, 1); - then if it's not there, it wouldn't display.

    Make sense?
Sign In or Register to comment.