1b.app
Link copied -

Optimizing the operation of the "Update availability in opencart" action

Good afternoon Is it possible to optimize the operation of an action so that it runs in a few seconds? Is there a direct upload to the database?

Currently there are 7,915 products in the system and uploading availability for them takes 150-200 seconds
Original question is available on version: ru

Answers:

Good afternoon. Just a few seconds, probably not (boxing and opencart are commonplace on different servers and each request to the database goes back and forth, i.e. a lot of time is spent purely on sending requests and receiving responses and not on the execution itself), but most likely it can be done in a couple of times faster. Will it take 3 hours to complete, will I issue an invoice?
02.01.2024, 11:09
Original comment available on version: ru

Yes, post it. Is it possible to additionally make the setting “Update availability only for products whose availability has changed in the last N minutes”?
And tell me, is it possible to somehow implement instant sending of availability after it has been changed to opencart via webhooks?
02.01.2024, 16:44
Original comment available on version: ru


Rodion wrote:
Yes, post it. Is it possible to additionally make the setting “Update availability only for products whose availability has changed in the last N minutes”?

yes, +1h. It will just look not at availability, but in general at changes in the product card (udate field). If you do this and you don’t have a lot of products updated every hour, then you don’t have to do optimizations; much fewer products will be sent. If there is some kind of price recalculation once an hour, then this will not change the situation in any way, all products will be updated and everything will be sent too.

Rodion wrote:
And tell me, is it possible to somehow implement instant sending of availability after it has been changed to opencart via webhooks?

Yes, in product update automation you can make an action that will update the availability of the product in the background after updating the card. It will take about 4 hours.
02.01.2024, 17:24
Original comment available on version: ru



Care Department

OneBox production wrote:

yes, +1h. It will just look not at availability, but in general at changes in the product card (udate field). If you do this and you don’t have a lot of products updated every hour, then you don’t have to do optimizations; much fewer products will be sent. If there is some kind of price recalculation once an hour, then this will not change the situation in any way, all products will be updated and everything will be sent too.



Yes, we run price recalculation once an hour, but if, for example, we make the setting “Update availability only for products whose availability has changed since the last time the action was launched,” then it will work for us. The action will run every minute and unload balances only for goods that were updated between unloadings and once an hour for all. Will it work the same?



Care Department

OneBox production wrote:

It will just look not at availability, but in general at changes in the product card (udate field)



can it be done by analogy with the action “Upload products/categories/filters/characteristics into opencart (via database)”? In it you can select the availability and quantity fields, when changed, the product will be unloaded.
05.01.2024, 00:32
Original comment available on version: ru


Rodion wrote:
can it be done by analogy with the action “Upload products/categories/filters/characteristics into opencart (via database)”? In it you can select the availability and quantity fields, when changed, the product will be unloaded.

it is possible, but not all changes in these fields are in history. The same price recalculation can change availability without recording it in history
05.01.2024, 12:15
Original comment available on version: ru

I tested it, it seems that all the processes that occur with us change the product update date, and there are entries in the logs:

storaged - when the quantity of goods in warehouses changes,

availtext - when recalculating,

avail - if neither we nor the supplier have the product, or vice versa, it has appeared.

Let's then make a setting so that only products are unloaded that have had changes in these 3 fields since the last time the action was launched (storaged, availtext, avail).

We still need 2 related improvements, should we create a new topic or can we do everything together?

1. When updating the price list, for goods of the downloaded supplier that are not in the price list (availability is turned off for them, but that’s what we need), prices are not recalculated. It needs some configuration to get it running.

2. When you manually change the supplier’s availability for an item in the product card, it also changes - as I understand it, the availability is recalculated. But if the supplier’s price and ppc change, the recalculation does not occur. A setting is needed to start recalculating prices and availability for a product while saving supplier information for this product.
07.01.2024, 15:13
Original comment available on version: ru

Good afternoon Please confirm the modifications, and we are waiting for the invoice
10.01.2024, 13:11
Original comment available on version: ru


Rodion wrote:
I tested it, it seems that all the processes that occur with us change the product update date, and there are entries in the logs:
storaged - when the quantity of goods in warehouses changes,
availtext - when recalculating,
avail - if neither we nor the supplier have the product, or vice versa, it has appeared.
Let's then make a setting so that only products are unloaded that have had changes in these 3 fields since the last time the action was launched (storaged, availtext, avail).

ok, 4h

Rodion wrote:
We still need 2 related improvements, should we create a new topic or can we do everything together?
1. When updating the price list, for goods of the downloaded supplier that are not in the price list (availability is turned off for them, but that’s what we need), prices are not recalculated. You need to configure it for it to run.

2h

Rodion wrote:
2. When you manually change the supplier’s availability for an item in the product card, it also changes - as I understand it, the availability is recalculated. But if the supplier’s price and ppc change, the recalculation does not occur. A setting is needed to start recalculating prices and availability for a product while saving supplier information for this product.

2h
Bill?
10.01.2024, 14:03
Original comment available on version: ru

Commentary is available in ru and not yet translated to the current language.
10.01.2024, 16:38

if without optimization and just send those products whose selected fields have changed, then 1 hour
10.01.2024, 17:31
Original comment available on version: ru


