Kryptronic Software Support Forum

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.

#1 09-08-2009 12:30:11

robprotronica
Member
Registered: 12-16-2008
Posts: 106

Discount Codes not working on Remote Add

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

Code:

// +--
// | 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

Code:

$product['prodid']         = $this->globals('khxc_cgi.prodid');

then included the following line in the remote add

Code:

<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

 

#2 09-08-2009 12:47:41

Dave
Member
Registered: 07-05-2003
Posts: 11233

Re: Discount Codes not working on Remote Add

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

 

#3 09-09-2009 05:23:00

robprotronica
Member
Registered: 12-16-2008
Posts: 106

Re: Discount Codes not working on Remote Add

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

 

Board footer