Support forum login

©2006-2010 IAAI Software

Contact Us

Modified admin.php

Submitted by Mik3 on Sun, 2010-02-07 21:40.

On the old version of PriceTapestry I used a modified admin.php to help import brands where they wern't available from the merchant. The code is below, would you be able to assist with setting this up with the new version of admin.php please?

{code saved}

Submitted by dmorison on Mon, 2010-02-08 09:40.

Hi Mik,

In the latest version, look for the following code on line 179 of includes/admin.php:

      $importRecord["brand"] = "";

...and REPLACE that with the following modified version of your dynamic brand code:

      // strtolower the product name so that comparison is case insensitive
      $pn = strtolower($importRecord["name"]);
      // create an array of keywords => brand
      $kw = array();
      $kw["brand"] = "brand";
      foreach($kw as $k => $v)
      {
        if (strpos($pn,$k)!==FALSE) { $importRecord["brand"] = $v; break; }
      }

Cheers,
David.
--
Developer, Price Tapestry
General PHP, MySQL and Affiliate Marketing tech help for Price Tapestry customers at davidmorison.com