View Full Version : Product available, but hidden

12-02-2009, 09:29 AM
We have upgrade options available for our products, and for our old cart we would redirect users to the "Product name upgrade" page after they had entered the serial number for their current product and some other info. This would be the only way to get to this product page.

I thought if I checked "Allow customers to purchase this item" and made it not visible I could get this effect but I just get a 404 page when I try to get to the upgrade product page. Does anyone know if this can be done?

12-02-2009, 09:54 AM
This was something that bugged us, but I never looked into it. Annoying, I just did and it's a 2 second fix!

Open up /includes/classes/class.product.php - go to line 115 and find this:

WHERE ".$productSQL." AND p.prodvisible='1'

Change it to this

WHERE ".$productSQL." ='1'

I've just checked and now when you uncheck the product is visible box, the direct URL still works.

Do bear in mind that the visibility functionality of the product is now gone, so if you have products that you no longer sell, etc, they will need deleting, or setting stock to zero, as otherwise people could get there by other means (old link, spidering link, etc - though thinking on the sitemap should check prodisvisible itself, so that may not be an issue)

12-02-2009, 10:03 AM
Worked like a charm, thanks so much!

12-02-2009, 10:08 AM
No probs. Don't forget to make a note of what you've done for future update/upgrades