You are here:  » Sales / Clearanace/ Reduced Prices


Sales / Clearanace/ Reduced Prices

Submitted by affiliben on Wed, 2012-06-06 10:27 in

Hi David, Just a quick one hopefully.
I have a sales / clearance page on my sites which is popular
I use feeds where there is a RRP and Search Price. Now some merchants change their categories so it is easy to filter them, while others don't and just show the discounted price. To make matters worse, they only show the RRP when there is a discounted price available and their other RRPs are 0.
On the sale pages I show the RRP and Sale Price, but to compensate for the £0 showing I search replace with TBC. However a RRP price like £20 will then become £2TBC. So the first question is, how can I add a filter that removes the Zero 0 from my RRP field(varchar rather than number) without affecting a price like £20.
2 Is it possible that there is a php search replace filter that could compare the RRP / Search Price and where there is a difference over £5, and flag it up as a sale item in one of my extra fields?
Thanks for the support as always
Ben

Submitted by support on Wed, 2012-06-06 11:17

Hello Ben,

It's easiest to handle situations like this with a small mod to the import record handler function in includes/admin.php. In that file, look for the comment around line 358:

    /* create product record */

And then you can insert code required to handle the scenario immediately before this line; for example:

  $price = $importRecord["price"]; // already decimalised by previous code
  $rrp = tapestry_decimalise($importRecord["rrp"]);
  if ($rrp) // rrp not zero!
    {
    if (($rrp - $price) > 5.00)
    {
      $importRecord["sale"] = "SALE ITEM";
    }
  }

Above assumes rrp and sale added as additional fields as per the standard instructions. Don't forget to re-import all feeds for the changes to take effect.

Hope this helps!

Cheers,
David.
--
PriceTapestry.com

Submitted by affiliben on Wed, 2012-06-06 12:19

Thank you thats terrific.
Excellent service as always
Ben