Empty featured products list after upgrade
Hi guys, I just upgraded my zencart from 1.2.x to 1.3.9h.
I did by creating a new folder with fresh installation of newest version of zencart, then imported the data from old database to new one. Checking one by one each setting page to duplicate the setting from old zencart. When it's done, I deleted all the files in the main folder (after backup of course) and moved the new zencart to that folder.
Everything works great, however, when I want to set a new featured products from Catalog > Featured Products > New Products, the box where it usually contains the list of my products is now empty. Did I do something wrong when upgrading zencart?
I've searched in this forum, there's 1 closed thread about this issue however the person who asked the question didn't share how he fixed it.
Thank you
Re: Empty featured products list after upgrade
It sounds as though you've made up your own process for upgrading your Zen Cart and followed it very carefully. However, the process that you've described doesn't include any provision for moving anything other than configuration settings from your old database.
I'm afraid that what you've done was unnecessary as copying the database and running Zen Cart's upgrade script on it would have bought all those configuration settings over more safely than could be done by hand. Conversely there's nothing in what you've described that suggests you've moved your products, which would explain why you can't add them to the featured list.
For upgrades from 1.2, I generally recommend the following process:
- create a new installation of 1.3.9.h
- replace the new database with a copy of your old one
- run the your_site.com/zc_install script and select upgrade
- re-implement your template design, as though it was a new template
- add the current versions of any add-on mods that you need (some care may be needed if there are database tables / settings associated with them)
In some ways this is easier than upgrading from an more recent version, as it forces you to let go of custom changes and old mods and re-visit whether you really need them. You'll generally end up with a much cleaner and more maintainable site.
Re: Empty featured products list after upgrade
Hi Kuroi, can you describe by this statement : "Conversely there's nothing in what you've described that suggests you've moved your products, which would explain why you can't add them to the featured list."?
I can see my products and my old featured products just fine. The website works just fine. I also can see the list of my product from the admin page. However, when I want to add another featured products, the list box is empty. Is it possible to fix this manually?
Re: Empty featured products list after upgrade
You seemed to be saying that you duplicated the settings by hand. Re-reading your post, I'm now not sure whether you were just checking them, but if that was the case, it's not clear why.
You say that you imported the data from your old database, but you don't say if you've run the upgrade script to make it fully-compatible with the current Zen Cart files.
You also don't tell us whether you've installed or carried forward any add-ons.
Re: Empty featured products list after upgrade
hi Kuroi, no I didn't run the upgrade script. I used fantastico for the new installation, so there's no folder of /zc_install/index.php
I imported the old database to the new ones.
Anyway, I just tried a clean installation, using fantastico, added 3 new products. When I clicked the featured catalogs, still no list. But I can add the product if I use the search function by entering the product id.
I also notice other people who had the same issue in these threads:
http://www.zen-cart.com/forum/showthread.php?t=120595
http://www.zen-cart.com/forum/showthread.php?t=139945
But there's no solution :unsure:
Re: Empty featured products list after upgrade
It sounds like you're trying to use a 1.2 database with 1.3 files. This will lead to unpredictable compatibility errors, which may include the one you're experiencing.
I'd recommend downloading a fresh zip of Zen Cart from this site and following the process I explained earlier for upgrading.
Re: Empty featured products list after upgrade
@kuroi : phew...finally i found out the issue, and no, it's not because of the incomplete upgrade process. I have to read featured.php code to find out why featured products do not list the product.
It turns out there's this code that prevent this to happen:
Code:
// do not include things that cannot go in the cart
$not_for_cart = $db->Execute("select p.products_id from " . TABLE_PRODUCTS . " p left join " . TABLE_PRODUCT_TYPES . " pt on p.products_type= pt.type_id where pt.allow_add_to_cart = 'N'");
You see, I don't want to display the "add to cart" button in product listing page. I read in this forum that I should set this option from Catalog > Product Types > Product - General > Edit > uncheck "this product can be added to cart".
When I check back this option, I can see the featured products list :clap:
Anyway, Is there any other option for me to keep displaying the featured products list without setting the "added to cart" to true? If there's none, I can just edit the sqlquery above which I prefer not to.
Re: Empty featured products list after upgrade
Well done.
As you want the app to function differently to how it's designed, you would need to edit that bit of code to force it to do so.
And you still need to upgrade your database if it's to work properly with the current version of Zen Cart.
Re: Empty featured products list after upgrade
Quote:
Originally Posted by
kuroi
Well done.
As you want the app to function differently to how it's designed, you would need to edit that bit of code to force it to do so.
And you still need to upgrade your database if it's to work properly with the current version of Zen Cart.
Ok, I remark the code and the while command. It works great :)
I'm upgrading my database now. Admin please close this thread and mark it as resolved. thank you.