Post by Optprime » Tue Feb 02, 2021 7:19 pm

Hallo i used php and mysql to insert poduct data in most of opencart product tables. I can see the product both and in the backend and in the frontpage into a specific category. But they dont feature in the home page. It is blank. Which database tables and fields are responsible for that?
Last edited by Optprime on Sun Feb 07, 2021 5:28 am, edited 3 times in total.

Newbie

Posts

Joined
Tue Feb 02, 2021 1:07 am

Post by mikeinterserv » Wed Feb 03, 2021 12:26 am

There are no products on the frontpage as default you have to set featured products in OC admin
And add anything else to your HOME layout in ocadmin>design>layouts

Active Member

Posts

Joined
Thu May 28, 2020 6:55 am
Location - Wales

Post by Optprime » Wed Feb 03, 2021 1:04 am

I dont want configuration through the software. i want through database. I am inserting products directly into database with my code using php and mysql. i want to know the tables in database that a product should exist in order to show up in frontpage. I want both the tables and the columns. A product should exist in prefix_product, prefix_product_category, prefix_products_description for example but something eludes me.
Last edited by Optprime on Wed Feb 03, 2021 4:31 am, edited 1 time in total.

Newbie

Posts

Joined
Tue Feb 02, 2021 1:07 am

Post by straightlight » Wed Feb 03, 2021 1:17 am

Optprime wrote:
Wed Feb 03, 2021 1:04 am
I 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.
The data relationship must also be conformed with the store ID.

The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.


Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by mikeinterserv » Wed Feb 03, 2021 1:26 am

Optprime wrote:
Wed Feb 03, 2021 1:04 am
I 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 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

Active Member

Posts

Joined
Thu May 28, 2020 6:55 am
Location - Wales

Post by by mona » Wed Feb 03, 2021 2:01 am

Optprime wrote:
Wed Feb 03, 2021 1:04 am
I 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.
With that statement a lot eludes you. You are way way off base.

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.


Spinning Social : Links : Menus : Payments : Socials : Ads : Screen Backgrounds : Galleries : Headers : Banners : Promos


Active Member

Posts

Joined
Mon Jun 10, 2019 9:31 am

Post by xxvirusxx » Wed Feb 03, 2021 4:53 pm

If you want to add them to Feature module, then check oc_module table where code=featured.
You will need to add products ID there. Easy to make the "structure" if you use excell, then copy /paste.

Attachments

featured.png

featured.png (32.73 KiB) Viewed 454 times


My converted modules | Buy me a beer | Opencart upgrade service


User avatar
Expert Member

Posts

Joined
Tue Jul 17, 2012 10:35 pm
Location - România

Post by paulfeakins » Wed Feb 03, 2021 6:32 pm

mikeinterserv wrote:
Wed Feb 03, 2021 1:26 am
You 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
No, this is not true.

For quick, professional OpenCart support please email info@antropy.co.uk


User avatar
Guru Member

Posts

Joined
Mon Aug 22, 2011 11:01 pm
Location - Reigate, Surrey, United Kingdom

Post by paulfeakins » Wed Feb 03, 2021 6:32 pm

Optprime wrote:
Tue Feb 02, 2021 7:19 pm
But they dont feature in the home page. It is blank.
A blank white page? If so check your error logs.

For quick, professional OpenCart support please email info@antropy.co.uk


User avatar
Guru Member

Posts

Joined
Mon Aug 22, 2011 11:01 pm
Location - Reigate, Surrey, United Kingdom

Post by mikeinterserv » Wed Feb 03, 2021 8:17 pm

paulfeakins wrote:
Wed Feb 03, 2021 6:32 pm
mikeinterserv wrote:
Wed Feb 03, 2021 1:26 am
You 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
No, this is not true.
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.
Last edited by mikeinterserv on Thu Feb 04, 2021 6:32 am, edited 2 times in total.

Active Member

Posts

Joined
Thu May 28, 2020 6:55 am
Location - Wales

Post by Optprime » Wed Feb 03, 2021 10:08 pm

xxvirusxx wrote:
Wed Feb 03, 2021 4:53 pm
If you want to add them to Feature module, then check oc_module table where code=featured.
You will need to add products ID there. Easy to make the "structure" if you use excell, then copy /paste.
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.

Newbie

Posts

Joined
Tue Feb 02, 2021 1:07 am

Post by Optprime » Wed Feb 03, 2021 10:10 pm

mikeinterserv wrote:
Wed Feb 03, 2021 8:17 pm
paulfeakins wrote:
Wed Feb 03, 2021 6:32 pm
mikeinterserv wrote:
Wed Feb 03, 2021 1:26 am
You 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
No, this is not true.
Please expand on that
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.
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?

Newbie

Posts

Joined
Tue Feb 02, 2021 1:07 am

Post by mikeinterserv » Wed Feb 03, 2021 10:15 pm

The front page calls the DB for products with code in featured module table code=featured
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

Active Member

Posts

Joined
Thu May 28, 2020 6:55 am
Location - Wales

Post by xxvirusxx » Thu Feb 04, 2021 1:39 am

Optprime wrote:
Wed Feb 03, 2021 10:08 pm
Opencart should store somewhere which products are shown in featured products in frontpage.
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..

My converted modules | Buy me a beer | Opencart upgrade service


User avatar
Expert Member

Posts

Joined
Tue Jul 17, 2012 10:35 pm
Location - România

Post by Optprime » Thu Feb 04, 2021 1:56 am

Ok that's it. table module, column setting. From there it needs special coding. Many thanks

Newbie

Posts

Joined
Tue Feb 02, 2021 1:07 am

Post by Optprime » Sat Feb 06, 2021 1:51 am

Now i have another problem. i have managed to display the feauted products in the frontpage. However the link to show product detail is broken. When i click the product's name or picture nothing happens. Instead it reloads teh frontapge. Where is the link to a detailed product description?

Newbie

Posts

Joined
Tue Feb 02, 2021 1:07 am

Post by by mona » Sat Feb 06, 2021 2:13 am

No OC version posted please be so kind as to read the forum rules. viewforum.php?f=176

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.


Spinning Social : Links : Menus : Payments : Socials : Ads : Screen Backgrounds : Galleries : Headers : Banners : Promos


Active Member

Posts

Joined
Mon Jun 10, 2019 9:31 am

Post by Optprime » Sat Feb 06, 2021 3:09 am

Of course and i am the one who runs the project . However I cant find it. I just want to click on product, title or image, in frontpage and to display the products detailed information. i dont know where this information is stored

Newbie

Posts

Joined
Tue Feb 02, 2021 1:07 am

Post by sw!tch » Sat Feb 06, 2021 3:33 am

Link to site?

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!


Active Member

Posts

Joined
Sat Apr 28, 2012 2:32 pm
Location - USA

Post by Optprime » Sat Feb 06, 2021 5:03 pm

In frontpage every product is displayed is a smalli box with minimum details, a thumbnail pricture the price and the title. Both the photo and the title contain links to the actual product page. When you click on that box, either on the photo or the title, a new page opens with more detailed information about the product. A bigger main picture, supplementary pictures, product description, other information like size, vat etc. In my website when i click in the box i described previously in the frontpage, nothing happens. It loads again the frontapage. I click on the product and i dont see the product, i see again all the frontapage. What is wrong, Something is broken. Whee are those links stored?

Newbie

Posts

Joined
Tue Feb 02, 2021 1:07 am
Who is online

Users browsing this forum: Emanuel.C and 31 guests