commerce – Using rules to Flag a Product Display Node on Checkout

Every user is supposed to purchase Particular product only once.

So i have a view to list the Product Display which by using FLAG module i can list only Unflagged Product Display nodes (Products which are yet to be purchased).

The issue now is how to use Rules to Flag the Product Display node on checkout Completion.

Note: i am using Drupal 7.

Your help will be appreciated.

magento2 – How to add custom checkout form in checkout step in magento 2?

I want to need to add three form field in my custom checkout step and also they save in data base
here below mention my code ho can i add that form mention in screenshoot to this custom checkout step

Vendor/module/view/frontend/web/template/checkout/mystep.html

<!--The 'step_code' value from the .js file should be used-->
<li id="mynewstep" data-bind="fadeVisible: isVisible">
<div class="step-title" data-bind="i18n: 'Contact'" data-role="title"></div>
    <div id="checkout-step-title"
         class="step-content"
         data-role="content">

        <form data-bind="submit: navigateToNextStep" novalidate="novalidate">
            <div class="actions-toolbar">
                <div class="primary">
                    <button data-role="opc-continue" type="submit" class="button action continue primary">
                        <span><!-- ko i18n: 'Next'--><!-- /ko --></span>
                    </button>
                </div>
            </div>
        </form>
    </div>
</li>

Vendor/module/view/frontend/web/js/view/checkout/my-step-view.js

define(
(
    'ko',
    'uiComponent',
    'underscore',
    'Magento_Checkout/js/model/step-navigator'
),
function (
    ko,
    Component,
    _,
    stepNavigator
) {
    'use strict';
    /**
    *
    * mystep - is the name of the component's .html template,
    * my_module - is the name of the your module directory.
    *
    */
    return Component.extend({
        defaults: {
            template: 'vendor_module/checkout/mystep'
        },

        //add here your logic to display step,
        isVisible: ko.observable(false),


        initialize: function () {
            this._super();
            // register your step
            stepNavigator.registerStep(
                //step code will be used as step content id in the component template
                'contact',
                //step alias                    
                'contact',
                //step title value
                'Contact',
                //observable property with logic when display step or hide step
                this.isVisible,

                _.bind(this.navigate, this),

                /**
                    * sort order value
                    * 'sort order value' < 10: step displays before shipping step;
                    * 10 < 'sort order value' < 20 : step displays between shipping and payment step
                    * 'sort order value' > 20 : step displays after payment step
                */
                15
            );

            return this;
        },

        /**
                    * The navigate() method is responsible for navigation between checkout step
                    * during checkout. You can add custom logic, for example some conditions
                    * for switching to your custom step
                    */
        navigate: function () {
            var self = this;
            //getPaymentInformation().done(function () {
                self.isVisible(true);
           // });

        },
             onSubmit: function() {
        // trigger form validation
        this.source.set('params.invalid', false);
        this.source.trigger('customCheckoutForm.data.validate');

        // verify that form data is valid
        if (!this.source.get('params.invalid')) {
            // data is retrieved from data provider by value of the customScope property
            var formData = this.source.get('customCheckoutForm');
            // do something with form data
            console.dir(formData);
        }
    },

        navigateToNextStep: function () {
            stepNavigator.next();
        }
    });
} );

vendor/module/view/frontend/layout/checkout_index_index.xml

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="1column" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <referenceBlock name="checkout.root">
                <arguments>
                    <argument name="jsLayout" xsi:type="array">
                        <item name="components" xsi:type="array">
                            <item name="checkout" xsi:type="array">
                                <item name="children" xsi:type="array">
                                    <item name="steps" xsi:type="array">
                                        <item name="children" xsi:type="array">
                                            <item name="contact" xsi:type="array">
                                                <item name="component" xsi:type="string">vendor_module/js/view/checkout/my-step-view</item>
                                                    <!--To display step content before shipping step "sortOrder" value should be < 1-->
                                                    <!--To display step content between shipping step and payment step  1 < "sortOrder" < 2 -->
                                                    <!--To display step content after payment step "sortOrder" > 2 -->
                                                <item name="sortOrder" xsi:type="string">0</item>
                                                <item name="children" xsi:type="array">
                                                    <!--add here child component declaration for your step-->
                                                </item>
                                            </item>
                                        </item>
                                    </item>
                                </item>
                            </item>
                        </item>
                    </argument>
                </arguments>
        </referenceBlock>
    </body>
</page>

enter image description here

i wan add like that mention in image

magento2 – How can i add three form field in my custom checkout step in magento 2

I want to need to add three form field in my custom checkout step and also they save in data base
here below mention my code

Vendor/module/view/frontend/web/template/checkout/mystep.html

