Post by webaccent » Tue Dec 15, 2009 3:18 am

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

Complete web solutions, site design, complex site development


User avatar
New member

Posts

Joined
Thu Dec 03, 2009 3:33 pm

Post by Qphoria » Tue Dec 15, 2009 3:33 am

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

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by webaccent » Tue Dec 15, 2009 4:27 am

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.

Complete web solutions, site design, complex site development


User avatar
New member

Posts

Joined
Thu Dec 03, 2009 3:33 pm

Post by Qphoria » Tue Dec 15, 2009 5:00 am

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.

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by webaccent » Tue Dec 15, 2009 5:23 am

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.

Complete web solutions, site design, complex site development


User avatar
New member

Posts

Joined
Thu Dec 03, 2009 3:33 pm

Post by Qphoria » Tue Dec 15, 2009 5:56 am

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.

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by Qphoria » Tue Dec 15, 2009 8:01 am

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

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by webaccent » Tue Dec 15, 2009 8:37 am

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.

Complete web solutions, site design, complex site development


User avatar
New member

Posts

Joined
Thu Dec 03, 2009 3:33 pm

Post by thyberian » Tue Dec 15, 2009 10:29 pm

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

Newbie

Posts

Joined
Tue Dec 15, 2009 10:26 pm

Post by Qphoria » Tue Dec 15, 2009 10:32 pm

It says on the download page it was made for 1.3.2

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by thyberian » Tue Dec 15, 2009 10:37 pm

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.

Newbie

Posts

Joined
Tue Dec 15, 2009 10:26 pm

Post by Qphoria » Tue Dec 15, 2009 10:50 pm

I can tell you. it is not

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by webaccent » Wed Dec 16, 2009 5:00 am

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 :)

Complete web solutions, site design, complex site development


User avatar
New member

Posts

Joined
Thu Dec 03, 2009 3:33 pm

Post by Yakiv » Fri Dec 18, 2009 1:05 am

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! :)

Active Member

Posts

Joined
Tue Dec 15, 2009 5:31 pm

Post by MWYS » Fri Dec 18, 2009 5:16 pm

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

New member

Posts

Joined
Wed Oct 21, 2009 9:04 pm

Post by webaccent » Sun Dec 20, 2009 2:40 am

I'm just uploaded a new version of the module for OpenCart 1.3.4

Complete web solutions, site design, complex site development


User avatar
New member

Posts

Joined
Thu Dec 03, 2009 3:33 pm

Post by DannyMacD » Mon Dec 21, 2009 5:34 pm

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

Active Member

Posts

Joined
Fri Jun 26, 2009 6:39 am

Post by webaccent » Wed Dec 23, 2009 1:09 am

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.

Complete web solutions, site design, complex site development


User avatar
New member

Posts

Joined
Thu Dec 03, 2009 3:33 pm

Post by DannyMacD » Wed Dec 23, 2009 7:15 am

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 :)

Active Member

Posts

Joined
Fri Jun 26, 2009 6:39 am

Post by webaccent » Wed Dec 23, 2009 8:20 am

for DannyMacD

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

Attachments

4 items limitation for product compare


Complete web solutions, site design, complex site development


User avatar
New member

Posts

Joined
Thu Dec 03, 2009 3:33 pm
Who is online

Users browsing this forum: No registered users and 30 guests