Post by nocko » Thu Feb 18, 2010 2:50 am

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 ??

New member

Posts

Joined
Tue Jan 26, 2010 2:14 pm

Post by nocko » Thu Feb 18, 2010 3:01 am

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

New member

Posts

Joined
Tue Jan 26, 2010 2:14 pm

Post by fido-x » Thu Feb 18, 2010 7:07 pm

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 1472 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?

Image
Modules for OpenCart 2.3.0.2
Homepage Module [Free - since OpenCart 0.7.7]
Multistore Extensions
Store Manager Multi-Vendor/Multi-Store management tool

If you're not living on the edge ... you're taking up too much space!


User avatar
Expert Member

Posts

Joined
Sat Jun 28, 2008 1:09 am
Location - Tasmania, Australia

Post by nocko » Fri Feb 19, 2010 1:25 am

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.

New member

Posts

Joined
Tue Jan 26, 2010 2:14 pm

Post by nocko » Fri Feb 19, 2010 3:54 am

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..

New member

Posts

Joined
Tue Jan 26, 2010 2:14 pm

Post by fido-x » Fri Feb 19, 2010 8:09 am

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.

Image
Modules for OpenCart 2.3.0.2
Homepage Module [Free - since OpenCart 0.7.7]
Multistore Extensions
Store Manager Multi-Vendor/Multi-Store management tool

If you're not living on the edge ... you're taking up too much space!


User avatar
Expert Member

Posts

Joined
Sat Jun 28, 2008 1:09 am
Location - Tasmania, Australia
Who is online

Users browsing this forum: simple-opencart and 76 guests