Jump to content
Sign in to follow this  
dabri

Family Products v 1.0 changes

Recommended Posts

Hello,

 

I have installed Family Products v 1.0 in my osCommerce Shop

 

http://www.oscommerce.com/community/contributions,895

 

Everything seems to work, I?m so proud of me :roll: and a big thanks to the aouthor of this contribution.

 

But there is one thing I want to change:

 

Normally on the product_info.php will the box Customers who bought this product also purchased displayed, this is correct.

 

 

I configure a product to a certain Products Family Class, then shown the box Accessories and related Products: instead.

 

But in this case, I don?t want to show only the Family Product Box, I want also to the box Also purchased.

 

I?m not so fit in PHP, but I think this is the code to change in the product_info.php:

 

<?php

$currentid = $HTTP_GET_VARS['products_id'];

$family_query = tep_db_query("select products_family from " . TABLE_PRODUCTS . " where products_id = " . $currentid . "");

$results = tep_db_fetch_array($family_query);

if ($results['products_family'] != '') {

     include(DIR_WS_MODULES . FILENAME_FAMILY_PRODUCTS);

}

else {

     include(DIR_WS_MODULES . FILENAME_ALSO_PURCHASED_PRODUCTS);

}

 }

?>

 

Can Anybody tell me, what I have to change. so that I can display both boxes on the product_info.php?

 

Sorry my english is not so good, I hope you understand everything!

 

Thanks & Regards

 

Daniel

Share this post


Link to post
Share on other sites

Add the line:

include(DIR_WS_MODULES . FILENAME_ALSO_PURCHASED_PRODUCTS);

 

under:

include(DIR_WS_MODULES . FILENAME_FAMILY_PRODUCTS);

 

So it looks like this:

 

<?php 

$currentid = $HTTP_GET_VARS['products_id']; 

$family_query = tep_db_query("select products_family from " . TABLE_PRODUCTS . " where products_id = " . $currentid . ""); 

$results = tep_db_fetch_array($family_query); 

if ($results['products_family'] != '') { 

     include(DIR_WS_MODULES . FILENAME_FAMILY_PRODUCTS);

     include(DIR_WS_MODULES . FILENAME_ALSO_PURCHASED_PRODUCTS);  

} 

else { 

     include(DIR_WS_MODULES . FILENAME_ALSO_PURCHASED_PRODUCTS); 

  } 

 } 

?>


SIGnificant.....right?

Share this post


Link to post
Share on other sites

Hi TaFfin,

 

thank you :!:

 

It works perfect.

 

Daniel

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  

×