Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

MATCHING PRODUCTS CROSS-SELL


homewetbar
 Share

Recommended Posts

I have only 1 wish:

 

it would be nice if it would be possible to make more than 3 Cross Selling Items......

 

:rolleyes:

 

Agreed Id like to also be able to use the Products Model field instead of what ever its pulling now or at least show it along side the product/skew number in popup_product_id.php when clicking View product SKUs

Link to comment
Share on other sites

  • Replies 119
  • Created
  • Last Reply

Top Posters In This Topic

That is how it is designed to work. You must have 2 or more SKUs in there, the reasoning for this is I wanted it to be an add SKUs and forget them, I didn't want the contrib to be one that required constant micro-managing. So if it displayed when there was only one matching sku and that sku was out of stock or turned off in admin then it would display a blank box.... The chances of that happening with 2 or more skus is far less that is why 2 or more SKUs are required to active the box.

 

You could make up a SKU for the second one if you really wanted to and it would display only the real active one, but that defeats the purpose of the whole fail safe I built into the system...

 

OK, I understand your logic.... For this particular shop that I'm working on: out of stock products are showing in the shop and orders are allowed. I also have instances where there is only one cross sell product.....Your idea of the imaginary (inactive) sku works for me :thumbsup:

 

Many thanks for the very useful contribution.

Link to comment
Share on other sites

Where can I change the text "Matching items:" - the box heading?

 

For my shop I want to display "Related Items" - in other words I will list suggested items to go with the product being displayed. So I just need to change the text.

 

Change this line:

define('TEXT_MATCHING_PRODUCTS', ' Matching items:');

 

in /catalog/includes/languages/english/product_info.php

 

to what ever you want it to say.

Link to comment
Share on other sites

I have a bug that i cant figure out.

 

Clicking the "View product SKUs" on the admin product page invokes popup_product_id.php in a popup window with the list of products and there sku/id's alphabeticly. It seems that my first item is missing from the list. Even though its available in my store.

 

Any Ideas?

Edited by webboy
Link to comment
Share on other sites

I have a bug that i cant figure out.

 

Clicking the "View product SKUs" on the admin product page invokes popup_product_id.php in a popup window with the list of products and there sku/id's alphabeticly. It seems that my first item is missing from the list. Even though its available in my store.

 

Any Ideas?

 

Look at the top of the product's edit page in admin, the product id (sku) will be displayed there. Or the product id is viewable by viewing the URL in the catalog side.

Most Valuable OsCommerce Contributions:

Also Purchased (AP) Preselection (cuts this resource hogging query down to nothing) -- Contribution 3294

FedEx Automated Labels -- Contribution 2244

RMA Returns system -- Contribution 1136

Sort Products By Dropdown -- Contribution 4312

Ultimate SEO URLs -- Contribution 2823

Credit Class & Gift Voucher -- Contribution 282

Cross-Sell -- Contribution 5347

Link to comment
Share on other sites

Look at the top of the product's edit page in admin, the product id (sku) will be displayed there. Or the product id is viewable by viewing the URL in the catalog side.

 

Yes i was able to get the pid from the link o the edit page (Thanks).

 

Any idea why the first item (alphabetically) wont show in the list? Im sure its only a matter of time before the client asks me.

Link to comment
Share on other sites

I'm trying to use the cross selling but I don't think it's working properly.

 

In the screenshot below you can see that there's nowhere to add sku numbers as I've seen in other screenshots, it ends at product weight.

 

crossell3.jpg

 

Then if I go to the cross sell module, it shows me the next screenshot.

 

crosssell0.jpg

 

If I actually enter a product model number to search for, I get the next screenshot:

 

crosssell1.jpg

 

