I need help for Magento 2.x shipping Address fields.
I want to change the Address label text using my new Label text.
Is there anyone you who have changed the Address Label text by own Lable Text. Could anyone please give the file path and where I can change the text for Checkout page Shipping address fields.
Please Take a look my screenshot below.
Here is the path where you can edit Address label text:
app/code/Magento/Checkout/view/frontend/layout/checkout_index_index.xml
Following will be helpful
step 1 :
If you want to change the shipping address fields as well as billing address fields, You can do via theme transaction if you have made a custom theme as per your language.
i.e: en_US
Step 2 :
If you change made in shipping address fields only, Please override LayoutProcessor.php
step 2.1
di.xml
path: app/code/vendor/module_name/etc
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
<type name="Magento\Checkout\Block\Checkout\LayoutProcessor">
<plugin name="Custom_Checkout" type="vendor\module_name\Block\LayoutProcessor" sortOrder="100"/>
</type>
</config>
Step 2:
LayoutProcessor.php
path:app/code/vendor/module_name/Block/
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']['lastname']['label'] = __('Recipient lastname');
$jsLayout['components']['checkout']['children']['steps']['children']['shipping-step']
['children']['shippingAddress']['children']['shipping-address-fieldset']['children']['region_id']['label'] = __('Division');
return $jsLayout;
}
}
It's work like charm
Related
Using Magento 2.3 Community
At checkout when adding a new address, I need to rename the Company Field Label to something else, how can I achieve that? Also this field appears under my account, edit shipping address. How can I change that label as well? I dont care how it is stored in the database, I just want the label to change.
This should be easy to do :
Step 1 : login to admin dashbroad
Step 2 : go to Stores-> Attributes-> Customer Address.
Step 3 : you will see all fields in the forms there. Click on the field you want to change, you will be editing page then you can change the label to what you want.
Cheers.
If you're looking for a quick and easy solution, you can do it via Theme Translation, this will change the text per your store locale.
For your currently active theme:
Create file:
app\design\frontend\VENDOR\THEME_NAME\i18n\en_US.csv
(change filename based on your locale, en_US is default)
Example:
"Company","Something else"
Note: this will also change the label in the customer account area when creating a new address from there.
https://devdocs.magento.com/guides/v2.3/frontend-dev-guide/translations/xlate.html
On Myob Advanced (Acumatica), we would like to add a salespersons email address to the Salespersons page (AR205000). This is so that we can then add this field to the Sales Order email template, allowing us to CC the salesperson in every time their customer places an order.
Ive tried to implement this extra field, "Salespersons Email Address"; but I am having some issues.
It will only allow me to save 25 characters within the text box? How come I'm unable to add more than 25 characters?
Email fields that come with the software all have the code of px:PXMailEdit. However, i cant seem to be able to create a MailEdit field, only a px:PXTextEdit field? Why is this?
Thanks for your help. If this doesnt make sense or you need further info LMK.
Currently, Layout Editor does not support PXMailEdit control. Please find below the steps to add a custom email field on the Salespersons screen:
For the SalesPerson DAC, ceate a new field of the string type with length set to 255 (this is the length defined in the PXDBEmailAttribute used on all email fields in Acumatica/MYOB Advanced):
Replace generated attributes with the attributes below, save your changes and publish customization:
[PXDBEmail]
[PXUIField(DisplayName="Email Address")]
Open the Salespersons screen in Layout Editor and add TextEdit control for the custom field declared on step 1, then save your changes:
Select Edit Project Items from the File menu and change control type from PX.Web.UI.PXTextEdit to PX.Web.UI.PXMailEdit in the XML changeset generated for the Salespersons screen, save your changes and publish customization one more time:
This is how custom email field should look like on the Salespersons screen after you complete the steps above:
Using Salesperson's email in Automation Notifications:
If you set up custom Email Address field from the Salespersons screen as CC address in Sales Order notification:
the system will automatically include Email Address from the Default Salesperson in notification message:
Using Salesperson's email in Notification Templates:
This might seem a litle confusing, but the Sales Person node available for selection on the Notification Templates screen represents an Employee linked with a Salesperson (see screenshot below for details):
With SalesOrderNotification's CC field set to ((SalesPerson.SalesPersonID.UsrEmailAddress)), the system should automatically include Email Address from the Default Salesperson in the generated email:
I want to decrease length of order increment #00000000001 to #00001.
I found some tutorials for magento 1 but not for Magento 2.
Please help if someone is aware how to perform this task.
Thanks
In the etc directory of your module, add a di.xml file with this content:
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
<type name="Magento\SalesSequence\Model\Sequence">
<arguments>
<argument name="pattern" xsi:type="string"><![CDATA[%s%'.05d%s]]></argument>
</arguments>
</type>
</config>
This way Magento will pass a 5 digit pattern instead of its default pattern made by 9 digits.
This is because the first and the last %s symbol are replaced respectively with the prefix and the suffix values stored in the sales_sequence_profile table. The matching is done with the meta_id of your store (you can check yours by reading from the sales_sequence_meta table). The %'.05d pattern means that you want an integer with 5 padding digits on its left which is replaced with the next order number calculated by Magento.
For example, assuming that you have:
Prefix: PX
Suffix: SX
with the above pattern, the first order number will be PX00001SX
you can decrease length of order increment #00000000001 to #00001.
Try this: https://store.emizentech.com/magento2/custom-order-and-invoice-number-magento-2-0.html
Solved with a custom developed plugin:
I already had an observer to save the customer as new customer automatically after placing an order and before rendering the success page:
On the events.xml (already existing observer i've previously made)
<event name="sales_order_place_after">
<observer name="customcheckout_customer" instance="Dufry\CustomCheckout\Model\Observer\SaveCustomer"/>
</event>
On the observer SaveCustomer.php (already existing observer i've previously made):
$order = $observer->getOrder();
$increment = $order->getIncrementId();
if(strlen($increment) > 9){
$newIncrement = substr($increment, -8);
$newIncrement = substr($increment,0,1).$newIncrement;
$order->setIncrementId($newIncrement);
}
...
$order->save()
And worked like a charm.
I did the second "substr" part to keep the prefix the was previously configured.
I have created a custom Plone content type in my package i.e. my.product.
I am in need of integrating a working copy support: so that a "published" document (in my case, a published content type) stays online while it is being edited. Basically, I want to take advantage of 'Working Copy Support (Iterate)' provided by plone.app.iterate to achieve what is explained here. This will provide me with ability to check-in/check-out my changes.
Is this possible in Plone 4 with custom content types using Archetypes? How would one go about it if yes?
I added the following two files inside my.product/my/product/profiles/default folder and it appears to work:
diff_tool.xml
<?xml version="1.0"?>
<object>
<difftypes>
<type portal_type="MyCustomType">
<field name="any" difftype="Compound Diff for AT types"/>
</type>
</difftypes>
</object>
repositorytool.xml
<?xml version="1.0"?>
<repositorytool>
<policymap>
<type name="MyCustomType">
<policy name="at_edit_autoversion"/>
<policy name="version_on_revert"/>
</type>
</policymap>
</repositorytool>
I have never used plone.app.iterate, but this is the generic approach how to solve the problem.
Actions are installed by plone.app.iterate GenericSetup profile. You can see actions here:
https://github.com/plone/plone.app.iterate/blob/master/plone/app/iterate/profiles/default/actions.xml
Pay note to the line *available_expr* which tells when to show the action or not. It points to helper view with the conditition.
The view is defined here
https://github.com/plone/plone.app.iterate/blob/master/plone/app/iterate/browser/configure.zcml#L7
The checks that are performed for the content item if it's archiveable
https://github.com/plone/plone.app.iterate/blob/master/plone/app/iterate/browser/control.py#L47
Most likely the failure comes from if not interfaces.IIterateAware.providedBy condition. Your custom contennt must declare this interface. However, you can confirm this putting a pdb breakpoint in checkin_allowed(self) and step it though line-by-line and see what happens with your content type.
I'm working on a FOSS project at http://unicode.codeplex.com. In this project we try to collect some information about standard keyboardlayouts.
What we want to know is there a place or document or ... which mention what's the Standard Keyboard Layout for exact language.
I mean if you are a German or American or Arab or ... , what's the standard keyboard layout in your country?
As you know there are too many layouts for each country but (in most countries) the Standard Organization of each country provide a standard layout for keyboard and all of the people should use it to prevent characters inelegance.
So if you know a document or just know your country (or some countries) standard keyboard layout please complete these information, or what else you think may help.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Standard xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Item Country="Iran" KeyboardLayout="ISIRI 9147" StandardDate="2004/09" License="Gratis" Producer="ISIRI" ProjectURL="http://sourceforge.net/projects/farsitools/" Referer="Nasser Hajloo" RefererMail="n.hajloo#gmail.com" />
</Standard>
Each Item provided for each country and here is the attribute description
Country = Country name
KeyboardLayout = the name of standard keyboard layout
standarddate = when this layout was standarded
License = what's the keyboard layout license. if you do not know leave it blank
Producer = the name of standard organization
projectURL = if the project is available on the web and is published by the producer, where is it? if you do not know leave it blank
Referer = Your Full Name
RefererMail = Your email