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..
I added 4 price types but in Redis only one shows up in Redis..any ideas where I can look into to fi
I added 4 price types but in Redis only one shows up in Redis..any ideas where I can look into to figure out why it ignores the others? Currently trying to get the debugger to run through Spryker\Zed\PriceProductStorage\Business\Storage\PriceProductConcreteStorageWriter
.
Comments
-
-
How am I supposed to show another price if it doesn't get exported to Redis?
0 -
Hey Philipp, you may be confusing a bit *price types* (like default / original) with *price dimensions (*_https://documentation.spryker.com/docs/priceproduct-module-details-reference-information#price-dimension)_ which is another concept. *Price type* in your case is all part of the *default price dimension*
0 -
So inside of your default price dimension you should be able to see prices of a different types. The data structure is like
prices:
dimension: // e.g. βdefaultβ, βmerchant_relationβ β¦
currency: // e.g. CHF, EUR
mode: // e.g. GROSS / NET
type => money_value // e.g. ORIGINAL, DEFAULT => 100
β¦.you should be able to see that in the actual price_product_(abstract/concrete)* redis entries
0 -
oooh....thanks you so much @UKJSE6T47 for clarifying this
0 -
There doesn't seem to be a way to store multiple prices in
spy_price_product
for one concrete product without using price types0 -
neither in
spy_price_product_store
(we just have one store and one currency)0 -
whatβs your business use case?
0 -
we have one store that ships to two countries: Austria & Germany
Customers can be B2B or B2C.
Tax rates are:
Austria B2B: 20% but some products having 0% because of special tariff numbers that are tax exempt
Austria B2C: 20%
Germany B2B: 0%
Germany B2C: 19%I want to store those prices somewhere
0 -
I did get it running with 4 different price types and storing them in the default price table too
0 -
So, for your use-case, if you get the GROSS price mode (with tax already included) - I would suggest to go with the following approach:
1. DE - B2C - use DEFAULT price, which is price with 19%
2. DE - B2B - introduce a merchant relation with dedicated price of 0% (https://documentation.spryker.com/2021080/docs/merchant-custom-prices-feature-overview) - then you would need to assign this relation with all business units of all companies in DE. Later on, for companies with diff % you will be able to create other relations;
3. AT - B2C - use DEFAULT price with 20% included. You donβt need for now any merchant relations since prices there are the same. Products with 0% will just have their price as-is in DEFAULT, too.0 -
In case you have NET mode and you have to calculate taxes on your own - I would need to ask internally if you can do diff taxes per b2c or b2b users..
0 -
In case you get NET prices and need to caclulate / add tax information on your own (based on 20% or whatever) - you could include that logic into the *cart calculation stack* (see CalculationDependencyProvider) and implement your custom logic there - you can have all the context you need - customer, store. So you can query the right % from DB. In that case you can go with
1. DE - DEFAULT NET prices
2. AT - DEFAULT NET prices
3. you need to change the way taxes are stored. We have it per country, but not for b2c/b2b customers.0 -
@UKJSE6T47 Thanks a lot for taking the time to come up with a solution
0 -
the issue with using merchant prices is that the tax calculation needs to be adapted too
0 -
I got things running with several price types - just one small issue left where the shipping costs are grown in gross mode because it just takes the gross price that got calculated with a 20% tax and doesn't get recalculated for Germany's 19% vat
0
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