Suggested Related Product

19 posts by 5 authors in: Forums > CMS Builder
Last Post: November 12, 2010   (RSS)

By kitka - February 8, 2010

HI Guys/Ladies:

Is it possible to cross refrence products?
ie....For example....I am selling a Product "Tires" is there a way to show a link to a related similar product "ie rims"
Kinda like....Mya we suggest as well to puchase..... You see this in alot of shopping cart sites>>>>

The reason i ask is i have a customer who will featuring 1 product but may want tocross link another product on the same page?

Is this possible with CMS?
jim albert

Re: [kitka] Suggested Related Product

By Codee - February 8, 2010

A simple thought of what you could do, and it's very similar to many carts, is create a field in your product/inventory section called or titled "related products" and have it pull a list of product listings (which could be cumbersome) or allow URLs you can cut/paste into the field that it would display a link to chosen products.

Re: [equinox69] Suggested Related Product

By kitka - February 8, 2010

Thanks for your input... will explore that with some detail
jim albert

Re: [kitka] Suggested Related Product

By Codee - February 8, 2010

another thought, and a bit more slick, would be to program the "related products" field to accept the product numbers, comma separated, and then have a custom display on your product inventory pages that pulls the short description and maybe the first thumbnail for the other products. This would take a little bit of custom MySql programming of course. If you are unable to do that, there are other people in the forum that could, and of course the IT staff could handle it for you. good luck!

Re: [equinox69] Suggested Related Product

By kitka - February 8, 2010

thanks alot for your suggestions... A second pair of eyes is always a great help
jim albert

Re: [kitka] Suggested Related Product

By Chris - February 9, 2010

Hi kitka,

Depending on the data you have, it may make sense to create a category section and assign products to categories, then list other products in the same category as the current product as "related".

Taking this one step further, you could have the product's category field be multi-value. This would allow you to "tag" products with one or more categories, then your code could find other products with matching tags.

I hope this helps!
All the best,
Chris

Re: [chris] Suggested Related Product

By kitka - February 9, 2010

Ok... you suggested

Taking this one step further, you could have the product's category field be multi-value. This would allow you to "tag" products with one or more categories, then your code could find other products with matching tags.

I may seeem clueless here but how would one do this....(LOL)
[/#000000]
jim albert

Re: [kitka] Suggested Related Product

By Chris - February 9, 2010

Hi kitka,

You'd use a multi-value list field to select multiple categories for a product. Then, on the viewer page, split the product's category field out to get a list of all the categories this product is assigned to:

$categories = explode("\t", trim($productRecord['categories']));

Then get related products which contain at least one of those categories in their own categories:

$where = "";
foreach ($category in $categories) {
if ($where) { $where .= " OR "; }
$where .= "categories LIKE '%\t" . mysql_escape($category) . "\t%'"
}

if ($where) {
list($relatedProducts,) = getRecords(array(
'tableName' => 'products',
'where' => $where,
'limit' => '10',
));
}
else {
$relatedProducts = array();
}


Does that help?
All the best,
Chris

Re: [chris] Suggested Related Product

By kitka - February 9, 2010

Hi Chris...
Thanks... I am going to be wrking on this this week so i will let you know...
thanks for all your insight and help
JIM
jim albert