using onBeforeProductCopy(&$template,&$product,&$d

  • Posts: 72
  • Thank you received: 0
8 years 8 months ago #209984

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

Please Log in or Create an account to join the conversation.

  • Posts: 26000
  • Thank you received: 4004
  • MODERATOR
8 years 8 months ago #209995

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,


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.058 seconds
Powered by Kunena Forum