You are here:  » Voucher Codes functionality beta preview


Voucher Codes functionality beta preview

Submitted by support on Tue, 2010-10-05 13:06 in

Note: Voucher codes functionality now released - more info

Hi everyone,

I'm nearing completion of a great new upgrade to Price Tapestry, featuring several "under the hood" functionality and performance improvements, and also to include support for voucher codes - and I'd appreciate any comments you may have regarding how this is implemented.

Voucher Codes administration can be viewed here:

http://www.webpricecheck.co.uk/admin/voucher_codes.php
(username: "demo" password: "demo")

...with the voucher code being applied on the following product page:

http://www.webpricecheck.co.uk/product/Panasonic-TX-P42V20.html

At the moment, I am considering 3 levels of voucher code integration, which would be a configuration setting. Level 1 would not incorporate voucher discounts into any prices displayed, but simply show voucher details alongside any qualifying products.

Level 2 would apply discounts to prices shown on the product page and price comparison table, with the discounted price being taken into account in determining the chepaest merchant. This is the level currently running on the beta installation.

Finally, Level 3 would calculate discounts at import time; so prices displayed throughout the site (Featured Products, search results etc.) would reflect the discounted prices.

I look forward to any comments!

Thanks,
David
--
PriceTapestry.com

Submitted by Mik3 on Tue, 2010-10-05 16:36

This voucher code bit is awesome, I think we've all been wishing this for years!! Fantasic addition!! :-D

Mike

Submitted by cascadeclimbers on Tue, 2010-10-05 23:00

David,

Great news about the vouchers!

Sorry if this has been posted elsewhere, but in this new version are there going to be any changes to categorization? As you might be aware we are running multiple installations to allow subcategories, and while it works and we are making money, I'm longing for a better solution that is a little easier to maintain. One of the big problems is I have the same product showing up in different categories, and obviously those don't map together in the product view. Being able to make categories in PT, then map subcategories from feeds to those categories, have all that show up in category pages, URLs, in a breadcrumb, would be a huge improvement. While I totally understand your thinking on the subcategory issue and completely agree with you, I think a better solution could be found.

Cheers, Jon
$> cd /pub
$> more beer

Submitted by support on Wed, 2010-10-06 07:33

Thanks for the comments, Jon.

Bear in mind that a possible beneficial side-effect of the multiple-installation solution is having products show up in more than one category; which would restrict them from being found if all products were tied to a single category; but I accept that it's not an ideal solution - I just wish there were better and more consistent category data available within affiliate product feeds!

I should have more time once this release is published, and will look at a sub-category patch for you that would enable a hierarchy for use if sufficient and quality data is available...

Cheers,
David.
--
PriceTapestry.com

Submitted by redspark on Wed, 2010-10-06 12:05

Hi David,

The functionality is great. I have some input. When i look at vouchercode sites and what kind of offerings they have and how we could benefit from those offerings it could be, besides the vouchercodes, the discount(periods) and free articles/delivery. So my thoughts are:

1. It would be great to have an overview page with all voucher codes available and maybe a featured voucher code widget for the homepage
2. As i see it correctly you can address the voucher to the merchants article or minimum spend. Is it also possible to have it on a product category?
3. Could it also be used to address discount periods. For example when a merchant has a 10% discount during the weekend on all articles and free articles offerings

Thx,
B.

Submitted by support on Wed, 2010-10-06 12:24

Thanks, B!

I can include "Free Shipping" as a discount type (they would need to be a special case displayed as per integration level 1 even if level 2 or 3 were being used for money or percentage discounts), and yes I shall be including a Voucher Codes page (probably unlinked within the template but there to be used if required) containing not just the codes but also a search link to all qualifying products!

Cheers,
David.
--
PriceTapestry.com

Submitted by Keeop on Wed, 2010-10-06 14:08

Hi David,

I have looked at implementing a system like this for some time as I did create a basic mod for just displaying voucher code information on a per merchant basis. So what I concluded would be useful, in addition to what you've stated, is listed below. I have also tinkered with option 3 above, where the prices are altered on import. The only caveat with this approach is that the import routine needs to be run pretty much every day. That, or some code to check expiry dates is incorporated on the product page which just blats any out of date offers from the database.

So,.....

-> will it work with no merchant selected so that it relies purely on product name?
-> apply code per category
-> apply code per brand
-> apply code per keywords - this would help cover groups of products and categories
-> apply code per construct, i.e. brand + keywords + category etc.
-> set a range rather than min spend to avoid overlaps, i.e. spend £50, save £5, spend £100, save £10 - I think this would fail as it stands above? So, param field = '0-50', '51-100' etc.

