Jump to content

[Resolved] Featured Product


Christopher Short

Recommended Posts

It is "random", but in CC611 (I do not recall how far back), each product can have its eligibility to appear in the Featured Product box enabled by a checkbox in admin on the product's General Information tab.

Even so, I have found that sometimes CubeCart will not show that box because CubeCart was unable to find a product - randomly, status enabled and not hidden (category-related). (I have written a code snippet to keep trying for 20 attempts.)

The easiest way is, if running CC611 (I don't know how far back this goes), is to rename the template file to something other than box.featured.php.

The next easiest way, to edit the main.php skin template to hide the HTML of that box. (Might still need to do this, as it seems that box is the only thing left for your right side-column. An empty side-column won't let the space for it collapse naturally.)

Keep in mind that, as a logged in admin, what you see on the storefront includes what would otherwise be hidden from the customer.

 

Link to comment
Share on other sites

20 minutes ago, bsmither said:

It is "random", but in CC611 (I do not recall how far back), each product can have its eligibility to appear in the Featured Product box enabled by a checkbox in admin on the product's General Information tab.

Even so, I have found that sometimes CubeCart will not show that box because CubeCart was unable to find a product - randomly, status enabled and not hidden. (I have written a code snippet to keep trying for 20 attempts.)

The easiest way is, if running CC611 (I don't know how far back this goes), is to rename the template file to something other than box.featured.php.

The next easiest way, to edit the main.php skin template to hide the HTML of that box.

Keep in mind that, as a logged in admin, what you see on the storefront includes what would otherwise be hidden from the customer.

 

How do I comment out a line in the main.php file? I can't seem to figure that out but I found out how to delete the featured products.(I want to be able to add it back at a later date)

nevermind, <!-- --> did it.

Link to comment
Share on other sites

CubeCart chose to make all products 'featured' by default in order to maintain consistent behavior with previous versions.

In my own store, I prefer to have only a few select products featured and thus have all new products default to NOT featured.

If you are interested in maintaining the ability to enable featured products but don't want them all featured by default, make the following changes:

// In admin/sources/products.index.inc.php, line 974, change:

// from:
'featured' => 1,

// to:
'featured' => 0,

// Update your database to set all products to not featured:
UPDATE `CubeCart_inventory` SET `featured`=0;

// If you ever import products, remove the following lines (163-165) from admin/sources/products.import.inc.php:
if(!isset($product_record['featured']) || empty($product_record['featured'])) {
	$product_record['featured'] = 1;
}

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...