And add anything else to your HOME layout in ocadmin>design>layouts
The data relationship must also be conformed with the store ID.Optprime wrote: ↑Wed Feb 03, 2021 1:04 amI dont want configuration through the software. i want through database. I am inserting products directly into database iwth my code using php and mysql. In which tables in database should a product exist in order to show up in frontpage? I want both the tables and the columsn. A product should exist in prefix_product, prefix_product_category, prefix_products_description for example but something eludes me.
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
You cannot do that without going through OCadmin.Optprime wrote: ↑Wed Feb 03, 2021 1:04 amI dont want configuration through the software. i want through database. I am inserting products directly into database iwth my code using php and mysql. In which tables in database should a product exist in order to show up in frontpage? I want both the tables and the columsn. A product should exist in prefix_product, prefix_product_category, prefix_products_description for example but something eludes me.
you have to assign featured products to the home page there is no other way - whatever you add to your DB
With that statement a lot eludes you. You are way way off base.Optprime wrote: ↑Wed Feb 03, 2021 1:04 amI dont want configuration through the software. i want through database. I am inserting products directly into database iwth my code using php and mysql. In which tables in database should a product exist in order to show up in frontpage? I want both the tables and the columsn. A product should exist in prefix_product, prefix_product_category, prefix_products_description for example but something eludes me.
In short - the home page is a different layout to the categories page - there is no connection between the products or categories and the home page - which is specifically designed to be different. You must add some container of some form - add products to that container - and then add it to the homepage layout.
If that does not make sense to you, I suggest you play with Opencart as it is built to work - through the backend interface - and that will explain the whole range of areas that are elluding you.
ALSO it is important that you are aware that they way you are “playing” with your opencart negates free support - Not that we are paid by or affiliated with Opencart to give free support, but if you use your own methodology no one can help you for free.
DISCLAIMER:
You should not modify core files .. if you would like to donate a cup of coffee I will write it in a modification for you.
https://www.youtube.com/watch?v=zXIxDoCRc84
You will need to add products ID there. Easy to make the "structure" if you use excell, then copy /paste.
Attachments
featured.png (32.73 KiB) Viewed 1060 times
Upgrade Service | OC 2.3.0.2 PHP 8 | My Custom OC 3.0.3.8 | Buy me a beer
No, this is not true.mikeinterserv wrote: ↑Wed Feb 03, 2021 1:26 amYou cannot do that without going through OCadmin.
you have to assign featured products to the home page there is no other way - whatever you add to your DB
UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk
A blank white page? If so check your error logs.
UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk
Edit - you are correct, sorry I should look more closely, what I wrote below is inaccurate so I will delete it, but you could have expanded on it for the OP, I know he had the info from xxvirusxx but still might have been helpful to others.paulfeakins wrote: ↑Wed Feb 03, 2021 6:32 pmNo, this is not true.mikeinterserv wrote: ↑Wed Feb 03, 2021 1:26 amYou cannot do that without going through OCadmin.
you have to assign featured products to the home page there is no other way - whatever you add to your DB
I wanted something like this. I will give it try. There must be a way. Everytime opencart loads, the frontpage reads the database to show the specified products. Opencart should store somewhere which products are shown in featured products in frontpage.
Ok but where are they stored? Opencart should save somewhere which products are shown in featured products in frontpage, everytime time the home page is loaded. Somewhere this indormation must be stored. Else how should it know what to do? I am asking only this. Where this information is stored?mikeinterserv wrote: ↑Wed Feb 03, 2021 8:17 pmPlease expand on thatpaulfeakins wrote: ↑Wed Feb 03, 2021 6:32 pmNo, this is not true.mikeinterserv wrote: ↑Wed Feb 03, 2021 1:26 amYou cannot do that without going through OCadmin.
you have to assign featured products to the home page there is no other way - whatever you add to your DB
If products are not assigned through featured or some other layout just HOW do they appear on the home page exactly
Other than the default store having featured products already enabled then filling the table in the DB
and if that's what your relying on then you could explain that for the OP and I imagine that will hardly be adequate for what he is trying to do in the long run
What I said is correct in essence as the products are assigned already in the default store.
as long as the featured products is enabled on home which it is in default but very limited
xxvirusxx has pretty much given you all the info above
And what you don't understand from that screenshot?
name: Featured module name
product: products id to be in featured module (43, 40, 42, 30 )
Also depend what theme you have, modules...etc...or maybe is a Latest module...or whatever...
Better give more info.
OC version, theme used, webstore url..
Upgrade Service | OC 2.3.0.2 PHP 8 | My Custom OC 3.0.3.8 | Buy me a beer
You are clearly a competent developer - may I ask why you are unable to search yourself?
Do you not have access to the database?
DISCLAIMER:
You should not modify core files .. if you would like to donate a cup of coffee I will write it in a modification for you.
https://www.youtube.com/watch?v=zXIxDoCRc84
To find out what data is required or the proper database table just reference the model.
Ex: To add a product, you can see what's happening via the model.
https://github.com/opencart/opencart/bl ... uct.php#L3
-
Full Stack Web Developer :: Send a PM for Custom Work.
Backup and learn how to recover before you make any changes!
Users browsing this forum: DigitCart and 143 guests