On another note, how easy is it going to be to implement the 'under-the-hood' changes for all us old PT'ers?

Cheers.
Keeop

Submitted by support on Wed, 2010-10-06 14:18

Thanks Keeop,

Regarding ranges, it is already coded to use the best voucher code available where more than one are valid; so the "spend £50 save £5" and "spend £100 save £10" can be included as separate vouchers (with minimum spend £5 and £10 respectively), and the best discount will be the one that is applied.

I'm aware that existing users will be keen to incorporate voucher code support so I'm developing it with that in mind, such that it can be incorporated easily with minimal changes to existing files.

You're spot-on about incorporating discounts at import time being dependant upon a frequent refresh cycle, which is exactly why I'm implementing the separate levels of integration - with level 3 only being advised on a site with feeds that are updated daily...

Cheers,
David.
--
PriceTapestry.com

Submitted by serviendo on Wed, 2010-10-06 20:49

It looks great David, and will be a welcome new addition to the software.

I've just got a couple of comments that others may like to feedback on...

1. Although I cannot see from the IAB guidelines that the expiry has to be displayed with the code (unless someone can correct me), I wonder if it ought to be shown?
2. Some voucher codes apply to almost everything in a merchants range, but oten exclude certain specific ranges - for example a recent Comet code gave 5% of £500, but excluded iPads. I wonder if there could be additional box where comments could be added for certain codes?
3. Perhaps the original (non voucher) price could be shown as well or the option to do so?

One option to solve each of the above comments could be to have an html rollover on the code text, or something similar?

Great so far though, can't wait to start using it!

Submitted by bingobongo on Wed, 2010-10-06 20:55

Hi David,

First of all - and I've said it to you by email a few times - you're an absolute legend. The support you provide is fantastic, and the product is excellent even without the support you provide.

I'm really looking forward to the Wordpress plugin, and the voucher codes element will do extremely well.

Few thoughts / suggestions.

1. Would it be possible to have some form of icodes (www.icodes.co.uk) feed integration? I'm sure Magic Parser could handle this fine, and even a way of manually setting up various icodes feeds (based on icodes generated url), with manual mapping to merchant names / voucher code feeds be useful.

2. It would be cool to have a list of codes shown on merchant pages too, or a codes page per merchant (opens heaps of possibilities for other types of sites created with PT).

Once again, thanks for such a great product! Really looking forward to the new updates.

Thanks,

Hugh

Submitted by Leo on Fri, 2010-10-08 08:35

I have look a view days back to the site. It looks very good the Voucher Codes.
For the rest this script is so fine to work with, specialy with all the filters if you compare it with other scripts.
I am almost finisch of 3 new sites. Is this new version difficult later easy to upgrade from the latest one?
I have not change very much to the latest version with mods and so.

Leo

Submitted by support on Fri, 2010-10-08 08:40

Hi Leo,

You will be able to use the Database Tool (Admin menu) to Backup an existing site in order to upgrade easily. If you're not sure about migrating any customisations you have made just let me know once the new distribution is released and I'll help you out...

Cheers,
David.
--
PriceTapestry.com

Submitted by transparencia on Fri, 2010-10-15 14:04

Hi David!

What is the estimated date of release for this distribution?

Submitted by don_load on Fri, 2010-10-15 15:58

excellent, thats one massive task to take off my ever expanding todo list! Been looking to integrate vouchers in for a while now.

regards,
Jay

Submitted by support on Fri, 2010-10-15 20:15

Hi all,

I'm looking to finalise the new distribution within the next couple of weeks - voucher code functionality has moved on so I'll aim to put another beta preview out there before release...

Cheers,
David.
--
PriceTapestry.com

Submitted by don_load on Sat, 2010-10-16 16:18

Some voucher codes are specific for a certain product range. Will there be any way of restricting the vouchers to certain category's or keywords in the product field?

regards,
Jay

Submitted by support on Mon, 2010-10-18 08:31

Hi Jay,

Sure - i'll look at that - perhaps extending the Product Name field on the voucher configuration page to be a keywords field matching across name/category/brand etc...

Cheers,
David.
--
PriceTapestry.com

Submitted by transparencia on Wed, 2010-10-20 17:00

I should have more time once this release is published, and will look at a sub-category patch for you that would enable a hierarchy for use if sufficient and quality data is available...

