1b.app
Link copied -

Rate the improvements

Often there are more than 20 suppliers for one product, which differ not only in Price but also in Delivery Time.

Selection by Price is handled well by the “Recalculation of prices and availability” algorithm, where, using fine settings, we select the Active supplier.

But sometimes the main selection criterion is not Price, but Delivery Time, and this is where the manual search for an Alternative supplier with the best Time indicator begins.

Having Active and Alternative product suppliers, they can be submitted in the form of Filters, Markups, and exported to OpenCart as Options..

This requires improvements:

1. The “Alternative supplier” selection algorithm can be implemented as a separate action with settings - Action launch conditions.png (Automation for products > When saved in a product card) or you can modify the action “Calculate the value using the formula and write in the specified field” (Automation for products > When saved in a product card), all the conditions for selecting products for the algorithm are already there.

Principle:

1.1*) We are looking for the lowest Price among suppliers and warehouses of the product, which is less than the price of the Active supplier:

- if we find it, we record the ID of this supplier or the “Warehouse code” (if it’s a warehouse) in the add. product field, stop the algorithm for the current product;

- if it doesn’t find it, then go to step 1.2;

1.2) We are looking for a Duration among suppliers and warehouses*, which is less than the term of the Active supplier:

- If the Term of the Active supplier = 0, then we fix the value 0 in the additional. product field, stop the algorithm for the current product;

- if we find several suitable options, then select the one with the lowest price and record the ID of this supplier or “Warehouse code” in the additional. product field, stop the algorithm for the current product;

2. Add the following setting to the action “Enter the value of an additional field in the filter” (Automation for products > When saving in a product card):

2.1 “Delete selected filters before filling” - the setting removes the selected filter from the product (Delete selected filters.png).

This setting will keep supplier filters up to date by deleting old filters before inserting new ones.

2.2. Automatically filling in supplier IDs in the product filter values ​​is not a problem; you need an action that Copies the price of this supplier ID into the Markup with the selected price prefix “equal” (Copy supplier prices to markups.png).

- it is desirable that the price be copied into the Markup, taking into account the rounding of prices.

*Warehouse period = 0.

*Clause No. 1.1 is mandatory, since the Active supplier during recalculation can be determined by different methods depending on the “Priority of price selection”.

*The main Trigger for the actions listed in the ToR is Saving in the product card (Automation for products)
Original question is available on version: ru

Answers:

Simplified the technical specifications; only the action of selecting an Alternative supplier is required.
1. The “Alternative supplier” selection algorithm can be implemented as a separate action with settings - Action launch conditions.png (Automation for products > When saved in a product card) or you can modify the action “Calculate the value using the formula and write in the specified field” (Automation for products > When saved in a product card), all the conditions for selecting products for the algorithm are already there.
Principle:
1.1) We are looking for the lowest Selling Price among suppliers and warehouses of the product, which is less than the price of the Active supplier:
- if we find it, we record the ID of this supplier or the “Warehouse code” (if it’s a warehouse) in the add. product field, stop the algorithm for the current product;
- if it doesn’t find it, then go to step 1.2;
1.2) We are looking for a Delivery Time among suppliers and warehouses* that is less than the Delivery Time of the Active Supplier:
- If the Delivery Time of the Active Supplier = 0, then we stop the algorithm for the current product, and in additional. the product field is fixed to "0";
- if we find several options with the same delivery time and less than that of the Active supplier, then select the one with the lowest price and record the ID of this supplier or “Warehouse code” in the additional. product field, stop the algorithm for the current product;
09.02.2024, 15:14
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