Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Cross Sale Contrib


pepe

Recommended Posts

Hi all.

 

I've been using "Cross Sale" and I think it's really good, except... (there's always a "if" or "but" or "except", isn't there? ;) )

 

... except cross sale uses the products_id to do the magic. I don't populate cross sale thru the admin interface (I don't even have it installed) but thru phpmyadmin since i have a cross selling table 500+ (try to do that on the interface...).

 

Is there a way that the script could be changed to use the products_model instead of the product_id? This way would be easier to import the table, since the products_id is created by the OSC but the products_model (also a unique field) i know already.

 

Thank you for your time.

Pepe

Why is it called tourist season if we can't shoot at them?

Link to comment
Share on other sites

I'll try to explaim what I need:

 

in the function "cross_sale.php" within the catalog > includes i have:

 

foreach ($related_model_PR as $related_model_query)

 {

    $query = "select a.products_model, b.products_name, b.products_description, " .

             "a.products_quantity, a.products_model, a.products_image, " .

             "b.products_url, a.products_price from products a, products_description b where b.products_model = a.products_model " .

             "and a.products_model = '".$related_model_query."' order by b.products_name";



    list ($PRODUCTS_model, $PRODUCTS_name, $PRODUCTS_description  , $PRODUCTS_quantity  , $PRODUCTS_model  , $PRODUCTS_image  , $PRODUCTS_url  , $PRODUCTS_price  ) = general_db_conct($query);



    $info_box_contents[$row][$col] = array('align' => 'center',

                                              'params' => 'class="smallText" wmodelth="33%" valign="top"',

    	 'text' => '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_model=' . $PRODUCTS_model[0]) . '">' . tep_image(DIR_WS_IMAGES . $PRODUCTS_image[0], $PRODUCTS_name[0], SMALL_IMAGE_WmodelTH, SMALL_IMAGE_HEIGHT) . '</a><br><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_model=' . $PRODUCTS_model[0]) . '">' . $PRODUCTS_name[0] . '</a>');



    $col ++;

    if ($col > 2) 

    {

      $col = 0;

      $row ++;

    }

 }

 new contentBox($info_box_contents);

}

 

I would like where to change the query so that it would check the products_model of the products of that page, instead of the products_id.

 

Thank you all.

Pepe

Why is it called tourist season if we can't shoot at them?

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...