Giter VIP home page Giter VIP logo

syliusordernowplugin's Introduction

This plugin adds a small form to each and every product card in the shop. The form allows customers to add products to their cart without having to visit the product detail and cart summary page.

product_cards

As can be seen in the image above, this works best when using the "match" product variant selection method. Please see the official Sylius documentation on how to setup the product variant selection method in the shop.

Supported Sylius versions:
1.10

NOTE: This plugin requires PHP 7.4 or up

Installation:

  1. Install using composer:

    composer require nedac/sylius-order-now-plugin
  2. If you have overridden the ProductAssociation, Product and/or ProductReview controller in your project, please make sure they use the corresponding trait:

    • ProductAssociation -> Nedac\SyliusOrderNowPlugin\Controller\ProductAssociationControllerTrait
    • Product -> Nedac\SyliusOrderNowPlugin\Controller\ProductControllerTrait
    • ProductReview -> Nedac\SyliusOrderNowPlugin\Controller\ProductReviewTrait

    NOTE: If the methods in the traits have already been implemented in the controller in your project then the logic will have to be merged.

  3. If you have overridden controllers in your project and you've gone through step 2, please do not change your Sylius configuration for those controllers. Otherwise:

    # config/packages/_sylius.yaml
    
    # ...
    
    sylius_product:
        resources:
            product:
                classes:
                    controller: Nedac\SyliusOrderNowPlugin\Controller\ProductController
            product_association:
                classes:
                    controller: Nedac\SyliusOrderNowPlugin\Controller\ProductAssociationController
    
    # ...
    
    sylius_review:
        resources:
            product:
                review:
                    classes:
                        controller: Nedac\SyliusOrderNowPlugin\Controller\ProductReviewController
  4. Install assets:

    bin/console sylius:install:assets

It might be necessary to clear the cache after installation:

bin/console cache:clear

The plugin should now be successfully installed.

syliusordernowplugin's People

Contributors

nedac-sorbo avatar 4c0n avatar

Stargazers

Reyo Stallenberg avatar Bartłomiej Kuleszewicz avatar Webdesign29 avatar  avatar Dmitrijs Čornobiļs avatar

Watchers

 avatar  avatar  avatar

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.