Edit checkout labels and put a dropdown city instead of text field and Shipping method auth select

I having many issues with magento2. I’m benginner using it.

What i want:

  • Get the “City” in Checkout as a dropdown with custom list (its like 10 items in the list) instead of a plain text field.
  • Edit Labels in Checkout steps.
  • Wen someone, for example, select “Bogota” in the City dropdown, the “Shippent method” should be automatic select at “Regular”, but if set “Medellin” it will be “Inmediated”, of course, prices vary.

What i try:

In the case of the dropbox, try to install magento2-city-dropdown but is’n compatible with my version.

In the case of labels, ill try to edit en_US at i18l folder, delete cache, and none works. Ill attach a screenshot of what i have:

Actual Checkout Page


I’m using Magento 2.3.0 with Firecheckout module.

Thanks a lot.

restore the default checkout in magento 2.3

I have a disaster in the template of a checkout, it is really bad!. I never used Magento but now i need to restore the default checkout layout/html/template of a web.

I no have backups of changes and really i don’t know where to start modifiying files. I search in “module-checkout” but i really don’t know how to do it.

I have in other server a fresh instalation of Magento 2.3 so i can copy-paste files but i dont know what files i need to copy-paste.

All the other things in the web are Okay, only the visual of Checkout are broken.


How to put the Google Analytics code on the check-out page?

Magento 1.9.4 Porto theme 

I have a tracking Google Analytics code and suppose to put that on the check-out page. What is the best way to do that? Is the check-out page actually one of the CMS pages or CMS blocks?

UPDATED: This is a different code than what we have for just the Google Analytics account. I think it’s for special tracking of specific campaigns so the code is different than what we normally use for Google Analytics as such.

Woocommerce customer invoice order pay checkout page

I’ll break down the issue I have:

I login as an admin to my woocommerce platform and manually create an order for a customer. From the admin panel, i trigger the sending of the order invoice by clicking on the select option as shown in the screenshot below:

enter image description here

This will send an order invoice to the customer with summary of the order and a payment link that the customer can click on to make payment for the order.

Below is a screenshot of the invoice the customer receives:

enter image description here

This is where I’m facing issues. This is what happens:

  1. If the customer clicks on the Pay for this order link, if they’re already logged in to the site, they’ll be redirected to the order-pay page without a problem, where they can now pay for the order. This is the order-pay page they’ll be redirected to:

enter image description here

Everything works fine.

  1. If the customer clicks on the Pay for this order link and they are not logged in to the site, they’ll be prompted to login as shown below:

enter image description here

This is where the issue is: after the customer logs in, instead of being redirected to the order-pay page, they’re redirected to the cart page and this is what they get:

enter image description here

I can’t seem to figure out why this happens. Why after login, the customer is not directed to the order pay form for that order so they can make payment.

Kindly assist.

How to call a function on change of window.checkoutConfig data so that refresh the content of checkout page Magento 2

in my checkout page when promo code is applied, I am updating a text using some calculation using knockoutjs

So, I am using window.checkoutConfig data in my js for some calculation. the function works well when called from HTML, but it doesn’t run on itself when window.checkoutConfig data is changed.


 <span class="tag-text">     <!-- ko if: getFinalSale($  parent)-->       <u class="product-tag underline-bold-text checkout-final-sale" data-bind="text: getFinalSale($  parent)"></u>     <!-- /ko --> </span> 

I have written above code in details.html

and my js is


knockout js

  define([    'uiComponent',    'ko',    'Magento_Checkout/js/model/totals'     ], function (Component, ko, totals) {    'use strict';     var finalSaleData = window.checkoutConfig.items;      return Component.extend({      defaults: {          template: 'Magento_Checkout/summary/item/details'      },     quoteItemData: quoteItemData,     finalSaleData: finalSaleData,      /**      * @param {Object} quoteItem      * @return {String}      */      getItems: function(item_id) {         var itemElement = null;         _.each(this.finalSaleData, function(element, index) {             if (element.item_id == item_id) {                 itemElement = element;             }         });         return itemElement;     },     getFinalSale: function (quoteItem) {         var item = this.getItems(quoteItem.item_id);         var tagText = '';          if((((item.price*item.qty) - item.discount_amount)/(item.base_old_price*item.qty))< 0.5){             var tagText = 'Final Sale';         }else{             if(item.base_old_price && item.price){                 // && item.price < item.price && item.base_old_price / item.price <= 0.5){                 if(((item.base_old_price - item.price)/item.base_old_price)>0.5){                     var tagText = 'Final Sale';                 }             }         }         return tagText;     },      }); }); 

I am using var finalSaleData = window.checkoutConfig.items in my function getFinalSale.

How to make getFinalSale function run every time when window.checkoutConfig.items data is changed without refreshing the page.

The problem is, this runs only when the page reloads.

How to make getFinalSale function run every time the user applies promo code without refreshing the page so that my HTML gets updated too.

Basically Final Sale text needs to be shown on the basis of that logic in js code in getFinalSale function.

How to achieve that.