1b.app
Link copied -

import orders from good - please calculate the improvements

never received an answer to the question about importing orders well /
improvements are needed for integration with XIII - please evaluate separately and together.
1 correct import of orders of the "cheaper together" type (do not import "cheaper together2" as an item and scatter a possible discount on all goods.
2 correct import of orders with delivery method - ukrpochta (doubles the city)
3 correct import of the payment / delivery method (according to the type as it is implemented with the promo if the payment / delivery method is in ХШ "ХХХ" then apply the payment / delivery in the "ННН" box)
Original question is available on version: ru

Answers:

Hello.
According to the screenshot https://prnt.sc/ye2w4x it is not clear what is the order identifier for Horoshop, in order to see the issue and offer you a solution on the above points (in particular, paragraphs 1 and 2)
Please specify the order ID https://prnt.sc/ye2w4x
17.02.2021, 16:15
Original comment available on version: ru

test order in XSh No. 1444 in box it is 55350 note that the box creates a new product each time - it's cheaper together, and the discount is not displayed correctly, that is, the amount is correct and the price of the goods is incorrect, if you write the discount into a discount, then it's also incorrect - you need to create a bunch of discounts for every percentage
19.02.2021, 11:24
Original comment available on version: ru

Here is the API output (phone deleted):
array
(
[order_id] => 1444
[user] => 1429
[delivery_name] => Zubarev
[delivery_email] =>
[delivery_phone] =>
[delivery_city] => Podolsk
[delivery_address] => Podolsk, 66300, st. Test, d. 11, apt. 12
[delivery_type] => Array
(
[id] => 9
[title] => Ukrposhta
)
[delivery_price] => -1
[comment] => test for together is cheaper
[payment_type] => Array
(
[id] => 21
[title] => FULL PAYMENT ON THE CARD
)
[payment_price] => 0
[paid] => 0
[total_default] => 153
[total_sum] => 153
[total_quantity] => 1
[discount_percent] => 0
[discount_value] => 0
[coupon_code] =>
[coupon_percent] => 0
[coupon_discount_value] => 0
[coupon_type] => 0
[stat_status] => 2
[stat_created] => 2021-02-19 11:18:55
[currency] => USD
[order_without_callback] =>
[products] => array
(
[0]
(
[title] => Cheaper Together
[article] =>
[price] => 153
[quantity] => 1
[discount_marker] => PRODUCTS_SET
[total_price] => 153
)
[1]
(
[title] => Lint Remover YX - 5880
[article] => 386289710
[price] => 0
[quantity] => 1
[discount_marker] => PRICE_OLD
[total_price] => 0
)
[2]
(
[title] => Spare Blade - Spare Knife - Replaceable for YX-5880 Pill Remover and other models
[article] => 598012366
[price] => 0
[quantity] => 1
[discount_marker] => NONE
[total_price] => 0
)
)
)
And now point by point:
1. If you check the "Add "Together cheaper" to the discount amount" checkbox in action, you will receive the discount indicated in the process.
If this does not suit you, you can modify the setting to add the "Together cheaper" product with the specified price, the rest from 0 (as passed to the API) - this will take 2 hours.
Let's just make this product add fictitious for example.
2. You can modify the check that if the city is present in the address - do not add it before the addresses - it will take 1 hour
3. The implementation of such a setting will take 3 hours.
19.02.2021, 16:43
Original comment available on version: ru

1 function "Add "Together cheaper" to the discount amount" is not suitable because we do not use a discount and we need to create a discount for each percentage of the discount - this function is not suitable in this form - can it be improved ?.
If it adds a product "cheaper together" as a fictitious one with a price and the rest with zero, then it's also a problem - the margin will be calculated incorrectly - the fictitious product will be super profitable and the real product will be constantly at a complete loss.
19.02.2021, 18:27
Original comment available on version: ru


Sergey Zubarev wrote:
1 function "Add "Together cheaper" to the discount amount" is not suitable because we do not use a discount and we need to create a discount for each percentage of the discount - this function is not suitable in this form - can it be improved ?.

for "Together cheaper" one discount of the same name is created, and then it is indicated in the process + a specific amount. That is, you do not need to add any other discounts - you can specify a specific discount amount in the process.
22.02.2021, 12:29
Original comment available on version: ru

The fact is that this function is now working very incorrectly for you, so the buyer sees the order on the site https://prnt.sc/103pmoy and everything is correct there, but the order is clumsily included in the box https://prnt.sc/103pqmr, with what such sums are generally impossible to understand.
22.02.2021, 14:11
Original comment available on version: ru


Sergey Zubarev wrote:
The fact is that this function is currently working very incorrectly for you, so the buyer sees the order on the site https://prnt.sc/103pmoy and everything is correct there, but the order is clumsily included in the box https://prnt.sc/103pqmr, with what such sums are generally impossible to understand.

On the example of issuing API for this order
array
(
[order_id] => 1514
[user] => 1497
[delivery_name] => Zubarev
[delivery_email] =>
[delivery_phone] =>
[delivery_city] =>
[delivery_address] =>
[delivery_type] => Array
(
[id] => 0
[title] =>
)
[delivery_price] => 0
[comment] =>
[payment_type] => Array
(
[id] => 0
[title] =>
)
[payment_price] => 0
[paid] => 0
[total_default] => 277
[total_sum] => 277
[total_quantity] => 2
[discount_percent] => 0
[discount_value] => 0
[coupon_code] =>
[coupon_percent] => 0
[coupon_discount_value] => 0
[coupon_type] => 0
[stat_status] => 1
[stat_created] => 2021-02-22 14:03:45
[currency] => USD
[order_without_callback] =>
[products] => array
(
[0]
(
[title] => Cheaper Together
[article] => 1
[price] => 152
[quantity] => 1
[discount_marker] => PRODUCTS_SET
[total_price] => 152
)
[1]
(
[title] => Lint Remover YX - 5880
[article] => 386289710
[price] => 0
[quantity] => 1
[discount_marker] => PRICE_OLD
[total_price] => 0
)
[2]
(
[title] => Spare Blade - Spare Knife - Replaceable for YX-5880 Pill Remover and other models
[article] => 598012366
[price] => 0
[quantity] => 1
[discount_marker] => NONE
[total_price] => 0
)
[3]
(
[title] => Lint Remover YX - 5880
[article] => 386289710
[price] => 125
[quantity] => 1
[discount_marker] => PRICE_OLD
[total_price] => 125
)
)
)
Due to the fact that there are no prices for items from "Together is cheaper", and the total discount is not transmitted - we need to calculate it somehow now.
As an option - you can make a setting that after adding all the products to the process - based on the total amount of the order [total_sum] => 277, calculate the difference from our orders and add a discount called "Together cheaper" to this difference - will that work?
22.02.2021, 14:40
Original comment available on version: ru

Can you tell me if we should expect an answer? Thanks .
26.02.2021, 11:38
Original comment available on version: ru


Sergey Zubarev wrote:
The fact is that this function is now working very incorrectly for you, so the buyer sees the order on the site https://prnt.sc/103pmoy and everything is correct there, but the order is clumsily included in the box https://prnt.sc/103pqmr, with what such sums are generally impossible to understand.

I do not want to play guessing games with you which solution you like.
Above, I provided a specific output for the order - based on it, indicate how, in your opinion, it is correct to port it into the process - and I will evaluate the improvements for this.
26.02.2021, 11:54
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