Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

multiple $specialbox with sts


makesure

Recommended Posts

Hello,

 

Please note that I'm a newbee with php.

I use osCommerce-2.2rc2a in combination with the STSv4.5.8_1_2_1

 

I made some changes to get two ($specialbox and $specialbo2)

different specials in my template, so I did this:

 

 

In the file:

catalog/includes/modules/sts_inc/sts_column_left.php

 

 

after:

include(DIR_WS_BOXES . 'specials.php');

$sts->restart_capture ('specialbox', 'box'); // Get special box

$sts->template['specialfriendbox']=$sts->template['specialbox']; // Shows spec

 

i added:

do {

include(DIR_WS_BOXES . 'specials.php');

$sts->restart_capture ('specialbo2', 'box'); // Get special box

} while( $sts->template['specialbox'] == $sts->template['specialbo2'] );

 

It seems to work, most of the time you get two different specials, but

not all the time, the do while doesn't do the job.

 

What do i do wrong?

 

Thanks in advance for your time and effort!!!

 

Derk

 

P.S. I know that this doesn't work with only 1 special, i do have more specials.

I'm doing the technical side of the sites for my brother and his wife.

A newbee with php, but have some experience programming other

languages. I like assembly coding best, but php is also nice!

Link to comment
Share on other sites

I finally figured it out, this solution works with a two special products minimum,

it's easy to make it work well with one product, but i don't need it.

 

 

include(DIR_WS_BOXES . 'specials.php');

$sts->restart_capture ('specialbox', 'box'); // Get special box

$sts->template['specialfriendbox']=$sts->template['specialbox']; // Shows spec

 

$rndpr = $random_product;

 

do {

include(DIR_WS_BOXES . 'specials.php');

$sts->restart_capture ('specialbo2', 'box'); // Get special box

} while( $rndpr == $random_product );

I'm doing the technical side of the sites for my brother and his wife.

A newbee with php, but have some experience programming other

languages. I like assembly coding best, but php is also nice!

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...