Page 1 of 1

Urgent, please help with homepage/featured

Posted: Thu Feb 18, 2010 2:50 am
by nocko
Take a look here:

http://www.mygirlball.com/shop/index.ph ... t/featured


I've installed homepage 140 and I can't get the actual featured products to display. Any ideas ??

Re: Urgent, please help with homepage/featured

Posted: Thu Feb 18, 2010 3:01 am
by nocko
the

Code: Select all

      <?php for ($i = 0; $i < sizeof($products); $i = $i + 4) { ?>
command does not run, and on my homepage i get the error
Undefined variable: products

Re: Urgent, please help with homepage/featured

Posted: Thu Feb 18, 2010 7:07 pm
by fido-x
nocko wrote:the

Code: Select all

      <?php for ($i = 0; $i < sizeof($products); $i = $i + 4) { ?>
command does not run, ...
mygirlball.jpg

mygirlball.jpg (92.19 KiB) Viewed 1102 times

As can be seen from the attached image, the page states that is is "Showing 1 to 2 of 2". The problem is with the display of the images. There are many posts on the forum about "disappearing" images, and the only fix(es) that I'm aware of are to (a) make sure that permissions on your image files are correct (should be 664); and (b) go through and resave each product one at a time.
nocko wrote:... and on my homepage i get the error
Undefined variable: products
Where did this error come from? The "Latest Products", "Featured Products" and "Special Offers" modules provided with the homepage package do NOT use a variable called $products (they use $latest, $featured and $special, respectively). Are you using my featured products module or Q's?

Re: Urgent, please help with homepage/featured

Posted: Fri Feb 19, 2010 1:25 am
by nocko
I see, that makes sense.. I didn't realize this was a common error.

I downloaded and used the package from your website so I'm assuming it's your featured package that I'm using. Didn't know there were separate modules till now ;D

I will correct the permissions and do as your suggested. Will return with results.

The goal is to get these featured products on the homepage, so maybe I can use $featured instead of $products in common/home? I'll try it now.

Re: Urgent, please help with homepage/featured

Posted: Fri Feb 19, 2010 3:54 am
by nocko
I just tried deleting a product and re-saving it as a featured after making sure the permissions were correct (they were), still doesn't work..

Using $featured doesn't work on the homepage... hmm probably because featured needs to be defined in controller/home.php? Im still new to php..

Re: Urgent, please help with homepage/featured

Posted: Fri Feb 19, 2010 8:09 am
by fido-x
The homepage package is a complete replacement for the existing homepage set up and replaces the existing home controller and template files (catalog/controller/common/home.php and catalog/view/theme/default/template/common/home.tpl).

You're not using a default template. Did you copy the homepage template file (catalog/view/theme/default/template/common/home.tpl) from the default to your own template. This should fix the issue with the featured products on the homepage. At least it should get rid of the error, but you'll still need to address the "disappearing images" issue.