Page 1 of 3

[RELEASED] Similar Prodcts (vQmod)

Posted: Wed Oct 05, 2011 2:45 pm
by bull5-i
Have you ever felt that related products feature is not enough for expressing product associations. Do you need to show customers which products are similar, but not necessarily related, to a product? If so, then this mod is perfect for you. Now you can distinguish between related and similar products, because they are essentially different.

Similar Products modification enables you to link products to each other and show their relation/connection separately from the related product feature. It works just like related products - the workflow is the same. The added bonus is that you can choose the location the similar products appear and adjust the image size. You could even use it for related products and display them in a different location on the product page.

Furthermore, the similar products can be automatically selected by the mod itself from the same category the currently viewed product is in. Actually you can mix manually added similar products with auto selected ones. Manually added similar products have higher priority, so they will always show unless limit is applied. Manually added products are sorted as first, followed by automatically selected ones. If random sorting is appplied, then manually added products may not be sorted first.
In case the product is viewed directly (not through a category) then similar products will be searched from all the categories that the product belongs to.

Features:
  • automatically select similar products from the same category [added in v2.0]
  • automatically select products that match first x characters of product name [added in v3.1]
  • option to auto select from only the leaf categories the product is in instead of all the categories [added in v2.1]
  • sort similar products by name, model, most viewed, quantity, sort order or randomize the order (product based setting) [added in v2.0]
  • adjustable image size [added in v1.1]
  • selectable position (in a new tab, column left/right or content top/bottom) within product page [added in v1.1]
  • limit the number of similar products shown [added in v1.1]
  • option to display only products currently in stock [added in v2.2]
  • lazy loading [added in v3.0]
  • pagination [added in v3.0]
Modification settings can be configured from module settings page (Extensions -> Modules).

Similar Products can be bought from http://www.opencart.com/index.php?route ... on_id=3449

The latest version is 3.1.0 and it is compatible with OpenCart 1.5.1.x. It is currently available as a vQmod.

Version 3.0.0 is compatible with OpenCart 1.5.0.x
Version 1.0.0 is compatible with OpenCart 1.4.9.5-1.4.9.6.

Some screenshots:
ADMIN
Modification settings page, enable/disable the mod and it's features
admin_module_settings.png

Admin, module settings page - admin_module_settings.png (33.69 KiB) Viewed 5439 times

Associate similar products with a product
admin_product_edit_links.png

Admin, product edit page (links) - admin_product_edit_links.png (34.17 KiB) Viewed 6048 times

Store front view of similar products
store_front_product_view.png

Store front, product view, content tab - store_front_product_view.png (25.12 KiB) Viewed 6233 times


- edit 18.05.2012 - Released version 3.1.0 for OpenCart 1.5.1.x (added option select similar products by matching name fragment, fixed a display issue)
- edit 26.03.2012 - Released version 3.0.0 for OpenCart 1.5.x.x (added option to sort by quantity, lazy loading, pagination)
- edit 14.02.2012 - Released version 2.2.0 for OpenCart 1.5.x.x (added option to show only products currently in stock)
- edit 29.12.2011 - Released version 2.1.1 for OpenCart 1.5.x.x (fixed product copy bug)
- edit 21.12.2011 - Released version 2.1.0 for OpenCart 1.5.x.x (added leaf category filtering)
- edit 16.12.2011 - Released version 2.0.0 for OpenCart 1.5.x.x (added sorting and auto select options)
- edit 06.10.2011 - Released version 1.1.0 for OpenCart 1.5.x.x (added selectable content position)
- edit 05.10.2011 - Initial release

Re: [RELEASED] Similar Prodcts (vQmod)

Posted: Wed Oct 05, 2011 10:27 pm
by Maansy
What is the difference between this and the related product?

Re: [RELEASED] Similar Prodcts (vQmod)

Posted: Wed Oct 05, 2011 11:00 pm
by Qphoria
Yea I don't see the diff between similar and related. I guess if you assume "related" means a mouse to a computer.. but I don't think that is the general understanding of that. Related products typically means products of the same nature..

iPod classic would have ipod nano, ipod classic, iphone
HP Laptop could relate to mouse, keyboard but also other laptops, compaq, dell, etc

Either way... it is all in perception.
Great job on your first module :)

Re: [RELEASED] Similar Prodcts (vQmod)

Posted: Thu Oct 06, 2011 1:17 am
by bull5-i
Yes, it works like related products, but related products are not always similar products and that is where this mod comes into play by helping to separate them.

For example I have a Nikko Stirling Nighteater 6-24x56 optical sight that is related to such products as a Nighteater parallax wheel and a sunshade which are specific to that sight. But on the similar products I have a Hawke SideWinder 6-24x56, which is a similar type of optical sight having the same zoom range and objective lens diameter, but being optically superior and from a different manufacturer.
Of course you could put all those items under related products, but then it would be quite a messy soup (at least for me).

Like Q said, it's all in perception.

Re: [RELEASED] Similar Prodcts (vQmod)

Posted: Thu Oct 06, 2011 10:32 pm
by bull5-i
Released version 1.1 for OpenCart 1.5.x.x
The main new feature is selectable content position. You can display the similar products in either columns, before or after the main content and you still have the option to display them inside the tab.

Re: [RELEASED] Similar Prodcts (vQmod)

