Stock manager not updating product_sales

  • Posts: 6
  • Thank you received: 0
  • Hikamarket Frontedition Hikashop Business
3 months 1 week ago #363165

-- HikaShop version -- : 5.1.1
-- Joomla version -- : 4.4.8
-- PHP version -- : 8.2

Hello

I'm using the Barcode Stock Manager and it is a great extension for Hikashop.
But what is missing is that it does not update the product-sales field in the product table.
Is this not implemented, or is it a matter of configuration that I am not aware of?
Any help appreciated.
menno

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

  • Posts: 83022
  • Thank you received: 13403
  • MODERATOR
3 months 1 week ago #363166

Hi,

The product_sales column is there so that you can have a listing of products for the best seller products. So this field is incremented each time a sale of a product is done.
The stock of the product is not relevant to this field.
I'm feeling you're using the product_sales column for something else ?

Last edit: 3 months 1 week ago by nicolas.

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

  • Posts: 6
  • Thank you received: 0
  • Hikamarket Frontedition Hikashop Business
3 months 1 week ago #363178

But selling a product on location (instead of online) is also relevant for the product_sales column.
And I use the Stock Manager to update the stock of course but it should also update the product_sales.

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

  • Posts: 83022
  • Thank you received: 13403
  • MODERATOR
3 months 1 week ago #363180

Hi,

Usually, the Stock manager is there to restock products (when you get a bunch of stock for a product, you increment the stock of the product of that amount).
And usually, when merchants get on location sales, they create orders in the backend, which update the stock and the product_sales automatically. Doing it like this, it also means that you can keep a more consistent accounting (you can have the taxes calculated for the on location sales too, so that when you look at your taxes via the "manage tax rates" button of the System>Taxes menu, you get these on location sales' tax taken into account, and when you export your orders data to import in an accounting software these on location sales are also in there), and edit invoices for your customers, if necessary. If you use the Stock manager to correct the stock with on location sales, you don't get all this.

So that's why it's currently like this.

Now, there are two ways to go about this:
- The Stock manager plugin has its own events ( onAfterStockCreate and onAfterStockUpdate ), so it's possible to update the product_sales of a product based on how the stock is being changed via the development of a small plugin implementing these events.
- I'm not necessarily against adding an extra option to the Stock manager plugin in order to handle this. But I would first need to better understand the situation on your end. Why are you adding on location sales through the Stock manager ? Could you elaborate on this ? Do you not use the Stock manager when you restock products ? Only for on location sales ?

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

Time to create page: 0.060 seconds
Powered by Kunena Forum