You are here:  » multable feeds for same product

Support Forum



multable feeds for same product

Submitted by shaunmac on Thu, 2013-02-21 14:33 in

Had a quick question. I have multiple feeds for many on my products. My question is if I have a widget for sale and there are 3 merchants selling it, each merchant has there own description for each, witch merchant description will it show? I am having an issue now with one feed overriding all my data and messing it up. Just trying to find a way to add the new feed without messing up the rest.
As Always Thanks

Submitted by support on Thu, 2013-02-21 14:50

Hi Shaun,

For search results, the merchant from which the description is selected is undefined, since the results are generated using a summary query. On Product Pages, the description displayed is that of the cheapest merchant.

If you want the product page to display the longest description, in pto_product.php, look for the following code at line 284:

    $product = $wpdb->last_result[0];

...and REPLACE with:

    $product = $wpdb->last_result[0];
    foreach($wpdb->last_result as $last_result)
    {
      if (strlen($last_result->description) > strlen($product->description))
      {
        $product->description = $last_result->description;
      }
    }

If you need a similar mod applies to search results, this can be done but requires a re-query - let me know if required...

Hope this helps!

Cheers,
David.
--
PriceTapestry.com

Submitted by shaunmac on Thu, 2013-02-21 15:09

Thank you this makes sense. It was only displaying products descriptions that did not have a price, hence it being the cheapest. Tried your fix and all is well now thank you