Jump to content
Sign in to follow this  
lauraxg

STS and Related Products Contrib

Recommended Posts

FIRST OFF THESE ARE TWO GREAT CONTRIBS!!

THANKS TO THE PROGRAMERS AND OTHER SIMPLE FOLKS WHO TAKE THE TIME TO DO THESE

 

Now my question ... I installed Related products contrib and it works fine when

I turn off STS templates but when applying the STS template it disappears

where or how can I add a $ sts commad to have the info box with the related product

show up in my product info .php page?? in other words ... make these two work together?

 

thanks here is the url

 

http://ariellesgallery.netfirms.com/nfosco...products_id=191

 

 

:thumbsup:

Share this post


Link to post
Share on other sites

Yep, Add this to Catalog/includes/modules/sts_inc/product_info.php at the bottom

 

// See if any "Related" items. 
$sts->start_capture();
// DANIEL: begin - show related products
 $attributes = "select pop_products_id_slave, products_name, products_price, products_tax_class_id, products_image from " . TABLE_PRODUCTS_OPTIONS_PRODUCTS . ", " . TABLE_PRODUCTS_DESCRIPTION . " pa, ". TABLE_PRODUCTS . " pb WHERE pop_products_id_slave = pa.products_id and pa.products_id=pb.products_id and language_id = '" . (int)$languages_id . "' and pop_products_id_master = '".$HTTP_GET_VARS['products_id']."' and products_status=1 order by pop_order_id, pop_id";
 $attribute_query = tep_db_query($attributes);

 if (mysql_num_rows($attribute_query)>0) {

  echo '<tr><td><table class="productlisting" border="0" cellspacing="0" cellpadding="2" width="100%">';
  echo '<tr><td align="center" class="productListing-heading" >?'.TEXT_RELATED_PRODUCTS.'?</td></tr><tr><td align="center" class="productListing-data">';
  echo '<table border="0" cellspacing="0" cellpadding="2" width="100%" align="center"><Tr>';

while ($attributes_values = tep_db_fetch_array($attribute_query)) {
  $products_name_slave = ($attributes_values['products_name']);
  $products_id_slave = ($attributes_values['pop_products_id_slave']);
  if ($new_price = tep_get_products_special_price($products_id_slave)) {
	$products_price_slave = $currencies->display_price($new_price, tep_get_tax_rate($attributes_values['products_tax_class_id']));
  } else {
	$products_price_slave = $currencies->display_price($attributes_values['products_price'], tep_get_tax_rate($attributes_values['products_tax_class_id']));
  }

// show thumb image if Enabled
echo '<td class="productListing-data" align="center">';
  if (MODULE_RELATED_PRODUCTS_SHOW_THUMBS!='False') {
	echo '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $products_id_slave) . '">' . tep_image(DIR_WS_IMAGES . $attributes_values['products_image'], $attributes_values['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"').'</a>';
  }
  echo '<Br>?<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $products_id_slave) . '">'.$products_name_slave.'<Br>@ '.$products_price_slave.'</a>';
}
echo '</td>';	

echo '</tr></table></td></tr></table></td></tr>';
}
$sts->stop_capture ('relateditems'); // Get the result to the main array
$template_pinfo['relateditems']= $sts->template['relateditems']; // Put it in the product info

 

Then just add $relateditems$ to your template :D

Share this post


Link to post
Share on other sites
Yep, Add this to Catalog/includes/modules/sts_inc/product_info.php at the bottom

 

 

Hey, I'm interested in making STS and related products work together. but I don't have Catalog/includes/modules/sts_inc/product_info.php. Acutally I don't have modlules/sts_inc folder at all.

what's wrong?

Share this post


Link to post
Share on other sites
Hey, I'm interested in making STS and related products work together. but I don't have Catalog/includes/modules/sts_inc/product_info.php. Acutally I don't have modlules/sts_inc folder at all.

what's wrong?

 

What version of STS are you using?

 

:)

Share this post


Link to post
Share on other sites
What version of STS are you using?

 

:)

I don't know exactly as it was "pre-installed" from the internet provider in the release of OSC. How do I look for the release version? I think it's version 2.something...

Share this post


Link to post
Share on other sites
I don't know exactly as it was "pre-installed" from the internet provider in the release of OSC. How do I look for the release version? I think it's version 2.something...

Sounds like you need to upgrade to the latest version. 4.2 Linky

 

And it might be worth installing oscommerce from scratch then installing this, as you may even be running an older version of OSC, and that would be bad :)

Share this post


Link to post
Share on other sites
Sounds like you need to upgrade to the latest version. 4.2 Linky

 

And it might be worth installing oscommerce from scratch then installing this, as you may even be running an older version of OSC, and that would be bad :)

 

no other way to make it work?

the OSC I have has already some contrib installed, and some are peculiar for the italian market and have been tested by the provider to be fully functional.

I have installed a few more myself.

intalling everything from scratch will be quite a bit of work, wont' it?

Share this post


Link to post
Share on other sites
no other way to make it work?

the OSC I have has already some contrib installed, and some are peculiar for the italian market and have been tested by the provider to be fully functional.

I have installed a few more myself.

intalling everything from scratch will be quite a bit of work, wont' it?

 

ok.. took me a couple of days to reinstall all new versions, but at last it works now.

 

Next question is: is it possible to show a preview image along with the related products? In my case I sell clothing and accessories, so with a certain products there could be several similar products (ie. one skirt, several tops which are all named "Shirt").

Is it possible? if yes, how?

Share this post


Link to post
Share on other sites
ok.. took me a couple of days to reinstall all new versions, but at last it works now.

 

Next question is: is it possible to show a preview image along with the related products? In my case I sell clothing and accessories, so with a certain products there could be several similar products (ie. one skirt, several tops which are all named "Shirt").

Is it possible? if yes, how?

 

Ok. did some searching on the forums and found how to do it.

 

Next step:

How do I set the number of items to be displayed on each row in the Related Products box? I added 5 of them and the box now is too large to fit in the central column of my page...

isn't there a similar function as the one for new products' box?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×