After I finished an installment of the Latest_Featured_Special_Products_vo79.1, I got an error 1054 when disabled the product status.
I removed and replaced the admin/controller/product.php, the error's gone. Please direct me to fix the file product.php!
Add this first at this link.
http://forum.opencart.com/index.php/top ... l#msg13098
add to your catalog/template/module/*.tpl files for the latest/feature/specials
">" title="" alt="">">
in catalog/extension/module/*.php add the following for each of the three files for latest/featured/ specials
if ($product_data) {
$view->set('products', $product_data);
}
These changes might help.
http://forum.opencart.com/index.php/top ... l#msg13098
add to your catalog/template/module/*.tpl files for the latest/feature/specials
">" title="" alt="">">
in catalog/extension/module/*.php add the following for each of the three files for latest/featured/ specials
if ($product_data) {
$view->set('products', $product_data);
}
These changes might help.
Brent
I'm not sure this is necessary. If there are no products, then the foreach loop will just exit. I have added the fix for admin/controller/product.php from the other post.
Then I set Product 1 to featured: yes, special: yes. I see the product on the front page
Then I set Product 1 status to "disabled". I no longer see the product on the front page. But no error.
Then I set Product 1 to featured: yes, special: yes. I see the product on the front page
Then I set Product 1 status to "disabled". I no longer see the product on the front page. But no error.
I've updated the contrib with the admin/controller/product.php fix:
http://forum.opencart.com/index.php/top ... w.html#new
http://forum.opencart.com/index.php/top ... w.html#new
The reason for the if clause in the .tpl is if you have a module set, but no products returned yet,
you receive errors when tpl is called.
The current code still calls tpl.
I did this when testing my random code because I wanted to check by adding one item at a time
and making sure when the random effect started.
Because I had no products set in specials, page errors occurred until I added the if clause so tpl
code would not run until there where results.
Also, If you include this, no message is required because there will be no output for a module that has no data.
When testing, if there is no data, such as in specials, you don't end up displaying a SPECIAL OFFER header with the message no products to display.
you receive errors when tpl is called.
The current code still calls tpl.
I did this when testing my random code because I wanted to check by adding one item at a time
and making sure when the random effect started.
Because I had no products set in specials, page errors occurred until I added the if clause so tpl
code would not run until there where results.
Also, If you include this, no message is required because there will be no output for a module that has no data.
When testing, if there is no data, such as in specials, you don't end up displaying a SPECIAL OFFER header with the message no products to display.
Last edited by Anonymous on Sun Dec 28, 2008 8:39 pm, edited 1 time in total.
Brent
But like i said, the foreach loop will just exit if there are no products. There is no error:bthirsk wrote: The reason for the if clause in the .tpl is if you have a module set, but no products returned yet,
you receive errors when tpl is called.
The current code still calls tpl.
http://kewlazme.homeip.net/r272/
All products deleted from my database.
This would be the only use for it.Also, If you include this, no message is required because there will be no output for a module that has no data.
When testing, if there is no data, such as in specials, you don't end up displaying a SPECIAL OFFER header with the message no products to display.
Last edited by Qphoria on Sun Dec 28, 2008 9:00 pm, edited 1 time in total.
Who is online
Users browsing this forum: No registered users and 2 guests