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 I'm activating promotions-discount-feature in project using documentation

UU41BKMDX
UU41BKMDX Posts: 4 🧑🏻‍🚀 - Cadet
edited June 2021 in Help

Hi
I'm activating promotions-discount-feature in project using documentation https://documentation.spryker.com/docs/promotions-discounts-feature-integration. In Zed is active and operational, but usage in Yves I'm having problem with implementing usage.
1. problem is that in documentation is stated "Take the Pyz\Yves\DiscountPromotion module from demoshop and place it somewhere in your project" but this module does not exist in b2c or in b2b demo shop.
2. problem is for adding discount ID Make sure CartOperationHandler sets ID of idDiscountPromotion but in project there is information
Cart operations must be updated to cover product bundle logic as follows: instead of CartOperationHandler use \Pyz\Yves\Cart\Handler\ProductBundleCartOperationHandler (you can take this from the demoshop) but this also does not exist in demo shop.
Can someone tell how to implement discount and promotion in Yves, or where to see some example.
Thank you

Comments

  • fsmeier
    fsmeier Senior Software Engineer & Developer Enablement Advocate Sprykee Posts: 1,084 ⚖️ - Guardians (admin)

    I reported the misleading documentation reg. the missing demo-shop-module.

    Despite this, where exactly are you stuck? What do you have so far and where do you have problems to combine the functionality?

  • UU41BKMDX
    UU41BKMDX Posts: 4 🧑🏻‍🚀 - Cadet

    First I need to do this, Take the Pyz\Yves\DiscountPromotion module from demoshop and place it somewhere in your project. But in project there is just DiscountPromotionWidget which is already implemented.

  • fsmeier
    fsmeier Senior Software Engineer & Developer Enablement Advocate Sprykee Posts: 1,084 ⚖️ - Guardians (admin)

    Dont focus for now on the line with the Pyz\Yves\DiscountPromotion - as far as I can see on the code-instruction on https://documentation.spryker.com/docs/promotions-discounts-feature-integration (quick look) I dont see where the project level mentioned module should be used 🙂

  • UU41BKMDX
    UU41BKMDX Posts: 4 🧑🏻‍🚀 - Cadet
    edited June 2021

    Ok, I managed to set all which is needed for promotions, and came until part of Make sure CartOperationHandler sets ID of idDiscountPromotion. But in project is information

    Cart operations must be updated to cover product bundle logic as follows: instead of CartOperationHandler use \Pyz\Yves\Cart\Handler\ProductBundleCartOperationHandler (you can take this from the demoshop).
    

    I can't get

    $this->getIdDiscountPromotion()
    
  • fsmeier
    fsmeier Senior Software Engineer & Developer Enablement Advocate Sprykee Posts: 1,084 ⚖️ - Guardians (admin)

    Good morning @UU41BKMDX,
    I just took some minutes to look into your blocker and I discovered that our documentation about the integration of this feature is sadly outdated. I reported it internally so our team can work on improving here.

    To (hopefully) unblock you:
    The feature https://documentation.spryker.com/docs/promotions-discounts-feature-overview is plugged in by default in our https://github.com/spryker-shop/b2c-demo-shop and https://github.com/spryker-shop/b2b-demo-shop - So no need to manually change anything if you used one of these as base for your project.

    Did you use one of these as base? Or is this feature not available in your current project?

  • UU41BKMDX
    UU41BKMDX Posts: 4 🧑🏻‍🚀 - Cadet

    Hello @florian.scholz Thank you for information, our project was created from Spryker-Food-demo. Where was implemented this feature but obviously not until the end, in Zed is operational but in Yves is missing something. I will download b2c-demo-shop from your link and try to see what am I missing for full operational function of the feature.