Post by IT-Me-Up.co.uk » Fri Jan 31, 2025 10:34 pm

Hi,
Long story short, upgrade to 4.1.0.0 failed, so I restored my site and database files via my hosting sites backup manager (Hostinger).

Now when I import new products into my site, they do not show up on the home page under the 'Latest Product' section.
I have tried the following steps:
* Deleted and recreated the latest product extension
* Removed and re-added the Latest Product section in the Layout manager
* Checked SQL for product info, status = 1, date added = today, store Id = 0, quanity=1+ etc. etc.
* Re-run my XML import add-on to pull latest products from supplier

Nothing in the error logs about this, so asking on here for some support please.

SQL shows 15 new products since the start of the week:
SELECT p.product_id, pd.name, p.status, p.date_added, p.quantity, ps.store_id
FROM oc_product p
JOIN oc_product_description pd ON p.product_id = pd.product_id
LEFT JOIN oc_product_to_store ps ON p.product_id = ps.product_id
WHERE p.date_added >= '2025-01-27' and p.status = 1 and p.quantity > 0;

However the last newest product on my site is from the date of my backup (13th Jan)

Also removed any VQMod XMLs as a test, but no luck.

Any other ideas please?

Please Check Out My Site:
https://www.IT-Me-Up.co.uk/


New member

Posts

Joined
Thu Sep 21, 2017 4:27 pm

Post by ADD Creative » Sat Feb 01, 2025 1:38 am

What version did you restore to? Have you cleaned the cache files from the storage/cache directory?

www.add-creative.co.uk


Guru Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom

Post by IT-Me-Up.co.uk » Sat Feb 01, 2025 2:17 am

I restored back to 4.0.2.3
Cache has been cleared from Admin dashboard as well as from the Hostinger portal / CDN
Deleted the VQMod cache as well.

Please Check Out My Site:
https://www.IT-Me-Up.co.uk/


New member

Posts

Joined
Thu Sep 21, 2017 4:27 pm

Post by ADD Creative » Sat Feb 01, 2025 8:28 pm

But have you cleaned the cache files from the storage/cache directory?

www.add-creative.co.uk


Guru Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom

Post by IT-Me-Up.co.uk » Mon Feb 03, 2025 8:02 pm

Hi,
Yes I have cleared the Storage/Cache and tried to re-import products but the home page does not change.

Please Check Out My Site:
https://www.IT-Me-Up.co.uk/


New member

Posts

Joined
Thu Sep 21, 2017 4:27 pm

User avatar
Legendary Member
Online

Posts

Joined
Mon Aug 22, 2011 11:01 pm
Location - London Gatwick, United Kingdom

Post by JNeuhoff » Mon Feb 03, 2025 8:50 pm

IT-Me-Up.co.uk wrote:
Mon Feb 03, 2025 8:02 pm
Hi,
Yes I have cleared the Storage/Cache and tried to re-import products but the home page does not change.
Re-importing products won't restore the home page. The Home Page contents is usually made up of HTML modules, see the design > layouts for the home page for more details which ones it uses, and then restore them from a backup database.

Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig


User avatar
Guru Member

Posts

Joined
Wed Dec 05, 2007 3:38 am


Post by IT-Me-Up.co.uk » Mon Feb 03, 2025 9:31 pm

I've tried to delete all the componets of the home page layout and add them back but the lastest product section still shows old items.

Please Check Out My Site:
https://www.IT-Me-Up.co.uk/


New member

Posts

Joined
Thu Sep 21, 2017 4:27 pm

Post by by mona » Mon Feb 03, 2025 10:54 pm

Often this is a caching issue.
Have you cleared ALL your cache, including any caching you have on your server?
Also => viewtopic.php?f=201&t=207498#p737358

Double check the dates in 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


User avatar
Expert Member

Posts

Joined
Mon Jun 10, 2019 9:31 am

Post by IT-Me-Up.co.uk » Mon Feb 03, 2025 11:57 pm

Hi,
I'm fairly certain I have cleared down all caches.
In v4.0.2.3 this line already exists in system/framework.php

Code: Select all

$response->addHeader('Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0');
$response->addHeader('Pragma: no-cache');

Please Check Out My Site:
https://www.IT-Me-Up.co.uk/


New member

Posts

Joined
Thu Sep 21, 2017 4:27 pm

Post by by mona » Tue Feb 04, 2025 12:39 am

Apologies, I thought you returned back to OC3.0.4.0 - I see it is still OC4 -
That could be anything ..

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


User avatar
Expert Member

Posts

Joined
Mon Jun 10, 2019 9:31 am

Post by JNeuhoff » Tue Feb 04, 2025 12:40 am

IT-Me-Up.co.uk wrote:
Mon Feb 03, 2025 9:31 pm
I've tried to delete all the componets of the home page layout and add them back but the lastest product section still shows old items.
In PHPMyAdmin run this query:

Code: Select all

SELECT * FROM `oc_product`  
ORDER BY `oc_product`.`date_added`  DESC
Do the results match up with the expected ones?

Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig


User avatar
Guru Member

Posts

Joined
Wed Dec 05, 2007 3:38 am


Post by JNeuhoff » Wed Feb 05, 2025 9:05 pm

