kalyncomputers Posted August 27, 2015 Share Posted August 27, 2015 Hi,I have a client with a CC store and we have just discovered that if someone buys a Gift Certificate, the recipient does not get it or a download link. I have tested it and can place an order, pay for it and the store owner gets the payment and notification of the sale but the actual GC does not arrive anywhere.The store is running the latest CC 6, Foundation skin, no mods and everything else works perfectly.Any ideas?Thanks Tim Quote Link to comment Share on other sites More sharing options...
bsmither Posted August 27, 2015 Share Posted August 27, 2015 I am seeing the code in the Order class where, if the admin has the setting in Store Settings, Features tab, "Force Order Completed Emails" is OFF, then when CubeCart moves an order to Processing and that order is eligible to be automatically moved to Completed (as for a 'digital-only' order), then CubeCart will not send emails when that order does move to Completed. This includes not sending the email with the Gift Cert (Order->_sendCoupon), but does not include not sending download links for digital inventory.I cannot guess the reasoning for this programming decision.Can you let us know what the setting is in admin?I would try:In order.class.php, near lines 462-473, find: // Load up the inventory, if we haven't already if (!isset($complete)) { $this->_getInventory($order_id); } if (!$this->_skip_order_complete_email && $this->_email_enabled) { foreach ($this->_order_inventory as $item) { // Send Gift Certificate if (!empty($item['custom']) && !empty($item['coupon_id'])) { $this->_sendCoupon($item['coupon_id'], unserialize($item['custom'])); } } } MOVE the above lines of code to a spot just after line 441: // Send digital files $this->_digitalDelivery($order_id, $this->_order_summary['email']); /* PUT THE MOVED CODE HERE */ break; Then delete these lines, because they are redundant: // Load up the inventory, if we haven't already if (!isset($complete)) { $this->_getInventory($order_id); } Then edit the line from: if (!$this->_skip_order_complete_email && $this->_email_enabled) { to: if ($this->_email_enabled) { Quote Link to comment Share on other sites More sharing options...
havenswift-hosting Posted August 27, 2015 Share Posted August 27, 2015 That flag was added to solve some issues with some payment gateways and obviously digital product only orders which move directly to Completed were accounted for but orders that only contain a Gift certificate where it is a digital only delivery weren't. I am seeing the same behaviour and this is definitely a bug that needs to be fixed and I have reported this as an issue https://github.com/cubecart/v6/issues/764Ian Quote Link to comment Share on other sites More sharing options...
[email protected]. Posted December 22, 2015 Share Posted December 22, 2015 This still appears to be an issue for my customers - does anybody have the fix? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.