Do you know and where can I edit my success page?
Thank you.
Do you know and where can I edit my success page?
Thank you.
This can only be achieved by overriding the core templates inside of your child theme. I donât know for sure without doing the work myself, but the files you want to override are located in:
vendor/magento/module-checkout/view/frontend/web/template/success.phtml
And they should be overridden inside:
app/design/frontend/VENDOR/CHILD/Magento_Checkout/templates/success.phtml
If youâre planning to do a load of fancy stuff which involves additional JS and stuff then youâll want to create a Module. If itâs changing some simple stuff like text and images, then this solution will do.
Thank you Craig
Iâll play with it.
Hi Craig,
I stuck with the success page. Maybe you or somebody can help.
The path you gave me is slightly incorrect. The success.phtm file sits in
vendor/Magento/module-checkout/view/frontend/template/success.phtml but I worked it out where to find it.
I tried to edit the file but I see no results. I even tried to modify the original Magento success.phtml file but even this doesnât help. I need to remove the info about the âtracking infoâ as not all our orders will be shipped with traceable service. It is very misleading.
I found this blog post - https://swissuplabs.com/blog/how-to-customize-magento-checkout-success-page/. It is quite useful. It explains how using a block and widget it is possible to add an image to the success page. By the way, I think that there is a bug in Magento 2.3.5-p1 regardless if I set the widget to be shown in âMain Content Topâ or âMain Content Bottomâ it always shows at the bottom.
In addition, I would like to change the âThank you for your purchase!â text and replace it with something like âYOUR ORDER HAS BEEN RECEIVED.â
Could you please look at it if you find some time?
Thank you.
Iâll try and have a look over next next couple of days. Throw me a reminder if I donât get back to you by Thursday.
Thank you. Iâd be super grateful!
I just went to start building an override to experiment with⌠And then I read your two requirements:
Both of these can actually be replaced with i18n locales, without the need for coding.
Typically, anything you see inside the code <?= $block->escapeHtml(__('Example Text')) ?>
is translatable. Therefore, the preferred method of updating text.
As they are both in the Checkout, youâd need to change the locale for that module if you have multiple locale files.
Did you still need to make further adjustments that would require you to override the content of the page?
Hi Craig,
Iâm trying to translate the phrase âWeâll email you an order confirmation with details and tracking info.â but with no luck.
I think I checked everything. Can you please look at the attached screenshots. Maybe you spot something.
After I updated the en_GB language file I cleared, flushed my cache, and deployed static content.
Hmm⌠My en_GB
doesnât include the â\
â in âWe\
âllâ. Might be worth trying withoutâŚ
"We'll email you an order confirmation with details and tracking info.","You will receive an order confirmation with details",module,Magento_Checkout
It might be that translation files in app/i18n
donât need the â\
â. Whereas typical module/i18n files do.
Purely an educated guess, even though it doesnât make too much sense.
Hi Craig,
Thank you. It was me stupid again.
I still struggle to translate a few phrases. âShippingâ in the order confirmation section, as I changed it everywhere to delivery, âYou added âŚto your shopping cartâ to âYou added ⌠to your basketâ on the product page, and finally my order confirmation page âSubtotalâ to "Total (excluding delivery) and âGrand Totalâ to âTotalâ
How can I find out where these prases are from, which modules?
I use the grep
command to search for partial phrases and then trace them back to their original module. For example, when looking for âWeâll email you an order confirmation with details and tracking info.â I ran the following command from the Magento root directory:
grep -Rl 'email you an order confirmation with' .
I did this expecting at least 2 results:
And these were my actual results (xml files irrelevant):
./vendor/magento/module-checkout/i18n/en_US.csv
./vendor/magento/module-checkout/view/frontend/templates/success.phtml
./vendor/magento/module-checkout/Test/Mftf/Data/ConstData.xml
./vendor/magento/module-checkout/Test/Mftf/Test/CheckCheckoutSuccessPageTest.xml
Alternatively, if youâre running something like the i18n translation module we talked about here (Translating Magento 2 - Installing custom language pack(s)) then just search there. It all depends on what changes youâve already made.
Thank you.
I translated everything what I needed now.