Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Only Displaying One Product In Specials Box


luddite_jean

Recommended Posts

I moved the specials box from the right column to the main page, but it's only displaying one product at a time. In Admin>Config>Maximum Values>Special Products I have the value set to 3, and also the Selection of Products on Special is set to 3 - this seems to imply that only one Special will be displayed at a time.

 

I haven't altered any code in specials.php.

 

Have I missed something?

 

-Jean.

Link to comment
Share on other sites

Only 1 special is displayed at a time in the Specials Box.

 

Vger

 

Thanks for the reply, Vger. Do you know if there's an easy way of changing this, or do I need to get my PHP reference out again? :-)

 

-Jean.

Link to comment
Share on other sites

I'm trying to use the contribution that Andrew mentioned, and I've replace two files and edited another, but now the instructions the following (and I don't have a clue what I'm supposed to do):

 

Now, execute the following queries.

These queries will allow you to configure the number of items on your info boxes using the admin interface.

These options will be in the Configuration/Maximum Values session of the admin interface.

 

INSERT INTO configuration

(configuration_id,

configuration_title,

configuration_key,

configuration_value,

configuration_description,

configuration_group_id,

sort_order,

last_modified,

date_added,

use_function,

set_function)

VALUES

('',

'No. Items in the Specials info box',

'N_RANDOM_SELECT_SPECIALS',

'1',

'Select the number of items that will be displayed in the Specials info box. Select 0 (zero) to hide the box.',

'3',

NULL,

NOW(),

NOW(),

NULL,

'tep_cfg_select_option(array(0,1,2,3,4,5,6,7,8,9,10),');

 

INSERT INTO configuration

(configuration_id,

configuration_title,

configuration_key,

configuration_value,

configuration_description,

configuration_group_id,

sort_order,

last_modified,

date_added,

use_function,

set_function)

VALUES

('',

'No. Items in the What s New info box',

'N_RANDOM_SELECT_NEW',

'1',

'Select the number of items that will be displayed in the What s New info box. Select 0 (zero) to hide the box.',

'3',

NULL,

NOW(),

NOW(),

NULL,

'tep_cfg_select_option(array(0,1,2,3,4,5,6,7,8,9,10),');

Link to comment
Share on other sites

  • 7 months later...
Sorted the last problem (displaying in column) by adding an incremental loop with columns and rows, and display a Content Box instead of an Info Box.

 

Now works just how I want it!

 

-Jean.

 

What exactly you changed to display specials in row??? :)

Link to comment
Share on other sites

  • 2 months later...

Can anyone tell me how to get this to go in one row and not in columns??? Please

 

The code is

 

////

// Returns "n" distinct random rows from a database query

function tep_random_select($query, $n = -1) {

$random_product_array = array();

$random_query = tep_db_query($query);

$num_rows = tep_db_num_rows($random_query);

 

if ($n < 0) {

$its = 1;

} else {

$its = $n ;

}

 

$iterations = min($num_rows,$its);

$random_product = '';

 

if ($num_rows > 0) {

$random_rows = array();

for($i = 0; $i < $iterations; ) {

$row = tep_rand(0, ($num_rows - 1));

if(!in_array($row,$random_rows)) {

array_push($random_rows, $row);

tep_db_data_seek($random_query, $row);

$random_product_array[] = tep_db_fetch_array($random_query);

$i++;

}

}

return $random_product_array;

} // end if ($num_rows> 0)

else {

return $random_product ; // empty value

}

}

Link to comment
Share on other sites

  • 2 months later...
Sorted the last problem (displaying in column) by adding an incremental loop with columns and rows, and display a Content Box instead of an Info Box.

 

Now works just how I want it!

 

-Jean.

 

Can you please tell me ,How did you display columns into rows .Please i need help for it

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...