- Posts: 72
- Thank you received: 0
using onBeforeProductCopy(&$template,&$product,&$d
11 years 1 month ago #209984
by mymall
using onBeforeProductCopy(&$template,&$product,&$d was created by mymall
-- HikaShop version -- : 2.5.0
-- HikaMarket version -- : 1.6.3
Dear Sir
am trying to implement plugin when using onBeforeProductCopy(&$template,&$product,&$do)
it looks only the product parameters available in the variable $product, however, how I can access product categories and product price
I want before the product is copies to change the price and the category of it
am using this from hikamarket front end copy function
thanks
-- HikaMarket version -- : 1.6.3
Dear Sir
am trying to implement plugin when using onBeforeProductCopy(&$template,&$product,&$do)
it looks only the product parameters available in the variable $product, however, how I can access product categories and product price
I want before the product is copies to change the price and the category of it
am using this from hikamarket front end copy function
thanks
Please Log in or Create an account to join the conversation.
11 years 1 month ago #209995
by Jerome
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.
Replied by Jerome on topic using onBeforeProductCopy(&$template,&$product,&$d
Hi,
You should have access to the price and the category thanks to the variable $template.
The HikaMarket "copy" is using the HikaShop import helper with the function "copyProduct" (that's why it's the same trigger).
If you take a look at the function "_insertPrices" of the HikaShop import helper you will see that it will load the prices from the template if the $product object does not have some.
Regards,
You should have access to the price and the category thanks to the variable $template.
The HikaMarket "copy" is using the HikaShop import helper with the function "copyProduct" (that's why it's the same trigger).
If you take a look at the function "_insertPrices" of the HikaShop import helper you will see that it will load the prices from the template if the $product object does not have some.
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.
Please Log in or Create an account to join the conversation.
Moderators: Obsidev
Time to create page: 0.192 seconds