Could I also have this patch? This would make the PT script a perfect program. But it would have to be something flexible, that would allow for example a feed with the following category Electronics -> Nintendo Wii -> Games, to be imported to Games -> Nintendo Wii. Meaning it would have to allow the creation, delete, and edition of multi-categories.

I'm actually just waiting for this to make my launch.

Thank you for your hard work, David!! I will anxiously await for this patch. :)

Regards,
Pedro

Submitted by support on Fri, 2010-11-05 10:57

Hi all,

Gearing up for a Monday "beta" release of the new distribution - would appreciate any late feedback on the current implementation as can be seen via the demo links in the first post on this page.

Specifically, an additional discount type "Other" can be used for free shipping, free gifts etc., and validity can now be either an exact or keyword match against Product Name, Category or Brand.

In particular, I'm wondering about whether or not additional information should be displayed, or whether simply "use voucher code" is sufficient. I think it would be for money or percent discounts, but I thinking more about "Other" codes. I'm concious of overloading the product page too much information.

There are 2 levels of integration - $config_useVoucherCodes = 0 (off), 1 (applied on product page view only), 2 (applied at import time). Level 2 would mean that search results will show discount applied prices, so should only be used when feeds are updated and imported frequently to ensure that out of date voucher codes aren't incorporated.

Also of interest to note - I have added a new field to the products table to store the original merchant product name for use in the price comparison table, which should add more keyword variety to the product page when Product Mapping has been used!

Cheers,
David.
--
PriceTapestry.com

Submitted by marco@flapper on Fri, 2010-11-05 13:11

Like the options. With regard to shipping it would be great to have a separate field for it.

I notice that there are some merchants that always have free shipping and others that charge for it. It would be great to have a price comparison on prices with shipping included.

The Other discount type can be used for special offers like free gifts.

Submitted by support on Fri, 2010-11-05 14:00

Hi Marco,

Yes - I've added a description field (will actually be displayed for any discount type but designed to be used with "Other", e.g. "Free Shipping". Text displayed in brackets after the voucher code.

Cheers,
David.
--
PriceTapestry.com

Submitted by cascadeclimbers on Fri, 2010-11-05 16:02

Really looking forward to this David! You da man!

$> cd /pub
$> more beer

Submitted by philstone on Mon, 2010-11-22 11:54

hi david

was wondering is there anyway of allowing multiple installs share vouchers from the database in the main install?
meaning you only need to input feeds once?

regards

Phil Stone
www.buy24-7.net

Submitted by philstone on Mon, 2010-11-22 12:41

on second thoughts not sure how this could work as some installs will have different merchants??

would there be a way of making it a central database of vouchers?

regards

Phil Stone
www.buy24-7.net

Submitted by support on Mon, 2010-11-22 12:41

Hi Phil,

Where installation are sharing a feeds directory they still operate out of an individual database but you will notice that Voucher Codes have been added to the Database Tool (/admin/ menu) so you can backup from your master installation and restore to any slave installations as required...

Cheers,
David.
--
PriceTapestry.com

Submitted by crounauer on Mon, 2010-11-22 17:31

Hi David,

I am updating my original site with this update. During the upgrade I have turned on all error reporting and can't seem to figure out how to solve this error message which appears on the second step of the feed import => http://test.pricescompare.co.uk/appliances/laundry-cleaning/admin/feeds_register_step2.php?filename=HOMEAPPL_COOKING_AW_appliancesdirect.csv&useFormat=formatDetected&formatDetected=csv|124|1|0&formatSelected=

This is the error message

An error occurred in script '/mnt/stor3-wc2-dfw1/474955/test.pricescompare.co.uk/web/content/appliances/laundry-cleaning/admin/feeds_register_step2.php' on line 133: Undefined index: merchant Array ( [title] => [name] => merchant [prefixHTML] => [productRecordFields] => Array ( [] => Select.. [aw_product_id] => aw_product_id [merchant_id] => merchant_id [merchant_name] => merchant_name [product_name] => product_name [description] => description [category_name] => category_name [aw_deep_link] => aw_deep_link [aw_image_url] => aw_image_url [search_price] => search_price [delivery_cost] => delivery_cost [mpn] => mpn [isbn] => isbn [ean] => ean [delivery_time] => delivery_time [condition] => condition [brand_name] => brand_name [model_number] => model_number [promotional_text] => promotional_text [specifications] => specifications [stock_quantity] => stock_quantity [upc] => upc [warranty] => warranty ) [config_commonFields] => Array ( [name] => Array ( [0] => PRODUCTNAME [1] => productname [2] => PRODUCT_NAME [3] => product_name [4] => NAME [5] => name [6] => productTitle ) [description] => Array ( [0] => DESCRIPTION [1] => description [2] => shortdescription ) [image_url] => Array ( [0] => IMAGEURL [1] => imageurl [2] => IMAGE_URL [3] => image_url ) [buy_url] => Array ( [0] => DEEPLINK [1] => deeplink [2] => DEEP_LINK [3] => deep_link [4] => PRODUCTURL [5] => producturl ) [price] => Array ( [0] => PRICE [1] => price [2] => search_price ) [category] => Array ( [0] => MASTERCATEGORY [1] => CATEGORY [2] => category [3] => category_name ) [brand] => Array ( [0] => BRAND [1] => brand [2] => brand_name ) ) [default] => )

