You are viewing this forum as a guest. Login to an existing account, or create a new account, to reply to topics and to create new topics.
Hi
Having a problem with applying a discount code to a specific product when remotely added to the cart.
The remote add is working fine but there does not seem to be any way to transmit the product id needed for the discount code to work when adding to the cart remotly.
Based on some comments relating to CCP5 I found the following In GBU_Cart.php
// +-- // | Now that we're done with security, make sure we have everything we // | need to make this happen. We need to set up our product price, // | name and number fields and make sure they're complete. // +-- $product = array(); $product['id'] = 'REMOTE-' . $this->random_key(12); $product['name'] = $this->globals('khxc_cgi.name'); $product['prodnum'] = $this->globals('khxc_cgi.number'); $product['regprice'] = $this->globals('khxc_cgi.price'); $product['recurprice'] = $this->globals('khxc_cgi.recurprice'); $product['volprice'] = $this->globals('khxc_cgi.volprice'); $product['affilcomm'] = $this->globals('khxc_cgi.affiliatecomm');
And added
$product['prodid'] = $this->globals('khxc_cgi.prodid');
then included the following line in the remote add
<p class="hidden"><input type="hidden" name="prodid" id="prodid" value="ProNav_TFNW" /></p>
Seemed like a good idea but did not work - Maybe the product ID is not called "prodid" in CCP6.
Any ideas on how to include the product id in a remote add would be much appreciated.
Thanks
Rob
Offline
For remote adds the product ID is derived and includes the prefix REMOTE-. By their very nature remote adds are not subject to the "rules" of cart checking or discounting. You may be able to accomplish something similar to discounting of specific products with a custom sales method.
Offline
Hi Dave,
Thanks for that - could have spent hours trying to find something that does not exist!
Would have been nice to have a "One Click" remote add including the discount on the product but have come up with a "Two Click" solution that works quite well.
Rob
Offline