**This is an advanced topic. This is only recommended for vendors with advanced programming knowledge or those that have the assistance of a programmer.
Overview
A vendor now has the option to change a product's price, name, and/or description on a transaction by transaction basis. This means that if a vendor has a $20 product listed, they may choose to sell it for $15.99 to one customer or group of customers via a specially created link.
Required Pieces
Before you begin, you need to gather the following information:
REQUIRED
- Your JVZIPN Secret Key from My Account. If you don't have one, set one.
- New Product Price
- New Product Name
- New Product Description
Building Your Override Link
Example link: https://www.jvzoo.com/b/0/123456/1?pdo=Description&ppo=7.77&pno=Name&poh=41e365a03e3c8383a41e6e89
Product override uses 4 unique GET parameters:
- ppo: double (nullable) - Product Price Override
- pno :var (nullable) - Product Name Override
- pdo: var (nullable) - Product Description Override
- poh: var REQUIRED - Product Override Hash
Building your Product Override Hash:
Your products are protected from tampering by a sha1 hash. This hash is created when you create your link, and is verified when the user visits the URL. This protects your overridden options from tampering - if the hashes from start to finish do not match, the customer loses access to the sales page.
Send this value as a string to sha1 encoding methods, complete with "|" between all the values in the order below. Also make sure to lowercase the hash before sending to the URL.
JVZIPN_SECRET_KEY|PRODUCT_NAME_OVERRIDE|PRODUCT_DESCRIPTION_OVERRIDE|PRODUCT_PRICE_OVERRIDE
Code:
$ppo = '7.77';
$pno = null;
$pdo = null;
$secretKey = 'ABC123';
$hash = sha1("$secretKey|$pno|$pdo|$ppo");
$hash = strtolower($hash);
Building the URL
The final URL is nothing more than your JVZoo Checkout Page with added GET parameters from above.
Example code for overriding just the price:
$ppo = '7.77';
$pno = null;
$pdo = null;
$secretKey = 'ABC123';
$hash = sha1("$secretKey|$pno|$pdo|$ppo");
$hash = strtolower($hash);
$salesPageUrl = 'SET_TO_YOUR_SALES_PAGE'.'?&pdo='.urlencode($pdo).'&ppo='.urlencode($ppo).'&pno='.urlencode($pno).'&poh='.$hash;
header('Location: '.$salesPageUrl);
Example code for overriding just the price, name and description:
$ppo = '7.77';
$pno = 'My Custom Name';
$pdo = 'My Custom Description';
$secretKey = 'ABC123';
$hash = sha1("$secretKey|$pno|$pdo|$ppo");
$hash = strtolower($hash);
$salesPageUrl = 'SET_TO_YOUR_SALES_PAGE'.'?&pdo='.urlencode($pdo).'&ppo='.urlencode($ppo).'&pno='.urlencode($pno).'&poh='.$hash;
header('Location: '.$salesPageUrl);