PDA

View Full Version : Instead of Hotpicks?


seymourb
13-09-09, 10:53
rather than having hotpicks from all categories is it possible to limit it to a few ? I tried entering the refineby code from the instructions but couldn't get it to work. All I've managed so far is to change the number of hotpick products that show on the home page.

Am I overlooking a good set of instructions and examples somewhere on the site?

thanks for any help

seymourb
13-09-09, 12:34
rather than having hotpicks from all categories is it possible to limit it to a few ? I tried entering the refineby code from the instructions but couldn't get it to work. All I've managed so far is to change the number of hotpick products that show on the home page.

Am I overlooking a good set of instructions and examples somewhere on the site?

thanks for any help

since posting that I've tried the following -
- How do I change the category they come from?

To change the category that the hotpicks are served from is a much more complex change to make. You have to create a new refine by definition object and then assign that as an active refine by. Navigate to your index.php file and then amend the following:
Version: Client Software v2

From

$oHotPicksParams->iLimit = 12;
include_once('elements'.DIRECTORY_SEPARATOR.'hot_p icks.php');

To:

$oRefineBy = new stdClass();
$oRefineBy -> iId = 4;
$oRefineBy -> sName = 'Category';
$oRefineByDefinition = new stdClass();
$oRefineByDefinition -> sId = 4;
$oRefineByDefinition -> sName = ‘Electronics’;
$oRefineBy -> oRefineByDefinition = array($oRefineByDefinition);

$oHotPicksParams->aActiveRefineByGroups = array($oRefineBy);
$oHotPicksParams->iLimit = X;

include_once('elements'.DIRECTORY_SEPARATOR.'hot_p icks.php');

Thanks to: ShopWindow

Where X is the number of hotpicks that you wish to be displayed on your homepage and where iId is the ID of the category that you wish to serve hotpicks from. sName will relate to the name of that category.

and amended the category id for the one I want, but I get an error message "Parse error: syntax error, unexpected T_STRING"

currentstyle
13-09-09, 20:11
If you're using the code exactly as you've pasted it, then I can see an error (I understand that a space gets inserted by the forum software in hot_p icks.php);

On this line
$oRefineByDefinition -> sName = ‘Electronics’;

the apostrophes aren't right, try

$oRefineByDefinition -> sName = 'Electronics';

Hope thats helpful

seymourb
19-09-09, 10:58
cheers I'll give that a go !