What are the Slack Archives?
Itβs a history of our time together in the Slack Community! Thereβs a ton of knowledge in here, so feel free to search through the archives for a possible answer to your question.
Because this space is not active, you wonβt be able to create a new post or comment here. If you have a question or want to start a discussion about something, head over to our categories and pick one to post in! You can always refer back to a post from Slack Archives if needed; just copy the link to use it as a reference..
Hi, has anyone had the behaviour, that items in an orderEntity have a wrong price when the quantity
Hi,
has anyone had the behaviour, that items in an orderEntity have a wrong price when the quantity is >= 10?
It seems like the quantity is involved while calculating the NetPrice π€. Didn't find the spot yet.
Example: I have an item which costs 194.90β¬.
Quantity 11:
$orderItem[1]->getNetPrice(); // returns 214390 -> 2143,90β¬Β per item
Quantity 9:
$orderItem[1]->getNetPrice(); // returns 19490 -> 194,90β¬Β per item
Comments
-
Any discount activated?
0 -
Is visible in the order details. Down at the bottom.
0 -
No active discounts besides free shipping from 29β¬
0 -
Hmm ok.
0 -
B2C or B2B?
0 -
B2B Suite
0 -
Got my Test B2C running and can not recreate the issue.
10 * 406,51
0 -
Just found out that the Quantity seems to be wrong, too.
I just placed an order with
4x Product A
13x Product BThere's an array $orderItems passed to our payCommand.
For this 17 products I get this:count($orderItems) // returns 5
As soon as I get down to below 10 products
4x Product A
9x Product Bcount($orderItems) // returns 13
0 -
Holy - did you try to use "xdebug". Or have you any clue where the "count" is implemented?
0 -
I am using xdebug, but unfortunately it doesn't apply on this file. Breakpoints aren't pausing.. It is executed, I am logging the results instead of sending an order over and over while testing..
I am writing an xml upon receiving an order, there I take use of count(..)
0 -
Hmm - Sorry can't help you with this.
Maybe one from spryker dev-team?
0 -
is volume prices feature enabled and used?
0 -
Can't find
volume
at all insrc/Pyz/Zed/Calculation/CalculationDependencyProvider.php
, so I think it isn't used.0 -
itβs related to Prices.
PriceProductVolumeExtractorPlugin
in
\Pyz\Zed\PriceProduct\PriceProductDependencyProvider
0 -
Thanks! It's in use.
0 -
but still you need to have volumes in price data import
0 -
We aren't taking use of this module at all π I'll remove it asap.
Do you think that this module could cause this? I'd expect the prices to go down instead of up if there's a default mode with volume pricesπ
0 -
We have functionality that splits items. By default all items in order split if quantity less than 10
0 -
Thanks for this information @UR1QYK8MC π
0 -
In your case:
β’ qty=11 meant Iβll have 1 item with qty=11
β’ qty=9 means Iβll have 9 items with qty=10 -
Got it, this is what I experienced and I wondered where it comes from.
So, is this applyable on the NetPrice, too? So I have
qty=11, which results in 1 item with price*=11?
0 -
exactly
0 -
Why did you invent this functionality? Don't really get the usecase behind it π€
0 -
In case if you have some item with qty=100 itβs hard to display in back office all those items. And all those items will be processed separately by OMS.
0 -
Alright, actually expected something like this. In our usecase we're summarizing products with the same sku after checkout anyway.
Thank you for your help π
To bring this to an end: I'll refactor our checkout XML writer and check
if($item>getQuantity() >= 10)
before I separate the wrapped up products again.0 -
This functionality managed by this plugin stack:
\Spryker\Zed\SalesExtension\Dependency\Plugin\ItemTransformerStrategyPluginInterface
if it might help you to understand how it works0 -
I just had a look at the
ItemTransformerStrategyPluginInterface
and where it's implemented/ used.What I couldn't find was the line, where the quantity is checked to summarize items of same amount (would've expected an easy if statement π ). Can you tell me where I can find it?
I want to summarize every item in an orderEntity.0 -
Hey Daniel! There is constant that represents quantity threshold
\Pyz\Zed\SalesQuantity\SalesQuantityConfig::ITEM_NONSPLIT_QUANTITY_THRESHOLD0
Categories
- All Categories
- 42 Getting Started & Guidelines
- 7 Getting Started in the Community
- 8 Additional Resources
- 7 Community Ideas and Feedback
- 76 Spryker News
- 929 Developer Corner
- 787 Spryker Development
- 89 Spryker Dev Environment
- 362 Spryker Releases
- 3 Oryx frontend framework
- 35 Propel ORM
- 68 Community Projects
- 3 Community Ideation Board
- 30 Hackathon
- 3 PHP Bridge
- 6 Gacela Project
- 26 Job Opportunities
- 3.2K π Slack Archives
- 116 Academy
- 5 Business Users
- 370 Docker
- 551 Slack General
- 2K Help
- 75 Knowledge Sharing
- 6 Random Stuff
- 4 Code Testing
- 32 Product & Business Questions
- 70 Spryker Safari Questions
- 50 Random