Page 1 of 3

Compare products module for opencart v 1.x

Posted: Tue Dec 15, 2009 3:18 am
by webaccent
We just had reliased the new contribution: compare products module. Here is a link: http://www.opencart.com/index.php?route ... ion_id=320

This version works only in ajax mode, which is turning on in admin panel and tested on version 1.3.2

Re: Compare products module for opencart v 1.x

Posted: Tue Dec 15, 2009 3:33 am
by Qphoria
Tried it...
Errors:
1. Parse error: syntax error, unexpected $end in \catalog\view\theme\default\template\product\compare_page.tpl on line 83

2. The language file update for "text_compare" wasn't included so there is no translation

Re: Compare products module for opencart v 1.x

Posted: Tue Dec 15, 2009 4:27 am
by webaccent
Actually I just fixed an error with location of the core language file (english.php) in upload folder of the contrib and reupload it.

And I don't catch the parsing error in \catalog\view\theme\default\template\product\compare_page.tpl you get. All works fine. I just tested on the new installation of v 1.3.2.

Re: Compare products module for opencart v 1.x

Posted: Tue Dec 15, 2009 5:00 am
by Qphoria
for the parse error I selected 3 products then clicked compare and thats when I got that. I took a quick look but didn't see any broken conditionals so Im not sure.

Re: Compare products module for opencart v 1.x

Posted: Tue Dec 15, 2009 5:23 am
by webaccent
It's really strange, you get the error :(
I had just checked all the code in different browsers and it works fine. No errors, no notices, all text labels are in place.

Re: Compare products module for opencart v 1.x

Posted: Tue Dec 15, 2009 5:56 am
by Qphoria
ah.. ok the problem is the php is a real mess in the tpl

You got opening php tags like <? xxxxx ?> which is fine if you are using shorthand, but shorthand format is <?= xxxx ?> so I don't know how that could have ever worked.

There were echo's that didn't end in semicolon...which is ok.. but not best practice.
There were echo's being used like functions:
echo($text) instead of echo $text
A mix of " and ' for array references... also ok.. but not best practice.

I've cleaned up the file for you and attached it. It works now.

Re: Compare products module for opencart v 1.x

Posted: Tue Dec 15, 2009 8:01 am
by Qphoria
So I tried it out.. the concept works well. Very nice.

I think OpenCart needs some sort of dynamic field or product type system that compares specs. Typically you only need compare when working with like-minded products like Computers that have many additional spec entries.
CPU
RAM
FSB
PSU
etc

Re: Compare products module for opencart v 1.x

Posted: Tue Dec 15, 2009 8:37 am
by webaccent
Thank you for cleaning up my template code :)
And I'm full agree with you about product type system. I think, It'll be one of my further contribs.

Re: Compare products module for opencart v 1.x

Posted: Tue Dec 15, 2009 10:29 pm
by thyberian
Hi,

I want to use your module but I'm not able to open it in the backend. When I click on extensions/modules/edit (compare products) to activate it, I receive a blank page (admin/index.php?route=module/compare).

I use version 1.3.4

Re: Compare products module for opencart v 1.x

Posted: Tue Dec 15, 2009 10:32 pm
by Qphoria
It says on the download page it was made for 1.3.2

Re: Compare products module for opencart v 1.x

Posted: Tue Dec 15, 2009 10:37 pm
by thyberian
It's not say that is made for 1.3.2, but tested on 1.3.2

And the name of the module is Compare products module for opencart v 1.x, so this is the reason why I ask.

If it's not ready for 1.3.4, just tell me webaccent.

Re: Compare products module for opencart v 1.x

Posted: Tue Dec 15, 2009 10:50 pm
by Qphoria
I can tell you. it is not

Re: Compare products module for opencart v 1.x

Posted: Wed Dec 16, 2009 5:00 am
by webaccent
thyberian,
Yes, I've made a mistake when publish this version like for version 1.x, I just tested it on version 1.3.2 and it works well on this version of the OpenCart. This is a first version of that contribution, so if it will be popular, I think I'll make the new release with multi versions support.
Once more thanks Qphoria for some support on this forum :)

Re: Compare products module for opencart v 1.x

Posted: Fri Dec 18, 2009 1:05 am
by Yakiv
webaccent wrote:thyberian,
Yes, I've made a mistake when publish this version like for version 1.x, I just tested it on version 1.3.2 and it works well on this version of the OpenCart. This is a first version of that contribution, so if it will be popular, I think I'll make the new release with multi versions support.
Once more thanks Qphoria for some support on this forum :)
@webaccent, I am eager to try this module for 1.3.4. If you can update it to work with 1.3.4, many of us will be grateful. I am new to OpenCart. I do not want to be testing 1.3.2 when 1.3.4 is available to me. However, I do think your module is critical to many of us. So, please consider getting this available ASAP, for the current version of OpenCart. Thanks! :)

Re: Compare products module for opencart v 1.x

Posted: Fri Dec 18, 2009 5:16 pm
by MWYS
What would be useful (Which i developed for a custom cart i built) would be to have a 'Features' area of the Product page, working similar to the 'Add Options area, i.e, javascript powered'.

You would have two fields, Option Name, and Option Value, this means it is fully customisable allowing for fields such as 'Megapixels: 8mp' etc.

This would then just be entered into a database table and associated with the product id so when you do your compare you can just pull the 'features' for each product and actually have a compare.

Looks good though

Re: Compare products module for opencart v 1.x

Posted: Sun Dec 20, 2009 2:40 am
by webaccent
I'm just uploaded a new version of the module for OpenCart 1.3.4

Re: Compare products module for opencart v 1.x

Posted: Mon Dec 21, 2009 5:34 pm
by DannyMacD
hey, great module! i have installed it but the results page seems to look abit funny..

example:

http://shop.disifin.co.uk/ original site look/layout

http://shop.disifin.co.uk/index.php?rou ... mpare/page - looks like no background, also seems to have an image missing, not sure what tho.

and if i wanted to add other variables to the compare function is this possible?

example, this is a disinfectant company, and they want to know the different litres can be made with each product. is this doable? (there are a few more)

many thanks

Re: Compare products module for opencart v 1.x

Posted: Wed Dec 23, 2009 1:09 am
by webaccent
DannyMacD,

I'm just uploaded the new version with background bug fixed.

Actually, you are unable to change the number of a variables to compare, cause you need a product attributes, which are inaccessable in standard opencart. But, we can discuss this question as some kind of custom work with your site.

Re: Compare products module for opencart v 1.x

Posted: Wed Dec 23, 2009 7:15 am
by DannyMacD
cool, i will have to speak too the boss and see what is wanted. but wanted to ask is there a way to restrict it to only 4 products at one time? im not really keen on the way it scrolls haha. is that a simple code thing or is it too much custom work?

many thanks :)

Re: Compare products module for opencart v 1.x

Posted: Wed Dec 23, 2009 8:20 am
by webaccent
for DannyMacD

I've made 4 items limitation for you
replace file catalog/model/catalog/compare.php with that one in attachment