Giter Site home page Giter Site logo

Comments (3)

mamazu avatar mamazu commented on June 6, 2024

Thanks for reporting your problem. For the issues with your config I don't really have an idea what could be causing it. In general if the TierPrice entity is registered as a resource the service "brille24.tierprice.factory" should be generated by Sylius.

As for the problem with the database. If you already have overwritten the ProductVariantEntity then you want to extend your implementation with the traits provided in the package. There are also some known problems with projects that don't use XML for configuring their entities.

from syliustierpriceplugin.

olia-bn avatar olia-bn commented on June 6, 2024

If you already have overwritten the ProductVariantEntity then you want to extend your implementation with the traits provided in the package

This must be the issue. Stock Sylius installation seems to override all of them by default, so it didn't click in my head, especially since I set up the test env months ago. Maybe it's worth pointing it out for other devs that might not realise this is what happens by default?

There are also some known problems with projects that don't use XML for configuring their entities.

I use annotations indeed. So this might be the case. Any particular git issue you know of that I can look at for more info?

Edit: what I mean by "Sylius overriding the models by default" is that the following config was auto-generated by Sylius when I set up the project. Which counts for an overwritten model class, but being stock, didn't trigger me to follow Tier price bundle's instructions for customised models.

sylius_product:
    resources:
        product:
             ...
        product_variant:
            classes:
                model: App\Entity\Product\ProductVariant

from syliustierpriceplugin.

mamazu avatar mamazu commented on June 6, 2024

Yeah you are completely right, we should add this information to the docs. When I saw Sylius change that behavior ages ago, I ran into the same issue myself. :D

As for your mapping issue, sadly no. If you have time to add attributes to the class to make it extendable that would be great, but other than that I'm not sure there is an open issue for this yet.

from syliustierpriceplugin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.