Delete product from order using order_product Class

  • Posts: 44
  • Thank you received: 0
7 years 11 months ago #257296

-- HikaShop version -- : 2.6.4

Hi,

I can programmatically add new product to the existing order using order, product and order_product Class, but can't figure out how to delete existing product from the order. Can you point me in the right direction?

Thanks in advance.

Denis

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

  • Posts: 82867
  • Thank you received: 13373
  • MODERATOR
7 years 11 months ago #257317

Hi,

You can do it like that:

$class = hikashop_get('class.order');
JRequest::setVar('order_id',$order_id);
JRequest::setVar('order_product_id',$order_product_id);
$class->saveForm('product_delete');

The following user(s) said Thank You: denoo

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

Time to create page: 0.056 seconds
Powered by Kunena Forum