sampsonzak Posted January 6, 2023 Share Posted January 6, 2023 Hi all, I need some help on figuring out how to edit the admin panel / back-end Order View, to make some CSS changes to the shipping address that it displays. (On my previous install of 1.7.2, this worked perfectly). In my old PrestaShop 1.7.2, in this file: /admin/themes/default/template/controllers/orders/helpers/view/view.tpl, I had this code which worked perfectly: <a href="#" onclick="CopyToClipboard('customer-name');return false;"><div class="customer-name" id="customer-name">{$addresses.delivery->firstname} {$addresses.delivery->lastname}</div></a> <a href="#" onclick="CopyToClipboard('customer-company');return false;"><div class="customer-company" id="customer-company">{$addresses.delivery->company}</div></a> <a href="#" onclick="CopyToClipboard('customer-address1');return false;"><div class="customer-address1" id="customer-address1">{$addresses.delivery->address1}</div> <a href="#" onclick="CopyToClipboard('customer-address2');return false;"><div class="customer-address2" id="customer-address2">{$addresses.delivery->address2}</div> <a href="#" onclick="CopyToClipboard('customer-city');return false;"><div class="customer-city" id="customer-city">{$addresses.delivery->city}</div> <a href="#" onclick="CopyToClipboard('customer-state');return false;"><div class="customer-state" id="customer-state">{$addresses.deliveryState->name}</div> <a href="#" onclick="CopyToClipboard('customer-postcode');return false;"><div class="customer-postcode" id="customer-postcode">{$addresses.delivery->postcode}</div> <a href="#" onclick="CopyToClipboard('customer-country');return false;"><div class="customer-country" id="customer-country">{$addresses.delivery->country}</div> <a href="#" onclick="CopyToClipboard('customer-phone');return false;"><div class="customer-phone" id="customer-phone">{$addresses.delivery->phone}</div> In the new PrestaShop 1.7.8.8, I did a quick google and found the file (I think) that needs editing, which is: /src/PrestaShopBundle/Resources/views/Admin/Sell/Order/Order/Blocks/View/customer.html.twig I need to replicate the above code(I think?) to replace this: {% for line in orderForViewing.shippingAddressFormatted|split("\n") %} <p class="mb-0">{{ line }}</p> {% endfor %} But I have absolutely no idea how. If anyone could help, this would be really appreciated! I am willing to pay to get this working ASAP! Thank you Link to comment Share on other sites More sharing options...
ps8modules Posted January 7, 2023 Share Posted January 7, 2023 (edited) Hi, I'm happy to help. Will you need a module for this, or just a modified twig? Do you need to build the CopyToClipboard function directly into twig? Edited January 7, 2023 by prestashopfree.com (see edit history) Link to comment Share on other sites More sharing options...
sampsonzak Posted January 7, 2023 Author Share Posted January 7, 2023 7 hours ago, prestashopfree.com said: Hi, I'm happy to help. Will you need a module for this, or just a modified twig? Do you need to build the CopyToClipboard function directly into twig? Hi, I just need the code to copy/paste. I also need something else adding to the same page; If a customer has 2 or more "payment accepted" orders, to show a div at the top of the order-detail page: This was my old code, I couldn't find where my last developer added the $customer_with_more_payment_accepted_status = 1 code though {if $customer_with_more_payment_accepted_status == 1} <div class="multipleorderalert" style=" background-color: #ff0000; padding: 20px; color: #ffffff; font-size: 20px; font-weight: bold; text-align: center; margin-bottom: 15px; "> CUSTOMER HAS MORE THAN ONE ORDER with 'PAYMENT ACCEPTED' status ! </div> {/if} Link to comment Share on other sites More sharing options...
ps8modules Posted January 7, 2023 Share Posted January 7, 2023 I sent you a private message 😉 Link to comment Share on other sites More sharing options...
ps8modules Posted January 8, 2023 Share Posted January 8, 2023 (edited) Solved by creating a mini module using JavaScript and ajax. Free of charge 😉 I received a voluntary donation and I did it for free. Thank you @sampsonzak Please mark this thread as resolved. Edited January 8, 2023 by prestashopfree.com (see edit history) Link to comment Share on other sites More sharing options...
natachaC Posted March 31, 2023 Share Posted March 31, 2023 Hi I see that you have created a module to intervene on this zone of addresses which has changed I have a somewhat similar need for one of my clients. he would like phone numbers to be displayed with spaces between groups of 2 digits to be more readable xxxxxxxxxx => xx xx xx xx xx do you think it is possible? how much do you charge for this feature? THANKS Natacha Courcelles Link to comment Share on other sites More sharing options...
ps8modules Posted March 31, 2023 Share Posted March 31, 2023 Hi. Thank you for your interest. It's nothing slotite, but it will take some time. Unfortunately, modifications are needed directly in the kernel and may be lost after the update. Of course, you can contact me for more information. My profile is complete and I'm not hiding anything. Link to comment Share on other sites More sharing options...
natachaC Posted March 31, 2023 Share Posted March 31, 2023 Thank you for your prompt response yes, I'm sure it's not that obvious I will see with my client Link to comment Share on other sites More sharing options...
ps8modules Posted March 31, 2023 Share Posted March 31, 2023 Thank you, I'm happy to help. Link to comment Share on other sites More sharing options...
tyszek Posted May 24, 2023 Share Posted May 24, 2023 On 1/8/2023 at 4:00 AM, ps8moduly.cz said: Solved by creating a mini module using JavaScript and ajax. Free of charge 😉 I received a voluntary donation and I did it for free. Thank you @sampsonzak Please mark this thread as resolved. Hello, Is it possible to add a CSS fragment to modify the copy so that when the customer enters the VAT number, this inscription blinks or becomes more visible? Regards Link to comment Share on other sites More sharing options...
siomosp Posted October 20, 2023 Share Posted October 20, 2023 Hi @sampsonzak Can you post the code for getting only part of shippingAddressFormatted For example , delivery address phone_mobile; Thanks Panagiotis Link to comment Share on other sites More sharing options...
skijump Posted June 12 Share Posted June 12 I'm interested in having the order address and carrier tracking number box located near each other in the backend. After I pack a package and generate a tracking number on my shipping software, I currently have to scroll down and click the carrier tab then edit then paste the tracking. It's a lot of effort compared to PS 1.6. Using PS 8.1.0 Thoughts? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now