I know the error message usually appears when a variable has not been properly set and the way to solve it is to use "isset" with "$_POST['action']".

I remain stumped!!!

Thanks,
Simon

Compare Prices

Submitted by philstone on Tue, 2010-11-23 08:54

hi david

from time to time the voucher codes by a few merchants are extended, would it be possible to make the codes editable?
also when i import voucher codes using ackup, does that wipe voucher codes already there?

regards

Phil Stone
www.buy24-7.net

Submitted by support on Tue, 2010-11-23 09:52

Hi Phil,

Thanks for the comments i'll add it to the beta feedback.

Cheers,
David.
--
PriceTapestry.com

Submitted by marco@flapper on Wed, 2010-11-24 16:03

Some feedback on the voucher functionality:
a. an edit function for the voucher codes would be great.
b. layout/text. Would be nice to highlight the voucher code with something like:

€ 100

€ 90 with voucher code GET10DISCOUNT

c. (more a question) where can I configure the (3) levels of voucher code integration? Or is it in the beta only 1 option?

Submitted by support on Wed, 2010-11-24 16:09

Hi Marco,

Thanks for your comments.

The implementation only has 2 levels (or off). $config_useVoucherCodes = 1 for discounts applied on the product page only, or level 2 for discounts applied at import time (equivalent to level 3 as described above...!)

Cheers,
David.
--
PriceTapestry.com

Submitted by crounauer on Thu, 2010-11-25 22:07

Hi David,

Just wondering if you have managed to have a look at this error message?

Thanks,
Simon

Compare Prices

Submitted by support on Fri, 2010-11-26 08:52

Hi Simon,

Sorry I missed that - it's to do with the merchant field now being optional (in place of a field from the feed as field_merchant). To remove the warning, look for the following code at line 22 of admin/feeds_register_step2.php:

    if (($_POST["merchant"]=="") && ($_POST["field_merchant"]==""))

...and REPLACE with:

    if (!isset($_POST["merchant"])) $_POST["merchant"] = "";
    if (!isset($_POST["field_merchant"])) $_POST["field_merchant"] = "";
    if (($_POST["merchant"]=="") && ($_POST["field_merchant"]==""))

Cheers,
David.
--
PriceTapestry.com

Submitted by crounauer on Sun, 2010-11-28 20:24

Hi David,

In the file admin/feeds_import_slow.php the first few lines are as follows: -

require("../includes/common.php");
require("../includes/admin.php");
require("../includes/filter.php");
require("admin_header.php");
$admin_checkPassword = TRUE;
require("admin_menu.php");

Would I be right in thinking that the line $admin_checkPassword = TRUE; needs to be called before the line require("../includes/admin.php");

require("../includes/common.php");
$admin_checkPassword = TRUE;
require("../includes/admin.php");
require("../includes/filter.php");
require("admin_header.php");
require("admin_menu.php");

Thanks,
Simon

Prices Compare

Submitted by support on Mon, 2010-11-29 09:07

Well spotted Simon - thanks!

Cheers,
David.
--
PriceTapestry.com

Submitted by jonny5 on Thu, 2011-01-06 18:13

is it possible to have externalvouchers.php so we can show all vouchers within a wordpress page?

Submitted by support on Thu, 2011-01-06 18:30

Hi Jonny,

Sure - as soon as 12/10A is released formally (aiming for Monday 10th now) I will be working on a full set of external scripts including voucher codes...

Cheers,
David.
--
PriceTapestry.com

Submitted by hutchinsonm on Fri, 2011-01-07 02:22

David,

The script looks great. I do have one question - is there going to be an automated way to load them?

This would be very time consuming for me if I had to input each Coupon Code I get. I have a feed that I get thousands per day.

Thanks

Matt

Submitted by support on Fri, 2011-01-07 09:21

