Post by xseon » Thu Jun 14, 2018 9:50 pm

Hi,
I'd like to propose an effective way to allow store owners set what template file to be associated with each layout. You can see it better in the attached picture but in brief:
  • In the Layout edit form should be added a new column with Upload, Download and Restore buttons for mainaining template files.
  • Uploaded files with the same name as the default name may rename the existing default file so that to be possible to restore it later if necessary.
  • Users will see the file name that is being currently used right before the buttons and will have the ability to change the file. Editing it would be available in Theme Editor section.
Then we need all controller files that output data in the catalog (clients area) to add the file name as a variable and include it in the output statement. For exapmle, for products it is:

Code: Select all

$this->response->setOutput($this->load->view('product/product', $data));
It may become like this:

Code: Select all

$this->response->setOutput($this->load->view('product/'.$filename, $data));
I think this would be a much appreciated improvement. And it seems to me it can be done easily. I hope I'm not missing something. Have a look and let me know how you think.
Regards!

Attachments

suggestion.jpg

Possible look of the new function - suggestion.jpg (58.28 KiB) Viewed 3876 times


Deeper and Better Category Module
Mass Product Price Change


User avatar
New member

Posts

Joined
Thu Dec 01, 2011 3:04 pm
Location - Bulgaria

Post by IP_CAM » Sat Jun 16, 2018 8:10 am

Well, what keeps you from doing it ?! :o It could possibly even be offered as Extension. ;)
Still, to make such work in the first place, one could not just add another File, replacing
the Original, without making sure, that the new file would only consist out of exactly
the same 'Variables', in order to be 'understud' by the controller/language/model Files,
related to whatever File would be changed.

I would be surprised, if such a construction would not raise a lot of problems, since most
Buyers would expect it to work troughout the whole Scenario of OC Themes and Mods.
But go ahead, if you can do it, because OC won't, I assume ...
Good Luck! ;)
Ernie

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
Who is online

Users browsing this forum: No registered users and 23 guests