VBLED Posted November 1, 2023 Share Posted November 1, 2023 Hello, I want to add a warehouse location on this table when I click View Pack Content button on order detail page. Can someone help? My PS verison is 8.0.4 Link to comment Share on other sites More sharing options...
VBLED Posted November 4, 2023 Author Share Posted November 4, 2023 Thank you for your instruction. I would like to change the .twig file, that is easier. But how I can get the product warehouse location value, this value is in database table ps_product and field location. How I can get this data and show in the table? Link to comment Share on other sites More sharing options...
VBLED Posted November 4, 2023 Author Share Posted November 4, 2023 I change the view_product_pack_modal.html.twig like this, but it does not work: <table class="table" id="product-pack-modal-table"> <thead> <tr> <th colspan="3">{{ 'Product'|trans({}, 'Admin.Global') }}</th> <th>{{ 'Quantity'|trans({}, 'Admin.Global') }}</th> <th>{{ 'Available'|trans({}, 'Admin.Global') }}</th> <th>{{ 'Bin'|trans({}, 'Admin.Global') }}</th> </tr> </thead> <tbody> <tr class="d-none" id="template-pack-table-row"> <td>{{ 'Child item'|trans({}, 'Admin.Global') }}</td> <td class="cell-product-img"> <img alt=""/> </td> <td class="cell-product-name"> <a href=""> <p class="mb-0 product-name"></p> <p class="mb-0 product-reference"> <strong>{{ 'Article number:'|trans({}, 'Admin.Orderscustomers.Feature') }}</strong> </p> <p class="mb-0 product-supplier-reference"> <strong>{{ 'Supplier reference:'|trans({}, 'Admin.Orderscustomers.Feature') }}</strong> </p> </a> </td> <td class="cell-product-quantity"> <span class="badge badge-secondary rounded-circle"></span> </td> <td class="cell-product-available-quantity"></td> <td class="cellProductLocation"></td> </tr> </tbody> </table> Link to comment Share on other sites More sharing options...
VBLED Posted November 5, 2023 Author Share Posted November 5, 2023 Thank you very much. Finally I solve the problem with your instruction. My PS version is 8.0.4, the order_view.bundle.js is different. I just add this code to this file: t.find(Ye.product.location).html(e.location), 😀 1 1 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