@ikonicdev: Please don't use generic AI posts, the OP needs genuine support.

Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig


User avatar
Guru Member

Posts

Joined
Wed Dec 05, 2007 3:38 am


Post by paulfeakins » Thu Feb 06, 2025 7:48 pm

JNeuhoff wrote:
Wed Feb 05, 2025 9:05 pm
@ikonicdev: Please don't use generic AI posts, the OP needs genuine support.
Deleting their post and issuing a warning as their services list Shopify and WooCommerce but not OpenCart.

UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk


User avatar
Legendary Member
Online

Posts

Joined
Mon Aug 22, 2011 11:01 pm
Location - London Gatwick, United Kingdom

Post by knowband.plugins » Thu Feb 27, 2025 4:09 pm

Just checking in—have you got any updates on the issue? Is the functionality working now? Are you able to display the latest products, or are you still experiencing the issue?

There might be only one scenario, we can assume that the date_available field in the oc_product table is not correct or might be of future date, since the query to fetch the Latest Products in the default opencart store have the check to fetch the products whose "date_available<=NOW()".

Query is attached for your reference:

Code: Select all

SELECT p.product_id FROM " . DB_PREFIX . "product p LEFT JOIN " . DB_PREFIX . "product_to_store p2s ON (p.product_id = p2s.product_id) WHERE p.status = '1' AND 

p.date_available <= NOW() 

AND p2s.store_id = '" . (int)$this->config->get('config_store_id') . "' ORDER BY p.date_added DESC LIMIT " . (int)$limit
We also recommend checking whether you can successfully place an order with the newly uploaded products.

Please review the above information and let us know if it helps.

Regards,
Knowband Team

Opencart Plugins: Knowband Store
Email: support@knowband.com


User avatar
Active Member

Posts

Joined
Thu Aug 04, 2016 2:56 pm

Post by IT-Me-Up.co.uk » Thu Feb 27, 2025 8:16 pm

knowband.plugins wrote:
Thu Feb 27, 2025 4:09 pm
Just checking in—have you got any updates on the issue? Is the functionality working now? Are you able to display the latest products, or are you still experiencing the issue?

There might be only one scenario, we can assume that the date_available field in the oc_product table is not correct or might be of future date, since the query to fetch the Latest Products in the default opencart store have the check to fetch the products whose "date_available<=NOW()".

Query is attached for your reference:

Code: Select all

SELECT p.product_id FROM " . DB_PREFIX . "product p LEFT JOIN " . DB_PREFIX . "product_to_store p2s ON (p.product_id = p2s.product_id) WHERE p.status = '1' AND 

p.date_available <= NOW() 

AND p2s.store_id = '" . (int)$this->config->get('config_store_id') . "' ORDER BY p.date_added DESC LIMIT " . (int)$limit
We also recommend checking whether you can successfully place an order with the newly uploaded products.

Please review the above information and let us know if it helps.
It's still an issue, I thought the restored files from my hosting provider might not have been correct.
So I deleted my whole site and database, the redeployed OC 4.0.2.3.
However I am now having issues with my XML Import extension and not heard from the extension support team yet.

Please Check Out My Site:
https://www.IT-Me-Up.co.uk/


New member

Posts

Joined
Thu Sep 21, 2017 4:27 pm

Post by paulfeakins » Thu Feb 27, 2025 8:54 pm

IT-Me-Up.co.uk wrote:
Thu Feb 27, 2025 8:16 pm
So I deleted my whole site and database, the redeployed OC 4.0.2.3.
However I am now having issues with my XML Import extension and not heard from the extension support team yet.
At this point, most developers do not recommend OpenCart 4, not least due to many extensions not yet being ready.

I suggest you go back to 3.0.4.0.

UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk


User avatar
Legendary Member
Online

Posts

Joined
Mon Aug 22, 2011 11:01 pm
Location - London Gatwick, United Kingdom

Post by knowband.plugins » Thu Feb 27, 2025 9:57 pm

paulfeakins wrote:
Thu Feb 27, 2025 8:54 pm
IT-Me-Up.co.uk wrote:
Thu Feb 27, 2025 8:16 pm
So I deleted my whole site and database, the redeployed OC 4.0.2.3.
However I am now having issues with my XML Import extension and not heard from the extension support team yet.
At this point, most developers do not recommend OpenCart 4, not least due to many extensions not yet being ready.

I suggest you go back to 3.0.4.0.
Agreed. You can check the existing issues in the Github Repository. Kindly downgrade your website to OC3.x and try again; that will help you best.

Regards,
Knowband Team

Opencart Plugins: Knowband Store
Email: support@knowband.com


User avatar
Active Member

Posts

Joined
Thu Aug 04, 2016 2:56 pm

Post by by mona » Thu Feb 27, 2025 10:08 pm

Code: Select all

Any other ideas please?
Best advice is to use 3.0.4.0 and leave OC4 until it is production ready and tested for stability, security and bugs.

As above OC4 is not recommended for production sites.
3.0.4.0 was developed to be compatible with php8 and can be found https://www.opencart.com/index.php?rout ... ad/history

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


User avatar
Expert Member

Posts

Joined
Mon Jun 10, 2019 9:31 am
Who is online

Users browsing this forum: No registered users and 4 guests