Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Family Products v 1.0 changes


dabri

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

Link to comment
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?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...