This fails to enter into what will be the 'custom' blob the chosen delivery method. It is true that 'digital' is set to true and gets databased in the 'digital' column of CubeCart_order_inventory, but more can be done.
Then, knowing that Order->_sendCoupon() has this delivery method within $data, we can choose to email the cart.gift_certificate template, or prepare for something else - such as:
send a different email to a card fabrication house
prepare a file for printing
Also, have a hook: class.order.send.physical.coupon.
Alternately:
In Order->orderStatus(), case:ORDER_COMPLETE, there is:
// Send Gift Certificate
if (!empty($item['custom']) && !empty($item['coupon_id'])) {
$this->_sendCoupon($item['coupon_id'], unserialize($item['custom']));
}
If wanting to only email if the GC order inventory item is digital = 1, suggest:
if (!empty($item['custom']) && !empty($item['coupon_id']) && $item['digital']) {
$this->_sendCoupon($item['coupon_id'], unserialize($item['custom']));
}
In
Cart->add()
, near line 234, there is:This fails to enter into what will be the 'custom' blob the chosen delivery method. It is true that 'digital' is set to true and gets databased in the 'digital' column of CubeCart_order_inventory, but more can be done.
Suggest:
Then, knowing that
Order->_sendCoupon()
has this delivery method within$data
, we can choose to email thecart.gift_certificate
template, or prepare for something else - such as:Also, have a hook:
class.order.send.physical.coupon
.Alternately:
In
Order->orderStatus()
,case:ORDER_COMPLETE
, there is:If wanting to only email if the GC order inventory item is
digital = 1
, suggest:See: #1366