It does end up putting one thing (can't cross sell both earring and a bracelet with a necklace) into related products as shown in the next screenshot. But I think something's wrong. I don't think it's working properly since it's not "easy" and sometimes when I put in a product model to search for it tells me there's nothing there.

 

Can someone help me? Have I missed something? Why is there no spot for SKU numbers in that product page. I'm sure I've done something wrong and I'm not doing to well with this whole system.

 

Thanks a lot.

Link to comment
Share on other sites

I'm trying to use the cross selling but I don't think it's working properly.

 

You must be using a different contribution - this thread is about the Matching Products Cross-Sell contribution by 'homewetbar' from this link: http://www.oscommerce.com/community/contributions,5347. It does not include the admin page that you show. You should search for the thread for the contribution you used. Sorry I'm not more help...

Edited by GraemeN
Link to comment
Share on other sites

Yes i was able to get the pid from the link o the edit page (Thanks).

 

Any idea why the first item (alphabetically) wont show in the list? Im sure its only a matter of time before the client asks me.

 

Minor bug repair to fix this - in admin/popup_product_id.php find line 31:

$products_list = tep_db_fetch_array($products_list_query);

and delete this line (or add // to comment out the line).

Link to comment
Share on other sites

Id like to also be able to use the Products Model field instead of what ever its pulling now or at least show it along side the product/skew number in popup_product_id.php when clicking View product SKUs

 

To show the product model in the popup you could edit admin\popup_product_id.php as follows:

 

Line 29 - change

$products_list_query = tep_db_query("select pd.products_name, p.products_id from " . TABLE_PRODUCTS . " p left join " . TABLE_PRODUCTS_DESCRIPTION . " pd on p.products_id = pd.products_id where pd.language_id = '" . (int)$languages_id . "' ORDER BY pd.products_name");

to

$products_list_query = tep_db_query("select pd.products_name, p.products_id, p.products_model from " . TABLE_PRODUCTS . " p left join " . TABLE_PRODUCTS_DESCRIPTION . " pd on p.products_id = pd.products_id where pd.language_id = '" . (int)$languages_id . "' ORDER BY pd.products_name");

 

 

After line 59

<td align="left" valign="top" class="dataTableContent"><b>Product Name</b></td>

insert

<td align="left" valign="top" class="dataTableContent"><b>Model</b></td>

 

After line 69

echo '<tr class="dataTableRow"><td align="left" valign="top" class="dataTableContent">' . $products_list['products_name'] . '</td>';

insert

echo '<td align="left" valign="top" class="dataTableContent">' . $products_list['products_model'] . '</td>';

 

If your descriptions are long you may need to change the table width (line 55 of this file) and the width of the pop-up, defined in admin/categories.php, search for

<script type="text/javascript">

function openSKUpopup(popurl){

var winpops=window.open(popurl,"","width=450,height=500,scrollbars=1,resizable=1,top=0,left=0")

}

Link to comment
Share on other sites

Minor bug repair to fix this - in admin/popup_product_id.php find line 31:

$products_list = tep_db_fetch_array($products_list_query);

and delete this line (or add // to comment out the line).

 

Thanks!

Link to comment
Share on other sites

To show the product model in the popup you could edit admin\popup_product_id.php as follows:

 

Line 29 - change

$products_list_query = tep_db_query("select pd.products_name, p.products_id from " . TABLE_PRODUCTS . " p left join " . TABLE_PRODUCTS_DESCRIPTION . " pd on p.products_id = pd.products_id where pd.language_id = '" . (int)$languages_id . "' ORDER BY pd.products_name");

to

$products_list_query = tep_db_query("select pd.products_name, p.products_id, p.products_model from " . TABLE_PRODUCTS . " p left join " . TABLE_PRODUCTS_DESCRIPTION . " pd on p.products_id = pd.products_id where pd.language_id = '" . (int)$languages_id . "' ORDER BY pd.products_name");

After line 59

<td align="left" valign="top" class="dataTableContent"><b>Product Name</b></td>

insert

<td align="left" valign="top" class="dataTableContent"><b>Model</b></td>

 

After line 69

echo '<tr class="dataTableRow"><td align="left" valign="top" class="dataTableContent">' . $products_list['products_name'] . '</td>';

insert

echo '<td align="left" valign="top" class="dataTableContent">' . $products_list['products_model'] . '</td>';

 

If your descriptions are long you may need to change the table width (line 55 of this file) and the width of the pop-up, defined in admin/categories.php, search for

<script type="text/javascript">

function openSKUpopup(popurl){

var winpops=window.open(popurl,"","width=450,height=500,scrollbars=1,resizable=1,top=0,left=0")

}

 

Nice that helps alot. Im relying heavly on model numbers and to switch to an id number is a pain. I changed the query to sort by model number. makes it easier to do cross sells now.

Ideally it would be great if you could just click the headings and sort any way you wanted. like on the products page.

That and changing the cross sell to use product model instead of products id and this contrib would be one of the best ive used so far.

 

Now if i can only get a multiple image contrib to play nicely with all my other contribs i may be done with this store.

Link to comment
Share on other sites

Nice that helps alot. Im relying heavly on model numbers and to switch to an id number is a pain. I changed the query to sort by model number. makes it easier to do cross sells now.

Ideally it would be great if you could just click the headings and sort any way you wanted. like on the products page.

That and changing the cross sell to use product model instead of products id and this contrib would be one of the best ive used so far.

 

Now if i can only get a multiple image contrib to play nicely with all my other contribs i may be done with this store.

 

 

Using model # is unreliable, I HIGHLY recommend you use the product IDs/skus. Product ids are ALWAYS unique as they are generated by Oscommerce.

 

Since every manufacturer uses their own model numbers, as you add more product lines, you will find that model #s from different vendors overlap and you will end up with bad cross sells that may link totally incorrect products with it because two or more manufacturers used the same model #.... Proceed with caution!

Edited by homewetbar

Most Valuable OsCommerce Contributions:

Also Purchased (AP) Preselection (cuts this resource hogging query down to nothing) -- Contribution 3294

FedEx Automated Labels -- Contribution 2244

RMA Returns system -- Contribution 1136

Sort Products By Dropdown -- Contribution 4312

Ultimate SEO URLs -- Contribution 2823

Credit Class & Gift Voucher -- Contribution 282

Cross-Sell -- Contribution 5347

Link to comment
Share on other sites

Using model # is unreliable, I HIGHLY recommend you use the product IDs/skus. Product ids are ALWAYS unique as they are generated by Oscommerce.

 

Since every manufacturer uses their own model numbers, as you add more product lines, you will find that model #s from different vendors overlap and you will end up with bad cross sells that may link totally incorrect products with it because two or more manufacturers used the same model #.... Proceed with caution!

 

Good point. I guess i was thinking from the stand point of my client. They are assigning model#'s or as they call them "style numbers" so there is no way we would have a duplicate. But in the real world i can see that being a problem.

Link to comment
Share on other sites

Using model # is unreliable, I HIGHLY recommend you use the product IDs/skus. Product ids are ALWAYS unique as they are generated by Oscommerce.

 

Yes, I agree. The SKU is still shown in the pop-up and you must enter the SKU to identify matching products. Displaying the product model only helps you find the right SKU.

Link to comment
Share on other sites

I insalled it and it sometimes works and sometimes i only get the Matching items: header but no item under it ( i try the same item)

 

where is the link to the item

http://www.monpetitchild.net/product_info....;products_id=29

 

here is the code

<tr>

<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>

</tr>

<?php

// MATCHING PRODUCTS

if (tep_not_null($product_info['products_matching'])) {

$product_matches = explode(',', $product_info['products_matching']);

$total_match_count = sizeof($product_matches);

// Display only if more than 1 match

if ($total_match_count > 1) {

?>

<tr>

<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>

</tr>

<tr>

<td><?php include(DIR_WS_MODULES . FILENAME_MATCHING_PRODUCTS); ?></td>

</tr>

<?php

}

}

?>

<tr>

<td>

<?php

if ((USE_CACHE == 'true') && empty($SID)) {

echo tep_cache_also_purchased(3600);

} else {

// include(DIR_WS_MODULES . FILENAME_ALSO_PURCHASED_PRODUCTS);

}

}

?>

 

 

please sombody help me here

thanks

Link to comment
Share on other sites

I insalled it and it sometimes works and sometimes i only get the Matching items: header but no item under it ( i try the same item)

 

where is the link to the item

http://www.monpetitchild.net/product_info....;products_id=29

 

here is the code

<tr>

<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>

</tr>

<?php

// MATCHING PRODUCTS

if (tep_not_null($product_info['products_matching'])) {

$product_matches = explode(',', $product_info['products_matching']);

$total_match_count = sizeof($product_matches);

// Display only if more than 1 match

if ($total_match_count > 1) {

?>

<tr>

<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>

</tr>

<tr>

<td><?php include(DIR_WS_MODULES . FILENAME_MATCHING_PRODUCTS); ?></td>

</tr>

<?php

}

}

?>

<tr>

<td>

<?php

if ((USE_CACHE == 'true') && empty($SID)) {

echo tep_cache_also_purchased(3600);

} else {

// include(DIR_WS_MODULES . FILENAME_ALSO_PURCHASED_PRODUCTS);

}

}

?>

please sombody help me here

thanks

 

Very strange, what do you have in the admin fields? It's almost like you included some extra spaces... For instance in admin the cross-sell matches would be 567, 421 if those we the matching product ids. It's almost like you added extra products like this: 567,421,,,,,,

Edited by homewetbar

Most Valuable OsCommerce Contributions:

Also Purchased (AP) Preselection (cuts this resource hogging query down to nothing) -- Contribution 3294

FedEx Automated Labels -- Contribution 2244

RMA Returns system -- Contribution 1136

Sort Products By Dropdown -- Contribution 4312

Ultimate SEO URLs -- Contribution 2823

Credit Class & Gift Voucher -- Contribution 282

Cross-Sell -- Contribution 5347

Link to comment
Share on other sites

Hello,

 

I installed everything, but after I add the sku's and go to save I get this message:

 

 

"1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '0 = '192,135,142', products_date_available = null, products_weight = '1.00', products_st' at line 1

 

update products set products_ship_sep = '0', products_quantity = '0', products_model = 'Mens-Idiot-001', products_price = '19.9500', 0 = '192', products_date_available = null, products_weight = '1.00', products_status = '1', products_tax_class_id = '1', manufacturers_id = '', products_image = 'idiot-men.jpg', products_last_modified = now() where products_id = '147'

 

[TEP STOP] "

 

Any Idea what I did wrong?!

Edited by khelmick
Link to comment
Share on other sites

Hello,

 

I just installed this contribution and everything seemed to work perfectly - but no cross selling products appear on the frontend.

 

admin section seems ok.

 

any ideas?

 

thank you very much

Link to comment
Share on other sites

Hello,

 

I just installed this contribution and everything seemed to work perfectly - but no cross selling products appear on the frontend.

 

admin section seems ok.

 

any ideas?

 

thank you very much

 

 

You need 2+ products listed in the cross sell feed for it to show.

Most Valuable OsCommerce Contributions:

Also Purchased (AP) Preselection (cuts this resource hogging query down to nothing) -- Contribution 3294

FedEx Automated Labels -- Contribution 2244

RMA Returns system -- Contribution 1136

Sort Products By Dropdown -- Contribution 4312

Ultimate SEO URLs -- Contribution 2823

Credit Class & Gift Voucher -- Contribution 282

Cross-Sell -- Contribution 5347

Link to comment
Share on other sites

thank you homewetbear.

that's what I already tried out; I tried woth 2 products, 3, and 5.

doesn't seem to change anything.

 

I must have gone wrong somewhere but I can't figure out where..

 

I have STS current version installed - do I have to make any changes to STS ?

anyone got to work this contribution together with STS?

 

thank you so much for any ideas

Link to comment
Share on other sites

  • 2 weeks later...

Join the conversation

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

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

 Share

×
×
  • Create New...