Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Dominik
    @dpfaffenbauer
    just use default Entity Path, makes life so much easier and the path is registered by doctrine by default
    So AppBundle\Entity
    I will adapt documentation about that
    Valentin
    @valentin-

    Hi, depending on the login state I'd like to switch between Login/Logout in the header menu. Similar to the demo I've created a controller to include those links.

    When calling the getCustomer() method, the service is not available:

    $customer = $this->get(CustomerContextInterface::class)->getCustomer();

    Service "CoreShop\Component\Customer\Context\CustomerContextInterface" not found: even though it exists in the app's container, the container inside "App\Controller\LayoutController" is a smaller service locator that only knows about the "doctrine", "form.factory", "http_kernel", "message_bus", "messenger.default_bus", "parameter_bag", "request_stack", "router", "security.authorization_checker", "security.csrf.token_manager", "security.token_storage", "serializer", "session" and "twig" services. Try using dependency injection instead.

    Did I miss something in the install process? How can i access the CoreShop Services in App context directly?

    4 replies
    Valentin
    @valentin-
    Hi, as explained in the Docs (https://docs.coreshop.org/2.1.0/Development/Products/Multiple_Product_DataObjects.html) I've created a custom product type and used ProductSet as example. According to bin/console debug:config app it looks like it's registered correctly. Unfortunately $this->get('coreshop.repository.stack.purchasable')->findAll()doesn't list the custom products. Is there anything else to consider about custom Product Objects?
    13 replies
    Valentin
    @valentin-
    Hi, I need registration forms for two different user types (customer, dealer). I've created a separate Controller and FormType. I removed the gender field ($builder->remove('gender')), but the form is still validating this field (gender should not be blank). I've also tried to override the validation.yaml for the Customer object but it doesn't have any effect. Does anyone have an idea what's causing the issue?
    4 replies
    brainium
    @brainium

    Hey guys... anyone knows how to deal with this error, while installing coreshop:

    Invalid configuration for path "payum.security.token_storage": Only one token storage could be configured.

    Michał Filik
    @michalfilik
    Hello. I have cart price rules which are based on adjustments. They stopped working with coreshop 3 - orderItem adjustment total is not added to order Total. Is that the current way of totals calculation ? Or bug in my code ?
    JustMe69
    @JustMe69

    Hi,
    followed docs for adding custom checkout step:
    https://docs.coreshop.org/2.2.0/Development/Checkout/Checkout_Manager.html
    using coreshop 3 beta-1

    copied shipment step from core as own step, as first try.
    file config/config.yaml:

    core_shop_core:
        checkout:
            default:
                steps:
                    shipment: false
                    payment: false          # disables the payment step
    
                    custom:
                        step: app.coreshop.checkout.custom
                        priority: 30

    file bundles/FrontendBundle/Resources/config/services.yml:

        FrontendBundle\CoreShop\Checkout\Step\PackagingShippingCheckoutStep:
            public: true
            arguments:
                - '@CoreShop\Component\Shipping\Validator\ShippableCarrierValidatorInterface'
                - '@form.factory'
                - '@CoreShop\Component\Order\Manager\CartManagerInterface'
    
        app.coreshop.checkout.custom:
            alias: FrontendBundle\CoreShop\Checkout\Step\PackagingShippingCheckoutStep

    file bundles/FrontendBundle/CoreShop/Checkout/Step/PackagingShippingCheckoutStep.php
    ```
    <?php

    declare(strict_types=1);

    namespace FrontendBundle\CoreShop\Checkout\Step;

    use CoreShop\Bundle\CoreBundle\Form\Type\Checkout\CarrierType;
    use CoreShop\Component\Address\Model\AddressInterface;
    use CoreShop\Component\Core\Model\CarrierInterface;
    use CoreShop\Component\Order\Checkout\CheckoutException;
    use CoreShop\Component\Order\Checkout\CheckoutStepInterface;
    use CoreShop\Component\Order\Checkout\OptionalCheckoutStepInterface;
    use CoreShop\Component\Order\Checkout\ValidationCheckoutStepInterface;
    use CoreShop\Component\Order\Manager\CartManagerInterface;
    use CoreShop\Component\Order\Model\OrderInterface;
    use CoreShop\Component\Shipping\Validator\ShippableCarrierValidatorInterface;
    use Symfony\Component\Form\FormFactoryInterface;
    use Symfony\Component\Form\FormInterface;
    use Symfony\Component\HttpFoundation\Request;
    use Webmozart\Assert\Assert;

    class PackagingShippingCheckoutStep implements CheckoutStepInterface, OptionalCheckoutStepInterface, ValidationCheckoutStepInterface
    {
    public function __construct(
    private ShippableCarrierValidatorInterface $shippableCarrierValidator,
    private FormFactoryInterface $formFactory,
    private CartManagerInterface $cartManager)
    {
    }

    public function getIdentifier(): string
    {
        return 'pack_shipping';
    }
    
    public function isRequired(OrderInterface $cart): bool
    {
        Assert::isInstanceOf($cart, \CoreShop\Component\Core\Model\OrderInterface::class);
    
        return $cart->hasShippableItems();
    }
    
    public function doAutoForward(OrderInterface $cart): bool
    {
        Assert::isInstanceOf($cart, \CoreShop\Component\Core\Model\OrderInterface::class);
    
        return $cart->hasShippableItems() === false;
    }
    
    public function validate(OrderInterface $cart): bool
    {
        Assert::isInstanceOf($cart, \CoreShop\Component\Core\Model\OrderInterface::class);
    
        return $cart->hasShippableItems() === false
            || ($cart->hasItems() &&
                $cart->getCarrier() instanceof CarrierInterface &&
                $cart->getShippingAddress() instanceof AddressInterface &&
                $this->shippableCarrierValidator->isCarrierValid($cart->getCarrier(), $cart, $cart->getShippingAddress()));
    }
    
    public function commitStep(OrderInterface $cart, Request $request): bool
    {
        $form = $this->createForm($request, $cart);
    
        if ($form->isSubmitted()) {
            if ($form->isValid()) {
                $cart = $form->getData();
    
                $this->cartManager->persistCart($cart);
    
                return true;
            }
    
            throw new CheckoutException('Shipping Form is invalid', 'coreshop.ui.error.coreshop_checkout_shipping_form_invalid');
        }
    
        return false;
    }
    
    public function prepareStep(OrderInterface $cart, Request $request): array
    {
        return [
            'form' => $this->createForm($request, $cart)->createView(),
        ];
    }
        private function createForm(Request $request, OrderInterface $cart): FormInterface
        {
            $form = $this->formFactory->createNamed('coreshop', CarrierType::class, $cart, [
                'cart' => $cart,
            ]);
    
            if ($request->isMethod('post')) {
                $form = $form->handleRequest($request);
            }
    
            return $form;
        }
    }

    I can call FE. When putting article in cart I get:

    CoreShop\Component\Registry\PrioritizedServiceRegistry::getIndex(): Return value must be of type int, bool returned

    I measn https://docs.coreshop.org/2.2.0/Development/Checkout/Checkout_Step.html

    What's wrong/missing?

    Dominik
    @dpfaffenbauer
    @JustMe69 might be a bug
    can you file a issue pls
    JustMe69
    @JustMe69
    #1806 created
    Valentin
    @valentin-
    Hi, I need to retrieve the shipping rule for a completed order. Only the carrier is stored in the order object. What's the best way to get the shipping rule item for an order object?
    Dominik
    @dpfaffenbauer
    @valentin- why do you need it? the shipping-rule only determines the carrier and the shipping price, that is the sole porpuse of it
    6 replies
    JustMe69
    @JustMe69
    Hi,
    is there an easy way to check (on custom checkout step, maybe in twig), if delivery is inside EU or outside EU? Addresses (delivery, invoice) are already chosen/set a step before.
    Lennart Fries
    @Cruiser13
    You can check for the zone but you'll need extra rules for GB and CH.
    3 replies
    JustMe69
    @JustMe69
    Hi,
    How can I manage it to use a configured shipping-rule by users choice. rule is not bound to a carrier?
    Shop-User wants documents (invoice etc) sended by post, not email.
    So - only if user selects specific option, shipping rule will be applied to shipping-costs?
    Other carrier-options are still available and selectable, not depending on this option
    Dominik
    @dpfaffenbauer
    not possible. you completely mis-use the concept of shipping rules
    JustMe69
    @JustMe69
    Hi,
    I have an own ProductType created, related to https://docs.coreshop.org/2.1.0/Development/Products/Multiple_Product_DataObjects.html
    I can put this product into cart and buy it. I'm currently using coreshop 3 beta 2
    In the category-listing, my products are not shown, not listed. Only products of type CoreShopProduct are listed. My custom products are added to category and store, and set to 'active'
    Calling the detail-slug, I can see the detail page of the product, but not in the category-listing of related category.
    There is no error or warning displayed, the product ist just not included in the listing.
    How can I see my product-type in the category-listing?
    How can I see a list of products with type CoreShopProduct , MyProductObject1, MyProductObject2 ?
    Is there a configuration missing ?
    Dominik
    @dpfaffenbauer
    there is no listing of custom product types in the „demo"
    JustMe69
    @JustMe69
    so - what has to be defined/done to see custom product types in category listing? What has to be extended to see CoreShopProducts and custom product types?
    m0nken
    @m0nken
    Hi,
    I have seen that the ShippingBundle allows to set up ShippingRules for triggering certain shipping related actions based on certain conditions. As far as I have seen, the PaymentBundle does not allow to set up PaymentRules in a similar way. Would you say that adding PaymentRules to the PaymentBundle seems a good idea or is a different approach suggested? I was thinking of maybe prohibiting certain payment options based on the selected shipping option. For example I would like to only allow payment via 'cash on pickup' if the selected shipping option is 'shop pickup'. Another case would be to add additional costs if the selected payment option is 'cash on delivery'.
    2 replies
    Michael Albrecht
    @mike4git
    Does anyone know how to configure automatically open orders by Coreshop view instead of Pimcore default view?
    2 replies
    Valentin
    @valentin-

    Hi, I want to extend the CoreShopOrder class with a Custom class to add methods used in the confirmation mail. At the checkout step /de/shop/checkout/address following error is triggered

    Model with class "App\Model\DataObject\CoreShopOrder" does not exist -> vendor/coreshop/core-shop/src/CoreShop/Component/Resource/Metadata/Registry.php:43

    Do I have to register the Custom Model in the CoreShop Metadata Registry?

    1 reply
    Valentin
    @valentin-
    Hi @ramundomario, I've installed the Payum and Stripe Bundles using Coreshop 3. After the payment has been completed (using stripe_checkout), I'm stuck on the payment page and won't get redirected to the website confirmation page. Is additional configuration required?
    1 reply
    JustMe69
    @JustMe69

    so - what has to be defined/done to see custom product types in category listing? What has to be extended to see CoreShopProducts and custom product types?

    any hints on that?

    Luka Bradesko
    @Bradeskojest

    Hi, when updating Pimcore from 6.9 to X, I got to this error

    Script Pimcore\Composer::clearCache handling the pimcore-scripts event terminated with an exception                                                                                                                                                                                                                                                                                                                                                                                                                                         [RuntimeException]                                                                                                                                                            An error occurred when executing the "/usr/local/bin/php --php-ini=/usr/local/etc/php/php.ini bin/console --ansi cache:clear --no-warmup" command:                          
      Exit code: 255
    
      Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException {#6164
        -id: "security.authentication.provider.dao"
        -sourceId: null
        -alternatives: []
        #message: "You have requested a non-existent service "security.authentication.provider.dao"."
        #code: 0
        #file: "./vendor/symfony/dependency-injection/ContainerBuilder.php"
        #line: 996                                                                                                                                                                    trace: {
          ./vendor/symfony/dependency-injection/ContainerBuilder.php:996 { …}
          ./vendor/symfony/dependency-injection/ContainerBuilder.php:1028 { …}
          ./vendor/pimcore/pimcore/bundles/CoreBundle/DependencyInjection/Compiler/PasswordFactoryDecoratorPass.php:35 { …}                                                             ./vendor/symfony/dependency-injection/Compiler/Compiler.php:82 { …}
          ./vendor/symfony/dependency-injection/ContainerBuilder.php:757 { …}                                                                                                           ./vendor/symfony/http-kernel/Kernel.php:548 { …}
          ./vendor/pimcore/pimcore/lib/Kernel.php:237 { …}                                                                                                                              ./vendor/symfony/http-kernel/Kernel.php:789 { …}
          ./vendor/symfony/http-kernel/Kernel.php:128 { …}                                                                                                                              ./vendor/pimcore/pimcore/lib/Kernel.php:216 { …}
          ./vendor/pimcore/pimcore/lib/Bootstrap.php:255 { …}
          ./vendor/pimcore/pimcore/lib/Bootstrap.php:60 { …}
          ./bin/console:34 {
            › /** @var \Pimcore\Kernel $kernel */
            › $kernel = \Pimcore\Bootstrap::startupCli();
            › $application = new \Pimcore\Console\Application($kernel);
          }
        }
      }

    Any hint will be very appreciated

    1 reply
    Peter Eberle
    @petereberlecom
    Hi all, does anyone know how to properly install themes in pimcore version 10+. As there is no app/resources folder anymore see docu
    6 replies
    Dominik
    @dpfaffenbauer
    Bildschirmfoto 2022-01-31 um 07.35.08.png
    xonu
    @xonu

    If you try to login as customer, the following error/exception occurs: "You must configure the check path to be handled by the firewall."

    This happens not only in my installation but also in the official demo shop:
    https://demox.coreshop.org/en/shop/login

    How to fix?

    2 replies
    Andi
    @hadl
    Is there a way to change the execution order of cart price rules?
    4 replies
    Lennart Fries
    @Cruiser13
    What would be the best practice to disable the purchase of a product in certain countries? I thought of adding some "blacklisted countries" to product class and extending the cart controller to check if the items in cart have blacklisted countries and if so if they match the shipping country. But maybe there is some event listener more suitable for this?
    2 replies
    Valentin
    @valentin-
    @dpfaffenbauer thanks for the fix coreshop/CoreShop#1877. As mentioned in the issue I've received the mail for the order confirmation 2 times. After installing the update I get the confirmation mail 3 times. Does it work correctly in your testing environment?
    Dominik
    @dpfaffenbauer
    @valentin- Yes. Check your notification rules… there might be something wrongly configured
    Prateek Suhane
    @psuhane
    Hi All
    a quick question - In case of session, the full page cache doesn't work. How this will be achieved in case of ecommerce?
    because there is always a session in case of ecommerce
    JustMe69
    @JustMe69
    Hi, somebody knows how to get a list of defined porductUnits (CoreShop/Component/Product/Model/ProductUnit) in code?
    I want to add (via code) additional productUnits to a product.
    These data-classes are no pimcore-objects just AbstractResources, so a getById() / Listing is not possible.
    Daniel Diesenreither
    @siwa-ddiesenreither
    Hi,
    a bug has been introduced in version 2.2.12 on https://github.com/coreshop/CoreShop/blob/2.2/src/CoreShop/Bundle/ResourceBundle/Controller/ResourceSettingsController.php line 55 -> 58 ... is there a contribution guide or do i need to open an issue in github?
    Dominik
    @dpfaffenbauer
    @siwa-ddiesenreither just create a issue and PR if you know the fix
    Valentin
    @valentin-
    Hi, what's best practice to migrate database changes when updating coreshop without resetting the whole scheme?
    Dominik
    @dpfaffenbauer
    run the migrations?
    Lennart Fries
    @Cruiser13
    Looks like coreshop domain including demo is offline @dpfaffenbauer
    https://downforeveryoneorjustme.com/coreshop.org?www=1
    Dominik
    @dpfaffenbauer
    doing some domain changes and moving stuff to different servers
    Dominik
    @dpfaffenbauer
    btw demo2 will be removed anyway, demo3.coreshop.org is the way to go now. that runs on kubernetes btw ;)
    daobilisim
    @daobilisim
    Hi,
    is there any documentation about using CMF with coreshop?
    2 replies
    Rushit Khunt
    @rushit-credencys
    Hi @dpfaffenbauer we are facing an issue while upgrading the coreshop
    can u pls check the issue which I have posted here-> https://github.com/pimcore/pimcore/discussions/12106
    Dominik
    @dpfaffenbauer
    try updating to latest version, we fixed something there
    Rushit Khunt
    @rushit-credencys
    do u have any Upgradation document link?