printdotio / pio.js

An embeddable widget that enables users to quickly and easily monetize a webpage by enabling photo-product sales of its images.
4 stars 0 forks source link

Web widget: coupon code in PIO.config() #45

Closed mattmcneeney closed 10 years ago

mattmcneeney commented 10 years ago

It would be useful if a coupon code could be specified in the PIO.config() so that different users (eg. Standard and Premium) could be presented with different pricing (eg. 10% discount for Premium).

Is this something that would be possible to implement in the near future?

mattmcneeney commented 10 years ago

Bump

bhox commented 10 years ago

@mattmcneeney The idea is to pass the coupon code in at the beginning so they don't have to enter it?

mattmcneeney commented 10 years ago

@mrgreenfur Yes exactly, preferably in the configuration, such as:

PIO.config({ recipeId: 'abcdef', coupon: '1234' });

Or alternatively, in PIO.open()

bhox commented 10 years ago

Makes sense, will spec and see where we can get it built

bhox commented 10 years ago

This is live with the PIO.open({}) param of "coupon: 'coupon-code-here',"

mattmcneeney commented 10 years ago

Fantastic - thank you!

mattmcneeney commented 10 years ago

This change does not seem to be live on the latest v2 widget (//az412349.vo.msecnd.net/pio/pio.latest.v2.js), and I cannot see any information on this in the changelog on the PrintIO widget homepage. How can I get hold of this change? Thanks

bhox commented 10 years ago

@mattmcneeney Just refreshed the PIO.js CDN copy, should be there now. LMK if you have any troubles or questions with it!

mattmcneeney commented 10 years ago

That's working now - thank you! One more question though I'm afraid... would it be possible to add another parameter to hide the name of the applied coupon code (so the message at checkout would just say "DISCOUNT CODE APPLIED")? We want the special discount to be "behind-the-scenes" and would like to prevent the coupon code being easily shared. Thanks!