Page 1 of 1
Restored web site no longer updating new products on home page.
Posted: Fri Jan 31, 2025 10:34 pm
by IT-Me-Up.co.uk
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?
Re: Restored web site no longer updating new products on home page.
Posted: Sat Feb 01, 2025 1:38 am
by ADD Creative
What version did you restore to? Have you cleaned the cache files from the storage/cache directory?
Re: Restored web site no longer updating new products on home page.
Posted: Sat Feb 01, 2025 2:17 am
by IT-Me-Up.co.uk
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.
Re: Restored web site no longer updating new products on home page.
Posted: Sat Feb 01, 2025 8:28 pm
by ADD Creative
But have you cleaned the cache files from the storage/cache directory?
Re: Restored web site no longer updating new products on home page.
Posted: Mon Feb 03, 2025 8:02 pm
by IT-Me-Up.co.uk
Hi,
Yes I have cleared the Storage/Cache and tried to re-import products but the home page does not change.
Re: Restored web site no longer updating new products on home page.
Posted: Mon Feb 03, 2025 8:26 pm
by paulfeakins
Re: Restored web site no longer updating new products on home page.
Posted: Mon Feb 03, 2025 8:50 pm
by JNeuhoff
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.
Re: Restored web site no longer updating new products on home page.
Posted: Mon Feb 03, 2025 9:31 pm
by IT-Me-Up.co.uk
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.
Re: Restored web site no longer updating new products on home page.
Posted: Mon Feb 03, 2025 10:54 pm
by by mona
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
Re: Restored web site no longer updating new products on home page.
Posted: Mon Feb 03, 2025 11:57 pm
by IT-Me-Up.co.uk
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');
Re: Restored web site no longer updating new products on home page.
Posted: Tue Feb 04, 2025 12:39 am
by by mona
Apologies, I thought you returned back to OC3.0.4.0 - I see it is still OC4 -
That could be anything ..
Re: Restored web site no longer updating new products on home page.
Posted: Tue Feb 04, 2025 12:40 am
by JNeuhoff
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?
Re: Restored web site no longer updating new products on home page.
Posted: Wed Feb 05, 2025 9:05 pm
by JNeuhoff
@ikonicdev: Please don't use generic AI posts, the OP needs genuine support.
Re: Restored web site no longer updating new products on home page.
Posted: Thu Feb 06, 2025 7:48 pm
by paulfeakins
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.
Re: Restored web site no longer updating new products on home page.
Posted: Thu Feb 27, 2025 4:09 pm
by knowband.plugins
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.
Re: Restored web site no longer updating new products on home page.
Posted: Thu Feb 27, 2025 8:16 pm
by IT-Me-Up.co.uk
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.
Re: Restored web site no longer updating new products on home page.
Posted: Thu Feb 27, 2025 8:54 pm
by paulfeakins
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.
Re: Restored web site no longer updating new products on home page.
Posted: Thu Feb 27, 2025 9:57 pm
by knowband.plugins
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.
Re: Restored web site no longer updating new products on home page.
Posted: Thu Feb 27, 2025 10:08 pm
by by mona
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