All Projects → Brille24 → SyliusCustomOptionsPlugin

Brille24 / SyliusCustomOptionsPlugin

Licence: MIT license
A Sylius plugin that adds customer options

Programming Languages

PHP
23972 projects - #3 most used programming language
Twig
543 projects
Gherkin
971 projects

Projects that are alternatives of or similar to SyliusCustomOptionsPlugin

CSGOItemDB
An API to retrieve accurate CS:GO prices for high- and low-tier items
Stars: ✭ 35 (-16.67%)
Mutual labels:  price
7cart
7cart is a php7 project for building online shops, catalogs or service platforms. 7cart built with simple code and database schema. It is easy to support and fast.
Stars: ✭ 27 (-35.71%)
Mutual labels:  cart
SyliusMolliePlugin
Sylius Mollie payment gateway integration.
Stars: ✭ 1 (-97.62%)
Mutual labels:  sylius
stylez
dark css style overrides for sites i use
Stars: ✭ 38 (-9.52%)
Mutual labels:  customization
Quotes
Quotes Status Creator lets you share quotations as status images on social media
Stars: ✭ 31 (-26.19%)
Mutual labels:  customization
swa-price-drop
Check for Southwest Airlines price drops for specific outbound and return flight numbers.
Stars: ✭ 14 (-66.67%)
Mutual labels:  price
Edit-About
Customize your About This Mac!
Stars: ✭ 40 (-4.76%)
Mutual labels:  customization
coinmarketcap
Price and market capitalization from coinmarketcap.com
Stars: ✭ 73 (+73.81%)
Mutual labels:  price
pico-test
⚡ PICO-8 testing framework
Stars: ✭ 33 (-21.43%)
Mutual labels:  cart
nextjs-woocommerce-restapi
A React WooCommerce Project Example With REST API
Stars: ✭ 168 (+300%)
Mutual labels:  cart
WebgriffeSyliusTableRateShippingPlugin
Sylius plugin which allows to define shipping rates using weight/rate tables.
Stars: ✭ 13 (-69.05%)
Mutual labels:  sylius
urmusic
An application to make your own music visualizer, easily and for free!
Stars: ✭ 52 (+23.81%)
Mutual labels:  customization
dotmailer-magento-extension
The official Engagement Cloud for Magento extension
Stars: ✭ 14 (-66.67%)
Mutual labels:  cart
react-use-cart
React hook library for managing cart state
Stars: ✭ 297 (+607.14%)
Mutual labels:  cart
FancyMenu
Source code for the FancyMenu mod.
Stars: ✭ 93 (+121.43%)
Mutual labels:  customization
clay.css
Easily add claymorphic styles to any HTML element with this micro class and SASS mixin.
Stars: ✭ 439 (+945.24%)
Mutual labels:  customization
enhavo
Modern CMS with shop features based on fullstack symfony and sylius components
Stars: ✭ 80 (+90.48%)
Mutual labels:  sylius
wm4noobs
Vire um mago do Linux usando window manager. Become a Linux wizard using window manager. i3wm fan guide in portuguese.
Stars: ✭ 97 (+130.95%)
Mutual labels:  customization
Shopping-Cart-MERN
💸 Simple Online Shopping Cart made with the MERN Stack
Stars: ✭ 34 (-19.05%)
Mutual labels:  cart
joof
🌎💨 Add custom JavaScript or CSS to any webpage
Stars: ✭ 26 (-38.1%)
Mutual labels:  customization

Customer Options

With this plugin the customer can add additional info to the product like so: Price import forms Price import forms

Installation

  • Run composer require brille24/sylius-customer-options-plugin.

  • Register the Plugin in your config/bundles.php:

return [
    //...
    Brille24\SyliusCustomerOptionsPlugin\Brille24SyliusCustomerOptionsPlugin::class => ['all' => true],
];
  • Add the config.yml to your local config/packages/_sylius.yaml:
imports:
    ...
    - { resource: "@Brille24SyliusCustomerOptionsPlugin/Resources/config/app/config.yml" }
  • Add the routing.yml to your local config/routes.yaml:
brille24_customer_options:
    resource: "@Brille24SyliusCustomerOptionsPlugin/Resources/config/app/routing.yml"
  • Copy the template overrides from the plugin directory
From: [shop_dir]/vendor/brille24/sylius-customer-options-plugin/test/Application/templates
To: [shop_dir]/templates

In order to use the customer options, you need to override the product and order item.

use Brille24\SyliusCustomerOptionsPlugin\Entity\ProductInterface;
use Brille24\SyliusCustomerOptionsPlugin\Traits\ProductCustomerOptionCapableTrait;
use Sylius\Component\Core\Model\Product as BaseProduct;

class Product extends BaseProduct implements ProductInterface {
    use ProductCustomerOptionCapableTrait {
        __construct as protected customerOptionCapableConstructor;
    }
    
     public function __construct()
    {
        parent::__construct();

        $this->customerOptionCapableConstructor();
    }
    // ...
}
use Brille24\SyliusCustomerOptionsPlugin\Entity\OrderItemInterface;
use Brille24\SyliusCustomerOptionsPlugin\Traits\OrderItemCustomerOptionCapableTrait;
use Sylius\Component\Core\Model\OrderItem as BaseOrderItem;

class OrderItem extends BaseOrderItem implements OrderItemInterface
{
    use OrderItemCustomerOptionCapableTrait {
        __construct as protected customerOptionCapableConstructor;
    }

    public function __construct()
    {
        parent::__construct();

        $this->customerOptionCapableConstructor();
    }
    // ...
}
  • If you also want default data you need to copy over the brille24_sylius_customer_options_plugin_fixtures.yaml file from the package directory and run
bin/console sylius:fixtures:load
  • Finally, update the database and update the translations:
bin/console doctrine:migrations:migrate
bin/console translation:update

Things to consider

  • Saving files as customer defined values as the values are currently stored as a string in the database

Developing

When developing it is recommended to use git hooks for this just copy the docs/pre-commit to .git/hooks/pre-commit and make it executable. Then you will check your codestyle before committing.

Usage

Documentation on how to use the plugin can be found here.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].