Troubleshooting 1-Click Upsells
1) Problem: Getting an error that looks like this after purchase – using 1-Click Upsells.
Warning: file_get_contents(/home/mysite/dap/upsell1.html) [function.file-get-contents]: failed to open stream: No such file or directory in /home/mysite/dap/continue.php(1) : eval()'d code on line 20
Solution: Create missing file.
Every buy button generated by DAP for Auth.net or Paypal Payments Pro, will look something like this…
<form name=”generate_authnet” method=”post” action=”https://www.DigitalAccessPass.com/dap/buy.php”>
<input type=”hidden” name=”item_name” value=”DAP Upsell Tree – Auth.net (T)”/>
<input type=”hidden” name=”description” value=”DAP Upsell Tree For Authorize.net” />
<input type=”hidden” name=”amount” value=”97.00″ />
<input type=”hidden” name=”trial_amount” value=”0.01″ />
<input type=”hidden” name=”total_occurrences” value=”1″ />
<input type=”hidden” name=”is_recurring” value=”Y” />
<input type=”hidden” name=”recurring_cycle_1″ value=”365″ />
<input type=”hidden” name=”recurring_cycle_2″ value=”365″ />
<input type=”hidden” name=”recurring_cycle_3″ value=”365″ />
<input type=”hidden” name=”payment_succ_page” value=”https://www.YourSite.com/dap/continue.php?url=/dap/upsell1.html” />
<input type=”hidden” name=”payment_gateway” value=”authnet” />
<input type=”hidden” name=”is_submitted” value=”Y” />
<input type=”submit” value=”Buy Now” />
</form>
If you see the line in bold above, you will see the field…
payment_succ_page
… pointing to the first upsell…
https://www.YourSite.com/dap/continue.php?url=/dap/upsell1.html
What this essentially means, is that once the payment for the front end order is complete, you want the contents of the page /dap/upsell.html to be presented as the first upsell.
So…
a) Either create an HTML page called upsell1.html in the dap folder.
b) Or change the name of the file in the buy-button form code above, to be whatever your actual file name is.
c) Or if you don’t wish to do any upsells, then put the URL of your final thank you page in that field’s value.
2) Question: How do I use my own button with the shopping cart script?
Look for this in the DAP generated button code:
input type=”submit” value=”Buy Now”
Replace it with your own image :
For example –
input type=”image” src=”/images/btn-order.png” value=”Buy Now”
If images folder is at the root of your site, set src = /images/btn-order.png. If it’s under dap folder, the src tag should be set to “/dap/images/btn-order.png”.