Hi Matt,

I'm aware of the interest regarding the use of voucher codes from feeds however it's not straight forward for a number of reasons, but I will certainly be looking in to it once the new distribution is released.

Cheers,
David.
--
PriceTapestry.com

Submitted by cascadeclimbers on Fri, 2011-01-21 20:12

Hi David,

I apologized if this has been asked before or if there is a better thread to ask this question. Playing around with the new version I found a few things. For whatever reason when I chose "Other" to put in Free Shipping in the "Discount Value and Type" Field I got an error "invalid entry". Also, say in that field instead I put in $0 for free shipping, and there was another voucher for that vendor, it would not display both. Is that a correct observation? I'd like to put the free shipping details in for all my merchants, but can't do that if it overrides all the other coupon codes. TIA.

Cheers, Jon

$> cd /pub
$> more beer

Submitted by cascadeclimbers on Fri, 2011-01-21 20:19

Hi, I think I resolved this. Was not putting free shipping in the correct field. :) For the free shipping code, I just put "Free shipping over $50" in the discount text field for the coupon code voucher which is effective.

Cheers, Jon

$> cd /pub
$> more beer

Submitted by allanch on Sun, 2011-04-17 12:25

Hi David,

With regards to an earlier question:

"Some voucher codes apply to almost everything in a merchants range, but oten exclude certain specific ranges - for example a recent Comet code gave 5% of £500, but excluded iPads. I wonder if there could be additional box where comments could be added for certain codes?"

At present the only way I've managed to do this is apply the discount to all applicable categories, is there an easier way or an update that can handle this? Maybe a regexp for all applicable categories or a NOT statment for categories excluded.

Thanks

Allan

Submitted by support on Mon, 2011-04-18 08:22

Hi Allan,

Sure - it should be straight forward to add "RegExp" and "NOT RegExp" (working in exactly the same way as the drop record / drop record if not RegExp filters).

Firstly, in includes/tapestry.php, look for the following code beginning line 174:

switch($voucher["match_type"])
{
  case "exact":

....and REPLACE that with:

switch($voucher["match_type"])
{
  case "regexp":
    if (!ereg($voucher["match_value"],$product[$voucher["match_field"]]))
    {
      $isValid = FALSE;
    }
    break;
  case "notregexp":
    if (ereg($voucher["match_value"],$product[$voucher["match_field"]]))
    {
      $isValid = FALSE;
    }
    break;
  case "exact":

And finally in admin/voucher_codes_edit.php look for the following code at line 204:

    $match_types = array("exact"=>"Exact Match","keyword"=>"Keyword Match");

...and REPLACE that with:

    $match_types = array("exact"=>"Exact Match","keyword"=>"Keyword Match","regexp"=>"RegExp","notregexp"=>"Not RegExp);

With that in place you will be able to use the same regular expression format as per filters, so for example with a match type of RegExp and a match value of:

(Category 1|Category 2|Category 3)

...the voucher code would then apply to all categories listed (pipe separated, all in between brackets)

Cheers,
David.
--
PriceTapestry.com

Submitted by allanch on Mon, 2011-04-18 10:50

Hi David, I think two of the code boxes are missing after - Firstly, in includes/tapestry.php, look for the following code beginning line 174:

Thanks

Submitted by support on Mon, 2011-04-18 10:52

Thanks Allan - corrected above...

Cheers,
David.
--
PriceTapestry.com

Submitted by allanch on Mon, 2011-04-18 10:56

Wow, that's what I call quick! I'll give it a shot, many thanks as always.

Allan

Submitted by allanch on Mon, 2011-04-18 12:10

Hi David,

I've tried the update to the vouchers and it works apart from one part. When I click on the merchant logo it does the search which is the opposite of the REGEXP. So if I have 'NOT REGEXP' => Apple iPad the search yields just Apple iPads. Hope you can look into this. Thanks

Allan

Submitted by support on Mon, 2011-04-18 12:16

Hi Allan,

I'll need to work out the equivalent MySQL where clause to the regular expressions, i'd overlooked that sorry. In the mean time, would you be in a position to use level 2 integration (voucher codes applied at import time) for which search will work fine as it searches by voucher code without having to attempt to match the condition?

You can change this in config.advanced.php line 41:

  $config_useVoucherCodes = 2;

...don't forget to re-import the first time after changing config and after making voucher code changes...

Cheers,
David.
--
PriceTapestry.com

Submitted by allanch on Mon, 2011-04-18 14:41

Hi David,

No problem, thanks for looking into this for me.

Allan