Post by jos@kelleners.nl » Sun Oct 15, 2017 10:48 pm

Hello,
I'm working in a project where my customer wants to change the product info box. With "product info box" I mean the box with product thumb, name and price as it is shown in the overviews of categories, latest products and related products. This box although it has always the same code is not put in a separate function or template, but it is part of almost every template page. Changing this box means editing every template page and possibly change all the controllers associated with it. I wonder if there is not a different solution where the box code is put in a different template (think of smarty). Does someone have experience with this?

User avatar

Posts

Joined
Sun Oct 15, 2017 10:23 pm

Post by IP_CAM » Mon Oct 16, 2017 7:58 am

Well, strictly technically, such already exists, at least in certain Themes.
They use 'global settings' for certain layouts, to have all sections, like grid-view,
list-view, toolbars, form-action, e.t.c., then looking fully identical, as set in Admin.
But I could not tell you, wich themes are using such 'common' ways of doing things,
I found it in the famous Merkent Bootstrap Theme, but this is only for Version v.1.5.6.x.
Just to mention this !
Good Luck! ;)
Ernie
http://merkent.com/merkent_theme_v3
Image
Image

My Github OC Site: https://github.com/IP-CAM
5'200 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.


User avatar
Legendary Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland

Post by jos@kelleners.nl » Thu Oct 19, 2017 1:26 am

:) Thank you for your resonse.
I think there is allot of double code for this "product box". A separate template for this box in combination with a small adjustment in the controllers would make life easier and decrease the code lines. Your post does something like that. I wonder if this should not be a "feature of the next generation "open-cart". I'm not aware of any extension doing such a thing.

User avatar

Posts

Joined
Sun Oct 15, 2017 10:23 pm

Post by Johnathan » Thu Oct 19, 2017 4:55 am

This has been suggested many times, and most developers agree this would be a good idea. However, it hasn't made it into the core in the years since it was first suggested, so I wouldn't plan on it happening any time soon.

Some themes may have a standard "product box" template file in their code, so you might look around and ask some theme developers. It's certainly doable yourself, but you have to edit all the template files that load a list of products, and change them so they all load from the same "master" template file.

Image Image Image Image Image


User avatar
Administrator

Posts

Joined
Fri Dec 18, 2009 3:08 am

Who is online

Users browsing this forum: No registered users and 38 guests