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..

Hello. Any idea to delete a cart completely (and creating a new one afterwards) without accessing th

Posts: 509 ๐Ÿง‘๐Ÿปโ€๐Ÿš€ - Cadet

Hello. Any idea to delete a cart completely (and creating a new one afterwards) without accessing the db directly? The customer can just have one cart, so adding another is not possible. Also deleting the cart is therefore not possible because there must be at least one cart. The background to this question: We changed the tax rate from 7% to 5% in spryker backend. However, when we add an item to the cart, the carts calculation object still responds with the old 7% which leads for all products to a compeltely wrong calculation โ€ฆ i guess that the taxrate is saved along the quote json in the db and was not changed when we changed the tax rate in backend โ€ฆ so, how to remove it from there without making any direct database access? any other ideas?

Welcome!

It looks like you're new here. Sign in or register to get started.

Comments

  • Posts: 509 ๐Ÿง‘๐Ÿปโ€๐Ÿš€ - Cadet

    okay, following this https://documentation.spryker.com/docs/howto-get-ready-for-vat-tax-changes-in-germany there shouldnt be any taxrate saved along a quote โ€ฆ so i dont know why the calculation still is pulling 7% instead of 5% in backend

  • Posts: 509 ๐Ÿง‘๐Ÿปโ€๐Ÿš€ - Cadet

    So how get the tax rate mapped to the product? In the product there is just โ€œIncreased tax for exampleโ€ and there is a tax set for โ€œGermanyโ€ which is then 19% for example โ€ฆ but the store name differs completely โ€ฆ how get the tax selected?

  • Hi @UPWG9AYH2! Just taking a look on the db (havenโ€™t check the code itself, so, maybe you can get more info there) the tax is related to the country and not related to the store (directly) on the spy_tax_rate and then the relation with the tax set is stored on spy_tax_set_tax and the relation between the tax set and the product is on spy_tax_product_storage

  • Posts: 509 ๐Ÿง‘๐Ÿปโ€๐Ÿš€ - Cadet

    But which country? The country of the customer?

  • Posts: 509 ๐Ÿง‘๐Ÿปโ€๐Ÿš€ - Cadet

    Or is there a country to set when creating the cart?

  • Posts: 509 ๐Ÿง‘๐Ÿปโ€๐Ÿš€ - Cadet

    Ok, i think we detected the problem and found a workaround but we still need some clarification why is it how it is for the future

  • SRE @ Spryker Sprykee Posts: 1,654 โœจ - Novice

    Please post the problem and the workaround so I could clarify internally then. ๐Ÿ™‚

  • Posts: 509 ๐Ÿง‘๐Ÿปโ€๐Ÿš€ - Cadet

    So in the backend for a customers address there is a field country which holds options that are configured in the store.php โ€ฆ since we have no restrictions for countries of our customer, we included a huge array with all possible country codes in the store.php โ€ฆ now we found out, that there is a kind of default behaviour for taxes in spryker, so โ€œdefault is the first entryโ€ of this array which leads for the tax calculation to an error because it is AC โ€œAscendia islandโ€. So no matter what taxes we choose in the tax settings, it will allways match to the taxes set in the country code AC, even if the customer has set the country โ€œDEโ€ โ€ฆ so now we would like to know, how this is working and we can set that properly. Thanks a lot and have a nice weekend

  • Support Engineer @ Spryker Posts: 289 ๐Ÿ› - Council (mod)

    @UPWG9AYH2 just to give you a small update on this one. We have forwarded it to the internal subject matter expert for this topic. I will keep you up to date.

  • Support Engineer @ Spryker Posts: 289 ๐Ÿ› - Council (mod)

    Hey @UPWG9AYH2 if i try to reproduce your setup (i.e. include additonal countries in stores.php), set up a different tax for them and then assign the tax in the tax sets for my products everything is calculated correctly. The Tax for the country i select is correctly applied. Am i missing something?

  • Posts: 38 ๐Ÿง‘๐Ÿปโ€๐Ÿš€ - Cadet

    Any news here?

  • Support Engineer @ Spryker Posts: 289 ๐Ÿ› - Council (mod)

    I could not reproduce the problem. @UMVENKCBF do you have this suspected problem with the tax calculation, as well?

Welcome!

It looks like you're new here. Sign in or register to get started.