Coder Social home page Coder Social logo

magento2-module-checkoutadditionalfield's Introduction

Setup step:

  1. copy SR folder inside app/code
  2. var folder permission should be 777
  3. run following command 'php bin/magento setup:upgrade'
  4. var folder permission should be 777

magento2-module-checkoutadditionalfield's People

Contributors

sohelrana09 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

magento2-module-checkoutadditionalfield's Issues

It is not saving in to databse

I have tried this module and it is working on front end, but it is not saving the values in to database. and it is not showing the details in the order in admin

add custom js in SR_CheckoutAdditionalField module

Hi, i added my CheckoutAdditionalField

<?php
namespace SR\CheckoutAdditionalField\Plugin\Checkout\Model\Checkout;


class LayoutProcessor
{
    /**
     * @param \Magento\Checkout\Block\Checkout\LayoutProcessor $subject
     * @param array $jsLayout
     * @return array
     */
    public function afterProcess(
        \Magento\Checkout\Block\Checkout\LayoutProcessor $subject,
        array  $jsLayout
    ) {
        $jsLayout['components']['checkout']['children']['steps']['children']['shipping-step']['children']
        ['shippingAddress']['children']['shipping-address-fieldset']['children']['delivery_date'] = [
            'component' => 'Magento_Ui/js/form/element/abstract',
            'config' => [
                'customScope' => 'shippingAddress',
                'template' => 'ui/form/field',
                'elementTmpl' => 'ui/form/element/radio',
                'options' => [],
                'id' => 'delivery-date'
            ],
            'dataScope' => 'shippingAddress.delivery_date',
            'label' => __('who receives?'),
            'provider' => 'checkoutProvider',
            'visible' => true,
            'validation' => [],
            'sortOrder' => 1,
            'id' => 'delivery-date'
        ];


        return $jsLayout;
    }
}

and i created a new input radio type call radio.html

<!--
/**
 * Copyright © 2016 Magento. All rights reserved.
 * See COPYING.txt for license details.
 */
-->
<style>

    .plchoice {
        display: -ms-flexbox;
        display: flex;
        -ms-flex-align: center;
        align-items: center;
    }

    .pllabel {
        margin-right: 5px;
    }

    .plcheckbox {
        margin-right: 15px !important;
    }


</style>
<div class="choice field plchoice">
    <label class="label pllabel">
        <span >me</span>
    </label>

    <input type="radio" class="checkbox plcheckbox" name="plhr" value="si">

    <label class="label pllabel" id="plen" >
        <span >someone else</span>
    </label>

    <input type="radio" id="no" class="checkbox plcheckbox" name="plhr" value="no">

    <!-- ko if: notice -->
    <div class="field-note" data-bind="attr: {id: noticeId}"><span data-bind="text: notice"></span></div>
    <!-- /ko -->
</div>

i try to empty all the input form went user select someone else or leave full if the user select "me"

i try to do it with javascript but went i create my script below <div class="choice field plchoice"></div> nothing happen..

can you help me to make this thinks work ? thanks.

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.