Posted: Tue Dec 13, 2011 2:26 pm
by rph
Scripts have no way of knowing which products are similar. You can show which products people bought together but experimenting with that I found the results weren't nearly as useful as I'd hoped (I'm kinda interested to see what factors Amazon uses to figure this out).

Re: [RELEASED] Similar Prodcts (vQmod)

Posted: Tue Dec 13, 2011 2:30 pm
by bull5-i
I created the current mod as this was requested by my client. Although they have many products in each category, only a selected few are actually similar to the currently viewed product by certain parameters so you would have to hand pick them.

But your idea to automatically pick products is also interesting, I wonder why I didn't think about it. I might consider adding it to a future release.

Re: [RELEASED] Similar Prodcts (vQmod)

Posted: Tue Dec 13, 2011 4:34 pm
by rph
blackhalo wrote:I mean, does anyone else here actually have hundreds of products to deal with?
Try several thousand. That's why I'm not sure how you foresee this working. How could OpenCart know which products are similar? You could try grouping similar manufacturers and product attributes but that's still just a wild guess and goes right back to your problem of having to manually put all that information in in the first place.

Re: [RELEASED] Similar Prodcts (vQmod)

Posted: Fri Dec 16, 2011 10:07 am
by rph
You could probably throw up a random sampling of products but I don't really see the use. Categories already exist to be categories.

Re: [RELEASED] Similar Prodcts (vQmod)

Posted: Fri Dec 16, 2011 7:56 pm
by bull5-i
Just released version 2.0.0 for OpenCart 1.5.x.x

The main new feature is automatically selected similar products from the current product category.
Addittionally you can adjust the sorting order of the products.

See the first post for more information.

Re: [RELEASED] Similar Prodcts (vQmod)

Posted: Sat Dec 17, 2011 3:12 am
by bull5-i
Yes, if you choose random sorting then the products change with each page load.

Re: [RELEASED] Similar Prodcts (vQmod)

Posted: Thu Dec 22, 2011 4:54 am
by bull5-i
Released version 2.1 for OpenCart 1.5.x.x
This is a feature release that adds an option to choose if auto select takes products from all the categories the product is in or only the leaf categories.

To illustrate:
Let's assume the category structure is as follows
a
a -> b
a -> b -> c
a -> d
e
f
f -> g
f -> h
f -> h -> i
f -> j
k
k -> l

and product belongs to the following categories
a,b,c,d,e,f,h

then
all product categories chooses from the following categories
a,b,c,d,e,f,h

and
leaf categories chooses from
c,d,e,h

Re: [RELEASED] Similar Prodcts (vQmod)

Posted: Thu Dec 22, 2011 6:44 am
by bull5-i
Yes, leaves are the tips. 'e' just happens to be a leaf and a root together. 'a' however has branches and the product is also associated with some of the branches. If the product belonged only to 'a' and not to 'b', 'c' and 'd', then 'a' would be chosen.

Re: [RELEASED] Similar Prodcts (vQmod)

Posted: Fri Dec 23, 2011 8:06 am
by InternalWealth
Hi there.

I have alot of products with a similar name so my entire inventory is organized via the SKU.

When trying to add similar products, it pulls from the product name. Is there any way to append the product SKU onto the product name during selection in the admin area?

I've successfully changed it for related products as per this post:

http://forum.opencart.com/viewtopic.php?f=20&t=48165

help?

;D

Re: [RELEASED] Similar Prodcts (vQmod)

Posted: Fri Dec 23, 2011 8:28 am
by InternalWealth
Got it figured (I'm using 1.5.1.3)


in vqmod/xml/similar_products.xml

find:

Code: Select all

'product_id' => $similar_info['product_id'],
'name'       => $similar_info['name']
and change to:

Code: Select all

'product_id' => $similar_info['product_id'],
'model'       => $similar_info['model'],
'name'       => $similar_info['name']
then find:

Code: Select all

<div id="product-related<?php echo $product_similar['product_id']; ?>" class="<?php echo $class; ?>"> <?php echo $product_similar['name']; ?> <img src="view/image/delete.png" />
and change to:

Code: Select all

<div id="product-related<?php echo $product_similar['product_id']; ?>" class="<?php echo $class; ?>"> <?php echo $product_similar['name']; ?> (<?php echo $product_similar['model']; ?>)<img src="view/image/delete.png" />
and then finally:

in this section:

Code: Select all

$('input[name=\'related\']').autocomplete({
find:

Code: Select all

label: item.name,
change to:

Code: Select all

label: item.name + '(' + item.model + ')',
worked for me :)

Re: [RELEASED] Similar Prodcts (vQmod)

Posted: Thu Dec 29, 2011 10:33 pm
by bull5-i
Released version 2.1.1 for OpenCart 1.5.x.x (bugfix release)
Fixed product copying bug.

Re: [RELEASED] Similar Prodcts (vQmod)

Posted: Sat Jan 07, 2012 2:24 pm
by InternalWealth
Great!

How do you upgrade from 1.1.1 to 2.1.1 without losing any data?

Thanks!

Re: [RELEASED] Similar Prodcts (vQmod)

Posted: Sat Jan 07, 2012 3:41 pm
by bull5-i
Modify the /admin/controller/module/similar_product.php uninstall function by commenting out the first line where the drop table statement is for your currently installed version (1.1.1).
Then uninstall the module from the OC admin modules page. If you commented out the line, it should not remove the table with your data.
Now replace your files with the files from the new version (2.1.1) and install & configure & enable it.
All your data should be there.

Cheers

Re: [RELEASED] Similar Prodcts (vQmod)

Posted: Wed Feb 15, 2012 4:07 am
by bull5-i
Released version 2.2.0 for OpenCart 1.5.x.x (feature release). Added option to display only products currently in stock.

Re: [RELEASED] Similar Prodcts (vQmod)

Posted: Mon Mar 26, 2012 5:45 am
by bull5-i
Released version 3.0.0 for OpenCart 1.5.x.x:
  • Added: pagination
  • Added: lazy loading
  • Added: option to sort by quantity