Hi there!
(i'm a newbie in opencart structure and coding, sorry in advance)
I'm trying to use some custom product values in product tabs, product filter in category page and so on, at the moment I'm using VQmod embedding with xml or uplaoding edited files in modification folder.
Now I declared and processed all the variables in the catalog/controller/product/category.php and in the catalog/model/catalog/product.php but I can't use them in the .twig files. sometimes I get some errors and sometimes ju nothing happens, there's a "known" way to do that?
Should I just create the function to get values in model then load it in controller and then use it in template?
At the moment I'm looking for the $data declaration to hook there my custom fields so I get these products info all in $data with the others.
Thanks in advance!
OC version. This is what CMS is about. Declaring your models from the controllers and call the response object to load the TWIG files. Bunch of examples from the core controllers can be used to achieve this.mars99 wrote: ↑Wed May 12, 2021 10:54 pmHi there!
(i'm a newbie in opencart structure and coding, sorry in advance)
I'm trying to use some custom product values in product tabs, product filter in category page and so on, at the moment I'm using VQmod embedding with xml or uplaoding edited files in modification folder.
Now I declared and processed all the variables in the catalog/controller/product/category.php and in the catalog/model/catalog/product.php but I can't use them in the .twig files. sometimes I get some errors and sometimes ju nothing happens, there's a "known" way to do that?
Should I just create the function to get values in model then load it in controller and then use it in template?
At the moment I'm looking for the $data declaration to hook there my custom fields so I get these products info all in $data with the others.
Thanks in advance!
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
Do you understand MVC?
If not, Google it and learn it, then look at how other pages in OC get their data from the controller to the view.
UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk
Hi there! My OC version is 3.0.3.2straightlight wrote: ↑Wed May 12, 2021 11:20 pmOC version. This is what CMS is about. Declaring your models from the controllers and call the response object to load the TWIG files. Bunch of examples from the core controllers can be used to achieve this.
Hi and thanks for answering, yes I know what's MVC, I'm not able to hook $data variable and add my custom field, in Admin everything worked fine, I think I'm missing something.paulfeakins wrote: ↑Thu May 13, 2021 4:38 pmDo you understand MVC?
If not, Google it and learn it, then look at how other pages in OC get their data from the controller to the view.
Indeed. The codes you are referring about are not posted. However, you could always create a new service request in the Commercial Support section to have this incident request resolved as a custom job.mars99 wrote: ↑Thu May 13, 2021 10:07 pmHi there! My OC version is 3.0.3.2straightlight wrote: ↑Wed May 12, 2021 11:20 pmOC version. This is what CMS is about. Declaring your models from the controllers and call the response object to load the TWIG files. Bunch of examples from the core controllers can be used to achieve this.
Hi and thanks for answering, yes I know what's MVC, I'm not able to hook $data variable and add my custom field, in Admin everything worked fine, I think I'm missing something.paulfeakins wrote: ↑Thu May 13, 2021 4:38 pmDo you understand MVC?
If not, Google it and learn it, then look at how other pages in OC get their data from the controller to the view.
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
okstraightlight wrote: ↑Thu May 13, 2021 11:16 pmIndeed. The codes you are referring about are not posted. However, you could always create a new service request in the Commercial Support section to have this incident request resolved as a custom job.mars99 wrote: ↑Thu May 13, 2021 10:07 pmHi there! My OC version is 3.0.3.2straightlight wrote: ↑Wed May 12, 2021 11:20 pmOC version. This is what CMS is about. Declaring your models from the controllers and call the response object to load the TWIG files. Bunch of examples from the core controllers can be used to achieve this.
Hi and thanks for answering, yes I know what's MVC, I'm not able to hook $data variable and add my custom field, in Admin everything worked fine, I think I'm missing something.paulfeakins wrote: ↑Thu May 13, 2021 4:38 pmDo you understand MVC?
If not, Google it and learn it, then look at how other pages in OC get their data from the controller to the view.
Who is online
Users browsing this forum: No registered users and 148 guests