View Single Post
  #6  
Old 08-05-2020, 04:00 AM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,190
 

Default 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() { $templates = [ ........ 'layout/content/main.location.twig' => [ static::TO_DELETE => [ ['layout.main', \XLite\Model\ViewList::INTERFACE_CUSTOMER], ], static::TO_ADD => [ ['center.top', 1000, \XLite\Model\ViewList::INTERFACE_CUSTOMER], ], ], ........ ]; }


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() { $templates = [ 'TEMPLATE YOU WANT TO MOVE - PATH RELATIVE TO SKINS/CUSTOMER/' => [ static::TO_DELETE => [ ['product.details.page.info', \XLite\Model\ViewList::INTERFACE_CUSTOMER], ], static::TO_ADD => [ ['product.details.page.info', 99, \XLite\Model\ViewList::INTERFACE_CUSTOMER], ], ], ]; }

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.
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote