Moving price on product page
Hi all, I'd like to perform a small layout modification, just moving the price field above the product brief description field.
Hey X-Cart 5 has a template editor, this should be quick and easy! I'm assuming it's me, initially great pretty intuitive, but then no, I can't just select drag and drop, why not? Now I get frustrated, can't seem to get my head around this. ](*,) I read the template editor doco, why can't I get it to work in a similar way as the invoice example? Must be me but what am I doing wrong?? Anyone? Thanks, Iain |
Re: Moving price on product page
Have you tried using the template editor and just moving the price code where you want it to be? ie cut and paste the code rather than trying drag and drop.
|
Re: Moving price on product page
Hi Paul, I got it to work by creating a new template, cutting the code from the original position and pasting it into my new template.
Possibly the way to do it but it just felt less intuitive than being able to drag or renumber a section to a new spot? Especially when on the layout editor you can drag and drop, albeit larger sections of functionality, ie I swapped Related Products and the Customers Also Bought sections quickly and easily. |
Re: Moving price on product page
The drag and drop works only on individual sections or modules if you'd like but not within sections. It's basically helpful for large individual sections nothing else.
To move these templates on the page you should use the ListChild declaration and reassign its weight for the different templates within the same list. If they are within different lists you will have to reassign the list and the weight for the template you want to move. |
Re: Moving price on product page
1 Attachment(s)
It must be me, but not sure how to implement that, see attached of what I did to get it to at least work.
|
Re: Moving price on product page
You cannot do this from the template editor. You need to create new module and do it in there.
Reassign the template (move it) within a list of templates. Unfortunately the XC documentation lacks howtos and explanations what's what big time. Your best help is existing code. Here is an example from the CrispWhite theme Code:
protected static function moveTemplatesInLists() Moving the main.location.twig template from "layout.main" list to "center.top" list and giving it weight of 1000. So you need to find the list the template you want to move belongs to and the list you want to move it to - in your case "product.details.page.info" Code:
protected static function moveTemplatesInLists() This goes in your_module_root/Main.php I don't think you can do this with the templates modified through the template editor though. |
All times are GMT -8. The time now is 11:13 PM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.