<!--The 'step_code' value from the .js file should be used-->
<li id="mynewstep" data-bind="fadeVisible: isVisible">
<div class="step-title" data-bind="i18n: 'Contact'" data-role="title"></div>
    <div id="checkout-step-title"
         class="step-content"
         data-role="content">

        <form data-bind="submit: navigateToNextStep" novalidate="novalidate">
            <div class="actions-toolbar">
                <div class="primary">
                    <button data-role="opc-continue" type="submit" class="button action continue primary">
                        <span><!-- ko i18n: 'Next'--><!-- /ko --></span>
                    </button>
                </div>
            </div>
        </form>
    </div>
</li>

Vendor/module/view/frontend/web/js/view/checkout/my-step-view.js

define(
(
    'ko',
    'uiComponent',
    'underscore',
    'Magento_Checkout/js/model/step-navigator'
),
function (
    ko,
    Component,
    _,
    stepNavigator
) {
    'use strict';
    /**
    *
    * mystep - is the name of the component's .html template,
    * my_module - is the name of the your module directory.
    *
    */
    return Component.extend({
        defaults: {
            template: 'vendor_module/checkout/mystep'
        },

        //add here your logic to display step,
        isVisible: ko.observable(false),


        initialize: function () {
            this._super();
            // register your step
            stepNavigator.registerStep(
                //step code will be used as step content id in the component template
                'contact',
                //step alias                    
                'contact',
                //step title value
                'Contact',
                //observable property with logic when display step or hide step
                this.isVisible,

                _.bind(this.navigate, this),

                /**
                    * sort order value
                    * 'sort order value' < 10: step displays before shipping step;
                    * 10 < 'sort order value' < 20 : step displays between shipping and payment step
                    * 'sort order value' > 20 : step displays after payment step
                */
                15
            );

            return this;
        },

        /**
                    * The navigate() method is responsible for navigation between checkout step
                    * during checkout. You can add custom logic, for example some conditions
                    * for switching to your custom step
                    */
        navigate: function () {
            var self = this;
            //getPaymentInformation().done(function () {
                self.isVisible(true);
           // });

        },
             onSubmit: function() {
        // trigger form validation
        this.source.set('params.invalid', false);
        this.source.trigger('customCheckoutForm.data.validate');

        // verify that form data is valid
        if (!this.source.get('params.invalid')) {
            // data is retrieved from data provider by value of the customScope property
            var formData = this.source.get('customCheckoutForm');
            // do something with form data
            console.dir(formData);
        }
    },

        navigateToNextStep: function () {
            stepNavigator.next();
        }
    });
} );

vendor/module/view/frontend/layout/checkout_index_index.xml

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="1column" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <referenceBlock name="checkout.root">
                <arguments>
                    <argument name="jsLayout" xsi:type="array">
                        <item name="components" xsi:type="array">
                            <item name="checkout" xsi:type="array">
                                <item name="children" xsi:type="array">
                                    <item name="steps" xsi:type="array">
                                        <item name="children" xsi:type="array">
                                            <item name="contact" xsi:type="array">
                                                <item name="component" xsi:type="string">vendor_module/js/view/checkout/my-step-view</item>
                                                    <!--To display step content before shipping step "sortOrder" value should be < 1-->
                                                    <!--To display step content between shipping step and payment step  1 < "sortOrder" < 2 -->
                                                    <!--To display step content after payment step "sortOrder" > 2 -->
                                                <item name="sortOrder" xsi:type="string">0</item>
                                                <item name="children" xsi:type="array">
                                                    <!--add here child component declaration for your step-->
                                                </item>
                                            </item>
                                        </item>
                                    </item>
                                </item>
                            </item>
                        </item>
                    </argument>
                </arguments>
        </referenceBlock>
    </body>
</page>

enter image description here

i wan add like that mention in image

checkout – Magento2 / Add check for disable submit button on custom payment method

I have developed a payment method for Magento 2. I would like the “send order” button (“invia ordine”) to be disabled in checkout (or send an error message) if the customer does not select an item in the options menu of my method (“seleziona”).

enter image description here

/app/code/Infocurci/Pagamentodilazionato/view/frontend/web/template/payment/pagamentodilazionato.html

<div class="payment-method" data-bind="css: {'_active': (getCode() == isChecked())}">
<div class="payment-method-title field choice">
    <input type="radio"
           name="payment(method)"
           class="radio"
           data-bind="attr: {'id': getCode()}, value: getCode(), checked: isChecked, click: selectPaymentMethod, visible: isRadioButtonVisible()"/>
   <label data-bind="attr: {'for': getCode()}" class="label"><span data-bind="text: getTitle()"></span></label>
                
