Product(s) added automatically after validation

  • Posts: 2
  • Thank you received: 0
  • Hikashop Business
5 years 6 months ago #299117

-- url of the page with the problem -- : www.dev.pfwilly.com/vente-en-ligne/e-commerce.html
-- HikaShop version -- : 4.0.0
-- Joomla version -- : 3.8.13
-- PHP version -- : 7.1.22
-- Browser(s) name and version -- : Firefox/safari/IE

Hello,

I work since about 1 year with an ecommerce based on hikashop 3.5.1 without problem but suddenly some clients contacted me because one or two products are added automatically after the validation.
Even in the email (see attachment), you can see I've order just two products (47€ + 1,5€) but two others items has been added by the system and there is a difference between the subtotal and the total.
Except upgrade sometimes Joomla, I don't touch anything.
I tried also to copy the website to a development directory where I upgrade hika to v4 and also Joomla but the result is the same.
I spent long hours to research the origin of the problem but I don't understand.

Could you help me?

Thanks in advance,
William.

Ps : sorry for my english ...

This browser does not support PDFs. Please download the PDF to view it: Download PDF

Attachments:

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

  • Posts: 81504
  • Thank you received: 13064
  • MODERATOR
5 years 6 months ago #299119

Hi,

What you're describing is typical of someone deleting orders in the hikashop_order table without deleting the links to the products in the hikashop_order_product table in the database.
Then, the auto increment is reset to the highest order id remaining in the hikashop_order table, and next time an order is created with the id of a previous order, the products from the deleted order with the same id will be seen by HikaShop as linked to the new order.
The proof of that is that the grand total is calculated by HikaShop just before the order is created by HikaShop, while the subtotal is calculated dynamically when the order details is being displayed, which explains the inconsistency between the two amounts.
So updating won't change anything to that and there is no bug. The issue is that previous orders were not deleted properly by the person who did that. Normally, when you delete an order using the delete button of the orders listing, it will delete both the order and the link with the products so that this cannot happen.

The following user(s) said Thank You: willix

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

  • Posts: 2
  • Thank you received: 0
  • Hikashop Business
5 years 5 months ago #299474

Hi,
Thanks for your reply.
You have right even if nobody has delete order into the DB.
I cleaned all fileds in the hikashop_order and hikashop_order_products and the problem is solved.

Thanks again.

Best regards,
William.

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

Time to create page: 0.059 seconds
Powered by Kunena Forum