Product change after order creation

  • Posts: 17
  • Thank you received: 0
8 years 5 months ago #243274

-- HikaShop version -- : HikaShop Business: 2.6.2
-- Joomla version -- : Joomla! 3.5.1 Stable [ Unicorn ] 05-April-2016 22:45 GMT
-- PHP version -- : 5.6.19

The product name is not complete when we add or change a product after the customer has created an order

view.xscreenshot.com/c40f3cf076d52928a16a2f85cc5b48a6


Can this be corrected?

Thank you

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

  • Posts: 82867
  • Thank you received: 13374
  • MODERATOR
8 years 5 months ago #243290

That's because you must have added the main product, instead of adding the variant of the product in the product adding popup of the backend interface.
And it's normal that the time limits are the same because the system bases itself on the date of the creation of the order, not the date of adding of the product from the backend.

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

  • Posts: 17
  • Thank you received: 0
8 years 5 months ago #243344

That was adding the variant as you can see by the product code. So I then added a name to the Variant like this:
view.xscreenshot.com/78459be08718e94609d28308f0624342

Even though it looks like I'm pointing to the time in the first screenshot, first post, I was referring to the entire line (product)

Now the added product is different again.
view.xscreenshot.com/891bcc886d7c65e6dadf134df5fd11f6

essentially we are trying to understand the correct way to alter an order after it has been placed by the customer.
view.xscreenshot.com/24561258e05535c4d9a4f424b954d68c

Thank you Nicolas

Last edit: 8 years 5 months ago by Sheldon.

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

  • Posts: 82867
  • Thank you received: 13374
  • MODERATOR
8 years 5 months ago #243350

Hi,

Change the code:

if($isVariant && empty($product->product_name)){
						$product->product_name = $allproducts[ (int)$product_id[1] ]->product_name;
					}
to:
if($isVariant){
						$database->setQuery('SELECT * FROM '.hikashop_table('variant').' AS a LEFT JOIN '.hikashop_table('characteristic') .' AS b ON a.variant_characteristic_id=b.characteristic_id WHERE a.variant_product_id='.(int)$product->product_id.' ORDER BY a.ordering');
						$product->characteristics = $database->loadObjectList();
						$productClass->checkVariant($product,$allproducts[ (int)$product_id[1] ]);
					}
in the file administrator/components/com_hikashop/views/order/view.html.php and that should then work properly when you do new additions of variants to orders.

Last edit: 8 years 5 months ago by nicolas.

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

Time to create page: 0.064 seconds
Powered by Kunena Forum