You are here:  » ONE merchant same description same buyurl but.....

Support Forum



ONE merchant same description same buyurl but.....

Submitted by italiano28 on Tue, 2010-04-27 12:47 in

I have several feeds that have the same name, buy url, and the same description, but the price is different and the place of departure as well ... so in a feed of 3000 products have been imported only 48 ...
1 - I need to import feeds with the same name in condition they have two different prices, without creating a new different name.
2-I need to add two fields feed in admin import section
3 - I need a product page and price comparison like these:

Example of product page:
Name: Flyght to U.S.
Description: Lowcost from italy
Price 100 eur from (buyurl)Expedia leaving from Naples (this is one of the two others feed fields)
Price 150 eur from (buyurl)Expedia leaving from Rome (this is one of the two others feed fields)

Example of price comparison:
Merchant: Expedia
Name: Flyght to U.S.
Notes: from Naples (this is one of the two others feed fields)
Price 100 eur
Buyurl: link to Expedia
-------------------------------------------------- -----------------------------------
Merchant: Expedia
Name: Flyght to U.S.
Notes: from Rome (this is one of the two others feed fields)
Price 150 eur
Buyurl: link to Expedia

PS- I have the latest Pt.

Thats all,hope you understand my bad english :) Thanks for help in advanced.

Submitted by support on Wed, 2010-04-28 08:10

Hi,

The first stage in doing this is to add the price field to the $dupe_hash value during import; which will ensure that multiple records of the same product but with a different price will be imported. Each different price version of the product should then appear on your product page as required. To do this, in includes/admin.php, look for the following code beginning at line 294:

    /* create dupe_hash value */
    $dupe_key = $merchant;
    $dupe_key .= $normalisedName;
    $dupe_hash = md5($dupe_key);

...and REPLACE that with:

    /* create dupe_hash value */
    $dupe_key = $merchant;
    $dupe_key .= $normalisedName;
    $dupe_key .= $importRecord["price"];
    $dupe_hash = md5($dupe_key);

Regarding the extra fields that you want to add (e.g. "notes"), this is very easy with the latest version of Price Tapestry - updated instructions are in the following thread:

http://www.pricetapestry.com/node/3094

Hope this helps!

Cheers,
David.

Submitted by italiano28 on Fri, 2010-04-30 13:26

Thank you,that work,but now how to include these 2 fields in the database tool backup ?
I try it and arent. Have a nice day.

Submitted by support on Fri, 2010-04-30 13:33

Hi,

In admin/database_tool.php you'll find the list of fields backed up from the `feeds` table on lines 20-33 as follows:

  // feeds
  $fields["feeds"][] = "filename";
  $fields["feeds"][] = "registered";
  $fields["feeds"][] = "format";
  $fields["feeds"][] = "merchant";
  $fields["feeds"][] = "field_name";
  $fields["feeds"][] = "field_description";
  $fields["feeds"][] = "field_image_url";
  $fields["feeds"][] = "field_buy_url";
  $fields["feeds"][] = "field_price";
  $fields["feeds"][] = "field_category";
  $fields["feeds"][] = "user_category";
  $fields["feeds"][] = "field_brand";
  $fields["feeds"][] = "user_brand";

So to add field_notes (for example), simply add it to the end of the array as follows:

  // feeds
  $fields["feeds"][] = "filename";
  $fields["feeds"][] = "registered";
  $fields["feeds"][] = "format";
  $fields["feeds"][] = "merchant";
  $fields["feeds"][] = "field_name";
  $fields["feeds"][] = "field_description";
  $fields["feeds"][] = "field_image_url";
  $fields["feeds"][] = "field_buy_url";
  $fields["feeds"][] = "field_price";
  $fields["feeds"][] = "field_category";
  $fields["feeds"][] = "user_category";
  $fields["feeds"][] = "field_brand";
  $fields["feeds"][] = "user_brand";
  $fields["feeds"][] = "field_notes";

Cheers,
David.