</div>
<div class="payment-method-content">
    <div>
         
    <select name="payment(condizionipagamento)" class="select input-text required-entry" 
                            data-bind="
                                attr: {id: getCode()+'_condizionipagamento'},
                                options: getCardList(),
                                optionsValue: 'value',
                                optionsText: 'type',
                                optionsCaption: $t('--Please Select--'),
                                ">
                </select>
    </div>
     <!-- ko foreach: getRegion('messages') -->
    <!-- ko template: getTemplate() --><!-- /ko -->
    <!--/ko-->
    <div class="payment-method-billing-address">
        <!-- ko foreach: $parent.getRegion(getBillingAddressFormName()) -->
        <!-- ko template: getTemplate() --><!-- /ko -->
        <!--/ko-->
    </div>
    <div class="checkout-agreements-block">
        <!-- ko foreach: $parent.getRegion('before-place-order') -->
        <!-- ko template: getTemplate() --><!-- /ko -->
        <!--/ko-->
    </div>
    <div class="actions-toolbar">
        <div class="primary">
            <button class="action primary checkout"
                    type="submit"
                    data-bind="
                    click: placeOrder,
                    attr: {title: $t('Place Order')},
                    css: {disabled: !isPlaceOrderActionAllowed()},
                    enable: (getCode() == isChecked())
                    "
                    disabled>
                <span data-bind="i18n: 'Place Order'"></span>
            </button>
        </div>
    </div>
</div>

Magento 2 Checkout Page billing address dropdown remove show direct billing address form

Magento 2 I want to Checkout Page billing address dropdown remove show direct billing address form.

This dropdown i want to remove
enter image description here

And show direct billing address form.This type
enter image description here

THANKS.

magento2 – Adding a new field to one page checkout

I have a special field (Customer reference no, field id = cus_ref_no) that i need to add to checkout.
it is not related to shipping and billing. I have been following the answer from here, but for adding the custom field to checkout page app/code/Vendor/Module/view/frontend/layout/checkout_index_index.xml
I am not sure how to do this part – since the field is neither part of shipping and billing. It is an independent field that needs to be displayed as the first step on the checkout. How should i proceed to adding this field?

And how can i sort the field so that it is displayed as the first field on the checkout page – since i do not see this in the answer to the previous question?

magento2 – Get order data afterPlaceOrder on checkout page

Im trying to get the order increment id after success place order is triggered. This is my method-renderer file:

define(
(
    'Magento_Checkout/js/view/payment/default',
    'Magento_Checkout/js/model/quote',
    'Magento_Customer/js/model/customer',
    'Magento_Checkout/js/model/full-screen-loader',
    'Magento_Checkout/js/model/totals',
    'Magento_Checkout/js/action/redirect-on-success',
    'Magento_Ui/js/model/messageList',
    'mage/url',
    'mage/translate',
),
function (Component, quote, customer, fullScreenLoader, totals, redirectOnSuccessAction, messageList, url, $t) {
    'use strict';

    return Component.extend({
        defaults: {
            template: 'Module_MyModule/payment/custom_module'
        },
        afterPlaceOrder: function () {
            // HERE I WANT THE ORDER INCREMENT ID
        },

        successPlaceOrder: function () {
            fullScreenLoader.stopLoader();
            this.placeOrder();
        },
        placeOrder: function() {
            let context = this;
            context.successPlaceOrder();
        }
    });
  }
);

magento 2.3.5 getting serialize error on checkout page

magento 2.3.5 getting serialize error on checkout page – Magento Stack Exchange

Magento 2.4 – different checkout page for different store under one website

I have 3 stores(store1, store2, store3) under 1 website(Main Website). Is it possible to have different checkout fields (custom checkout page) for the stores?

magento2 – How to translate validation error message in checkout page Magento 2.3

Please any Ideas on how to translate the validation message on phone field on view/frontend/layout/checkout_index_index.xml:

<item name="telephone" xsi:type="array">
   <item name="validation" xsi:type="array">
      <item name="validate-phoneStrict" xsi:type="boolean">true</item>
   </item>
   <item name="config" xsi:type="array"> 
      <item name="tooltip" xsi:type="boolean">false</item>
   </item>
</item>

The validate-phoneStrict validator take the message in lib/web/prototype/validation.js line 528-530

('validate-phoneStrict', 'Please enter a valid phone number (Ex: 123-456-7890).', function(v) {....

Validation work well but, translation doesn’t work….Please help me to have right process to translate validation message of this validation rule.

Thank you.

DreamProxies - Cheapest USA Elite Private Proxies 100 Private Proxies 200 Private Proxies 400 Private Proxies 1000 Private Proxies 2000 Private Proxies ExtraProxies.com - Buy Cheap Private Proxies Buy 50 Private Proxies Buy 100 Private Proxies Buy 200 Private Proxies Buy 500 Private Proxies Buy 1000 Private Proxies Buy 2000 Private Proxies ProxiesLive Proxies-free.com New Proxy Lists Every Day Proxies123