Guest Posted December 15, 2009 Share Posted December 15, 2009 The following information is from my host web technicist, and he stops Product.php and requests me to optimize the script of product.php.“The error “We’re sorry, but the Web address you entered is no longer available “ you are facing is due to the fact that the script product.php has been renamed product.php.disabled. This steps was taken, as your account was using excessive resources of the server.We advise you to please go though the script and optimize it to bring down the resource usage of your account. “Since I don’t know much PHP,I need your suggestion to solve the problem.Thank you Thank you very much!My site is: [Fake website - Moderated by Patric] Link to comment Share on other sites More sharing options...
Guest Posted December 15, 2009 Share Posted December 15, 2009 see the above information pls. Link to comment Share on other sites More sharing options...
Ardian Yuli Setyanto Posted December 15, 2009 Share Posted December 15, 2009 Hello, I think Prestashop is very light, may be the problem is in the number of your products. Or your webhosting is very stingy Link to comment Share on other sites More sharing options...
Guest Posted December 15, 2009 Share Posted December 15, 2009 Hi Ardian,Are u sure Prestashop is very light ?Sometimes I feel the resources of my CPU is taken up much even when I open prestashop.com in my computer.Can you please take a look at my site now and check if it takes up much resources in your computer.I have renamed the Product.php and it is available.Please help check it .Thank you very much! Link to comment Share on other sites More sharing options...
rocky Posted December 15, 2009 Share Posted December 15, 2009 Topics merged Link to comment Share on other sites More sharing options...
presta-dyr Posted December 15, 2009 Share Posted December 15, 2009 I have seen performance problems with a webshop that has more than 17000 products. I got a comment from the service provider stating that 3374026 rows was examined just to show the front page.I traced it down to classes/Product.php and the method getNewProducts(). Perhaps this could be optimized by getting a list of the newest products first and then subsequently select/join as necessary?/Kjeld Link to comment Share on other sites More sharing options...
Guest Posted December 23, 2009 Share Posted December 23, 2009 Thank you presta-dyr ,My site looks better thank before,it seems going smonthly now! Link to comment Share on other sites More sharing options...
presta-dyr Posted December 23, 2009 Share Posted December 23, 2009 Hi [Fake website - Moderated by Patric].Did you optimize getNewProducts()?/Kjeld Link to comment Share on other sites More sharing options...
Guest Posted December 23, 2009 Share Posted December 23, 2009 No, I don't know how to do it! webmaster of the host asked me to optimize it, I don't know how! I am not a php coder! Sorry I can't help! Link to comment Share on other sites More sharing options...
chineseboy Posted December 23, 2009 Share Posted December 23, 2009 @x - I thought you just said that you've managed to make your site smoother than before. How did you manage that? Link to comment Share on other sites More sharing options...
ruilong Posted January 15, 2010 Share Posted January 15, 2010 Get new products get all products added within a selected number of days as I remember, so what you need to do is just change the number of days a product is considered "new" so that not ALL products in your shop is in the new products list. I think that should solve the problem for you.you can change that in Administration - Settings - Product Link to comment Share on other sites More sharing options...
chineseboy Posted January 15, 2010 Share Posted January 15, 2010 How would you go about completely switching off new products? Link to comment Share on other sites More sharing options...
rocky Posted January 16, 2010 Share Posted January 16, 2010 Go to Modules > Blocks section and uninstall the New products block. You can also delete new-products.php to stop people viewing all the new products manually. Link to comment Share on other sites More sharing options...
chineseboy Posted January 17, 2010 Share Posted January 17, 2010 hi Rocky. I was referring to the function getnewproducts that a previous poster was referring to. This is in products.php. Would I be able to delete this function without any repercussions? Link to comment Share on other sites More sharing options...
rocky Posted January 17, 2010 Share Posted January 17, 2010 I just did a search over the entire Prestashop code for getNewProducts. The only files that use this function are new-products.php and modules/blocknewproducts/blocknewproducts.php. It is safe to delete this function as long as you also delete the files that use it. You will also need to remove the link to new-products.php in modules/blockvariouslinks/blockvariouslinks.tpl and sitemap.tpl in your theme's directory. Link to comment Share on other sites More sharing options...
chineseboy Posted January 17, 2010 Share Posted January 17, 2010 Thanks rocky for the time spent on this. I'm going to delete everything to do with new products since people are saying that its kind of demanding on servers. Link to comment Share on other sites More sharing options...
Tomasz Słomiński Posted January 19, 2010 Share Posted January 19, 2010 Deleting function getnewproduct() from products.php has no sense at all. It will be enough if you delete / modify files using that function. Link to comment Share on other sites More sharing options...
alpaca Posted January 19, 2010 Share Posted January 19, 2010 Rocky is this an issue that the rest of us need to worry about? Link to comment Share on other sites More sharing options...
rocky Posted January 20, 2010 Share Posted January 20, 2010 I don't think this is an issue many people would have to worry about. It is only a problem if you are adding lots of products to your site in a short period of time, since they will all be marked as new products and included in the new products query. As ruilong point out above, the best solution is to go to Preferences > Products and change the "Number of days a product is considered 'new'" to a lower value, or 0 to disable new products altogether. After you've added all your products and waited a few days, if you will only be adding a small number of new products at a time, you can increase the value again to allow a few new products to appear in the new products block. Link to comment Share on other sites More sharing options...
alpaca Posted January 20, 2010 Share Posted January 20, 2010 Thanks for the explanation Rocky Link to comment Share on other sites More sharing options...
tomerg3 Posted February 21, 2010 Share Posted February 21, 2010 I have just created http://www.prestashop.com/forums/viewthread/45000/It helps explain this query, and will have more examples.Edit: I just noticed it's the 45,000th thread, cool Link to comment Share on other sites More sharing options...
Recommended Posts