Post by d3z1gnr » Fri May 18, 2018 12:52 pm

Hey folks,
So I managed to convince client that to separate retail and wholesale functionality, we utilise multisite (this did not just pertain to customer groups FYI, many little mods that the settings would not handle).

So far so good (awesome in fact!).

Question: I have several small page items eg. a message in footer explaining that all prices include tax. On the subdomain, I wish this to say the opposite. Should I simply use a function in my controller to check which store and output relevant text... or should I create a duplicate theme and make the required changes in that.

Further to this, my default theme uses several extensions, and I have noticed one alters the header.twig/product.twig - how does this work when using a new theme? eg. what happens to the modification structure??


Image

Mike Little
Director / Developer / Makes the coffee
Creative Digital Limited
http://www.creativedigital.co.nz


User avatar
Active Member

Posts

Joined
Mon Jan 18, 2010 2:59 pm
Location - Auckland, New Zealand

Post by d3z1gnr » Fri May 18, 2018 3:14 pm

Ok so to answer my own question (and help others), refreshing the modifications edits both the existing and new theme files. This makes me very happy :)

Image

Mike Little
Director / Developer / Makes the coffee
Creative Digital Limited
http://www.creativedigital.co.nz


User avatar
Active Member

Posts

Joined
Mon Jan 18, 2010 2:59 pm
Location - Auckland, New Zealand

Post by Jeremy Fisk » Sun Apr 14, 2019 4:03 pm

This is an old post but just to help anyone searching. The modification will automatically work on any template if the file path has a "*" wildcard in the file path of the template being worked on. For example catalog/view/theme/*/template/common/header.twig (same for both twig and tpl tenplate files)

This is the same with language files and is the same for ocmod and vqmods

Hand Dryers

Bookstore Mod
QuickShop Module
Restricted Access - Compulsory Login
Template Override - Category Specific (vQmod)
Template Override - Brand Specific (vQmod)
How did you find out about us register question mod
Compulsory Login vQmod
Brands In Top Menu
zoom - Product Image - Auto on hover


User avatar
Active Member

Posts

Joined
Thu Nov 11, 2010 6:11 pm
Location - New Zealand (Tokomaru, Palmerston North)

Post by D3MO » Sun Apr 14, 2019 9:05 pm

frgot to mention that it will work NLy if xml instructions will find in x theme what and where to change or add. Because all templates twig/tpl files willhave mostly other html code so mostly if the moduleis related with changing something in tpl or twig files for each theme it may be required to add extra xml rules in a module to find exact matches based by theme used

Jeremy Fisk wrote:
Sun Apr 14, 2019 4:03 pm
This is an old post but just to help anyone searching. The modification will automatically work on any template if the file path has a "*" wildcard in the file path of the template being worked on. For example catalog/view/theme/*/template/common/header.twig (same for both twig and tpl tenplate files)

This is the same with language files and is the same for ocmod and vqmods

Opencart Expert | voldemaras@gmail.com

Extensions for Opencart @ https://www.opencartextensions.eu / or Opencart Marketplace

Need Custom Module? debug third party module or simply have any question related to Opencart? feel free to contact directly for a live chat session:) - INSTANT LIVE CHAT


User avatar
Active Member

Posts

Joined
Mon Apr 04, 2011 6:57 am

Post by purpletreesoft » Mon Apr 15, 2019 5:06 pm

D3MO wrote:
Sun Apr 14, 2019 9:05 pm
frgot to mention that it will work NLy if xml instructions will find in x theme what and where to change or add. Because all templates twig/tpl files willhave mostly other html code so mostly if the moduleis related with changing something in tpl or twig files for each theme it may be required to add extra xml rules in a module to find exact matches based by theme used

Jeremy Fisk wrote:
Sun Apr 14, 2019 4:03 pm
This is an old post but just to help anyone searching. The modification will automatically work on any template if the file path has a "*" wildcard in the file path of the template being worked on. For example catalog/view/theme/*/template/common/header.twig (same for both twig and tpl tenplate files)

This is the same with language files and is the same for ocmod and vqmods
Nice tip, however that is general knowledge and is true in all cases - even if you have a single template. OCMOD replace works only when it finds matching expression.

Purpletree Software LLP
New features launched for Multivendor Marketplace Extension


User avatar
New member

Posts

Joined
Thu Jun 22, 2017 10:17 pm

Who is online

Users browsing this forum: W3C [Validator] and 71 guests