I wish to have 2-3 types of product themes. (not layouts)
Lets say one has pink background the other has blue and the third has green.
One shows the product picture, the other doesn't. etc...
I could make/edit the twig files, however just don't know how to assign them to a product.
Is it possible to assign a different product to a twig? (preferably on the product setting page of the admin panel)
I not only would like to have a different layout (changing modules and their positions) but to have a different theme/template assigned to each product?
Thank you for any help
Yes it is possible . You have to customize the product controller.
You can set if /elseif/else statement to render files based product id .
Thanks
You can set if /elseif/else statement to render files based product id .
Thanks
If your changes are CSS-related, you might be able to use Dynamic Styling for that. It works as a normal module extension, so what you do is create a custom styling (including custom CSS) then create a layout with that module, then assign the product that layout in its "Design" tab. That will give it that layout, and apply any modules that are on that layout, including the styling you set up.
Feel free to take a look at the screenshots and demo site, and if you're interested let me know at www.getclearthinking.com/contact if you have any further questions.
Feel free to take a look at the screenshots and demo site, and if you're interested let me know at www.getclearthinking.com/contact if you have any further questions.
Thanks.
Instead of any extension I would be more interested in the logic itself.
How are twigs-design-layout-theme related to each other.
As several products are concerned if/else statements wouldn't be the solution either.
However the question is:
By editing/copying twig files, can those be added to a certain product (on its design tab)
Thanks
Instead of any extension I would be more interested in the logic itself.
How are twigs-design-layout-theme related to each other.
As several products are concerned if/else statements wouldn't be the solution either.
However the question is:
By editing/copying twig files, can those be added to a certain product (on its design tab)
Thanks
The .twig file controls all product pages. You can assign different layouts to individual products, but those aren't .twig files. A layout is just a list of modules to show on that particular page.mikrocica wrote: Thanks.
Instead of any extension I would be more interested in the logic itself.
How are twigs-design-layout-theme related to each other.
You'd have to modify the product template code and the layout system in order to do that. It's certainly possible, but beyond what anyone in the forum will likely be able to lead you through. I'd recommend playing around with the layout system and files that control that to get a feeling for how it works, as well as look in the controller files to figure out how they load the .twig template files. You could then change that code to load different .twig files depending on the layout overrides you set in the product data.mikrocica wrote: However the question is:
By editing/copying twig files, can those be added to a certain product (on its design tab)
Thanks
If you can't figure out how to do this yourself, you may want to get in touch with someone for commercial support, to create this kind of system for you. If you need to find a developer, you should post a request in the OpenCart "Commercial Support" forum, which is checked by a number of OpenCart developers. You can also try checking out the OpenCart "Partners" area.
Who is online
Users browsing this forum: No registered users and 32 guests