Care Department
OneBox production wrote:
if without optimization and just send those products whose selected fields have changed, then 1 hour

Yes, let's go without optimization for now, we will only send products for which these fields have changed. And since the last time this action was launched.
10.01.2024, 17:38
Original comment available on version: ru

Total:
1. In the action of exporting the availability of products to opencart, we send only those products for which the selected fields have changed in the specified X minutes (you will set the number of minutes yourself and select the fields, among the available ones there will be a couple of fields like storaged availtext avail). 1h
Points 2 and 3 are described in detail above.
Only 5 hours, I'll issue an invoice.
11.01.2024, 11:40
Original comment available on version: ru

Yes that's right! Just in case, let me clarify:

Care Department
OneBox production wrote:
1. In the action of exporting the availability of products to opencart, we send only those products for which the selected fields have changed in the specified X minutes (you will set the number of minutes yourself and select the fields, among the available ones there will be a couple of fields like storaged availtext avail). 1h

Action Update availability in opencart in the Automation section once per minute

Rodion wrote:
1. When updating the price list, for goods of the downloaded supplier that are not in the price list (availability is turned off for them, but that’s what we need), prices are not recalculated. You need to configure it for it to run.

You need to launch Price and AVAILABILITY calculation

Rodion wrote:
2. When you manually change the supplier’s availability for an item in the product card, it also changes - as I understand it, the availability is recalculated. But if the supplier’s price and ppc change, the recalculation does not occur. A setting is needed to start recalculating prices and availability for a product while saving supplier information for this product.

Start recalculation of prices and availability when saving any changes in the Suppliers by product section
I'm waiting for the invoice, thank you!
11.01.2024, 13:35
Original comment available on version: ru

Good afternoon Please advise on the timing of the implementation of improvements, thank you.
18.01.2024, 12:11
Original comment available on version: ru

When should I expect it to be ready?
24.01.2024, 00:41
Original comment available on version: ru

It's been 22 days, please give me some kind of answer. When will the improvements be implemented?
02.02.2024, 22:46
Original comment available on version: ru

Good afternoon, usually improvements are made within a month from the date of payment, the maximum I have seen is about 6-7 weeks.
05.02.2024, 11:35
Original comment available on version: ru


Care Department
OneBox production wrote:
Good afternoon, usually improvements are made within a month from the date of payment, the maximum I have seen is about 6-7 weeks.

Ok, please tell me when to expect this?
05.02.2024, 12:04
Original comment available on version: ru


Thanks, we're waiting.
Just in case, I’ll repeat the clarifications:

Rodion wrote:
Yes that's right! Just in case, let me clarify:

Care Department
OneBox production wrote:
1. In the action of exporting the availability of products to opencart, we send only those products for which the selected fields have changed in the specified X minutes (you will set the number of minutes yourself and select the fields, among the available ones there will be a couple of fields like storaged availtext avail). 1h

Action Update availability in opencart in the Automation section once per minute

Rodion wrote:
1. When updating the price list, for goods of the downloaded supplier that are not in the price list (availability is turned off for them, but that’s what we need), prices are not recalculated. You need to configure it for it to run.

You need to launch Price and AVAILABILITY calculation

Rodion wrote:
2. When you manually change the supplier’s availability for an item in the product card, it also changes - as I understand it, the availability is recalculated. But if the supplier’s price and ppc change, the recalculation does not occur. A setting is needed to start recalculating prices and availability for a product while saving supplier information for this product.

Start recalculation of prices and availability when saving any changes in the Suppliers by product section
I'm waiting for the invoice, thank you!
05.02.2024, 15:44
Original comment available on version: ru

Good afternoon. The following settings have been improved
1. In the action "Update availability in opencart" setting "Select product fields. The product will be uploaded only if one of the selected fields has changed since the last time it was unloaded by this action"
2. In other settings of the "Suppliers and price lists" application, select the "Start price recalculation for products that are not available from the supplier after loading the supplier's price list."
3. In the “Suppliers” product block, select the “Run recalculation of prices and availability after saving this block (recalculation of prices and product availability will be launched in the background)”
07.02.2024, 13:32
Original comment available on version: ru



Care Department

OneBox production wrote:

3. In the “Suppliers” product block, select the “Run recalculation of prices and availability after saving this block (recalculation of prices and product availability will be launched in the background)”



As I understand it, the settings were made in the wrong place.



Rodion wrote:

2. When you manually change the supplier’s availability for an item in the product card, it also changes - as I understand it, the availability is recalculated. But if the supplier’s price and ppc change, the recalculation does not occur. A setting is needed to start recalculating prices and availability for a product while saving supplier information for this product.

Screenshot_86.png



I sent a screenshot to the technical specifications - this is the Suppliers and Prices application, not a block in the product interface (I didn’t even know about its existence).
12.02.2024, 15:03
Original comment available on version: ru

Good afternoon, please correct us, we cannot use the improvement - we wanted to disable the automation of every hour Recalculation of prices and leave the recalculation only after editing.
16.02.2024, 12:01
Original comment available on version: ru

Okay, let's use this block
16.02.2024, 12:27
Original comment available on version: ru

Please join the conversation. If you have something to say - please write a comment. You will need a mobile phone and an SMS code for identification to enter. Log in and comment