J!3.4.3, Emerald 9.266, HikaShop 2.5.0, Action Emerald/HikaShop 9.8
Hi Sergey,
Generally all is good, but I could use your help for a specific exception.
Emerald subscriptions are sold through HikaShop, with their prices in Emerald set to "0.00" and the price set in HikaShop. Some subscriptions are free, indeed (price in HikaShop also "0.00"), but depending on certain conditions also set in HikaShop, shipping cost is added in the shop during checkout... FYI, due to physical goods being sent to subscribers.
By default, free subscriptions are immediately activated = published. That's fine where shipping cost has been added and the payment did happen. But for "totally free" with shipping cost or total order value = "0.00" I need the subscription to save as inactive = unpublished, so it's up to an admin to manually publish (= "approve") these subscriptions.
So, I guess I need to insert some code somewhere: a condition which saves new/renewed subscriptions as unpublished if the total order value in HikaShop is zero.
In HikaShop, it's the table #__hikashop_order and its column/field "order_full_price", which provides the required information = the total order value.
I assume in Emerald it's the table #__emerald_subscriptions and its column/field "published" (default = 1), which needs to be set to "0 "on saving a new/renewed subscription if the HikaShop "order_full_price" is "0.00000" for the order.
Due to the table structure especially in HikaShop, there seems to be a bit more involved to get the right row(s) in #__emerald_subscriptions affected, or?
So, this leads to my questions:
Can you please point me at where to insert the condition? I haven't investigated Emerald's or the action's code yet.
Perhaps even provide me with a code snippet? Considering you knowing exactly how Emerald and HikaShop are playing together in the action, it's probably not much more than a blink for you, hehe...
In any case, many thanks in advance!
J!3.4.3, Emerald 9.266, HikaShop 2.5.0, Action Emerald/HikaShop 9.8
Hi Sergey,
Generally all is good, but I could use your help for a specific exception.
Emerald subscriptions are sold through HikaShop, with their prices in Emerald set to "0.00" and the price set in HikaShop. Some subscriptions are free, indeed (price in HikaShop also "0.00"), but depending on certain conditions also set in HikaShop, shipping cost is added in the shop during checkout... FYI, due to physical goods being sent to subscribers.
By default, free subscriptions are immediately activated = published. That's fine where shipping cost has been added and the payment did happen. But for "totally free" with shipping cost or total order value = "0.00" I need the subscription to save as inactive = unpublished, so it's up to an admin to manually publish (= "approve") these subscriptions.
So, I guess I need to insert some code somewhere: a condition which saves new/renewed subscriptions as unpublished if the total order value in HikaShop is zero.
In HikaShop, it's the table #__hikashop_order and its column/field "order_full_price", which provides the required information = the total order value.
I assume in Emerald it's the table #__emerald_subscriptions and its column/field "published" (default = 1), which needs to be set to "0 "on saving a new/renewed subscription if the HikaShop "order_full_price" is "0.00000" for the order.
Due to the table structure especially in HikaShop, there seems to be a bit more involved to get the right row(s) in #__emerald_subscriptions affected, or?
So, this leads to my questions:
Can you please point me at where to insert the condition? I haven't investigated Emerald's or the action's code yet.
Perhaps even provide me with a code snippet? Considering you knowing exactly how Emerald and HikaShop are playing together in the action, it's probably not much more than a blink for you, hehe...
In any case, many thanks in advance!