Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[Contribution] Compare Products Side-By-Side


Recommended Posts

not work

 

 

1054 - Unknown column 'po.products_options_is_static' in 'field list'

 

select distinct po.products_options_id, po.products_options_name as options, po.products_options_is_static as static from products p join products_description pd using (products_id) left join products_attributes pa using (products_id) left join products_options po on pa.options_id = po.products_options_id and pd.language_id = po.language_id left join products_options_values pov on pa.options_values_id = pov.products_options_values_id and pd.language_id = pov.language_id where p.products_id in (38,39) and pd.language_id = '4' order by p.products_id, po.products_options_name asc

Link to comment
Share on other sites

not work

 

 

1054 - Unknown column 'po.products_options_is_static' in 'field list'

select distinct po.products_options_id, po.products_options_name as options, po.products_options_is_static as static from products p join products_description pd using (products_id) left join products_attributes pa using (products_id) left join products_options po on pa.options_id = po.products_options_id and pd.language_id = po.language_id left join products_options_values pov on pa.options_values_id = pov.products_options_values_id and pd.language_id = pov.language_id where p.products_id in (38,39) and pd.language_id = '4' order by p.products_id, po.products_options_name asc [/quote]
Hi missed out this field when making it conditional.
Need to remove ", po.products_options_is_static as static"  from $options

In compare.php

find
[code]
   //SQL selection, from and where clauses - for consistency put together
   $options = "select distinct po.products_options_id, po.products_options_name as options, po.products_options_is_static as static";

 

replace with

    //SQL selection, from and where clauses - for consistency put together
   $options = "select distinct po.products_options_id, po.products_options_name as options";

KEEP CALM AND CARRY ON

I do not use the responsive bootstrap version since i coded my responsive version earlier, but i have bought every 28d of code package to support burts effort and keep this forum alive (albeit more like on life support).

So if you are still here ? What are you waiting for ?!

 

Find the most frequent unique errors to fix:

grep "PHP" php_error_log.txt | sed "s/^.* PHP/PHP/g" |grep "line" |sort | uniq -c | sort -r > counterrors.txt

Link to comment
Share on other sites

I never saw a response to the question:

"Is there a demo available to see before installing?"

 

If so please post or PM me the URL.

 

-Aaron

See the first post, it's been editied after the initial post and contains link to demo

KEEP CALM AND CARRY ON

I do not use the responsive bootstrap version since i coded my responsive version earlier, but i have bought every 28d of code package to support burts effort and keep this forum alive (albeit more like on life support).

So if you are still here ? What are you waiting for ?!

 

Find the most frequent unique errors to fix:

grep "PHP" php_error_log.txt | sed "s/^.* PHP/PHP/g" |grep "line" |sort | uniq -c | sort -r > counterrors.txt

Link to comment
Share on other sites

Hi together

 

nice contrib. I evaluating it right now. I have trouble to compare 2 items.

I have a category with 2 items. I select both and press to compare. I receive the message that I need to select a min of 2 products. :unsure: I didn't find where the error is. Anybody an idea :blink:

 

One enhancment would be not only to have the possibility to compare in one category

check one Items in the first category and then navigate in an other and check the second item and compare both ;)

 

Regards

Laurent

Link to comment
Share on other sites

Laurent, Oliver,

Which osc version are you using ?

 

Could it be that your html forms are build differently ? I've developed this with MS2 code.

 

Last possible solution I can think of is perhaps to get the variable from your form, use of HTTP_GET_VARS might be needed, iso HTTP_PUT_VARS

 

Can you give it a shot by changing the 1.02 section this way ?

If it still doesn't work; can you add the following statements to see the content of both

echo 'POST VARS';

print_r($HTTP_POST_VARS)

echo 'GET VARS';

print_r($HTTP_GET_VARS)

 

Thanks

KEEP CALM AND CARRY ON

I do not use the responsive bootstrap version since i coded my responsive version earlier, but i have bought every 28d of code package to support burts effort and keep this forum alive (albeit more like on life support).

So if you are still here ? What are you waiting for ?!

 

Find the most frequent unique errors to fix:

grep "PHP" php_error_log.txt | sed "s/^.* PHP/PHP/g" |grep "line" |sort | uniq -c | sort -r > counterrors.txt

Link to comment
Share on other sites

One enhancment would be not only to have the possibility to compare in one category

check one Items in the first category and then navigate in an other and check the second item and compare both ;)

yes, that would be nice, but not easy to do as the current navigation bars don't submit anything in a form. I'll need some more time to figure that one out, or if anyone else wants to take up the challenge, it would be highly appreciated :)

KEEP CALM AND CARRY ON

I do not use the responsive bootstrap version since i coded my responsive version earlier, but i have bought every 28d of code package to support burts effort and keep this forum alive (albeit more like on life support).

So if you are still here ? What are you waiting for ?!

 

Find the most frequent unique errors to fix:

grep "PHP" php_error_log.txt | sed "s/^.* PHP/PHP/g" |grep "line" |sort | uniq -c | sort -r > counterrors.txt

Link to comment
Share on other sites

I user MS2. I get following data:

 

POST VARSArray ( [osCsid] => xxx [x] => 41 [y] => 15 [columns] => Array ( [0] => 24 ) [products_id] => 24 [cart_quantity] => 1 )

GET VARSArray ( [cPath] => 2_20 [language] => en [sort] => 2a [osCsid] => xxx )

 

I selected 2 products. :wacko:

 

BTW:

instead of forms maybe use Arrays to store which items are selected. You have to dynamicly add or remove product ID from this Array. (I'm not a crack in programming :) )

Link to comment
Share on other sites

Laurent, Oliver,

Which osc version are you using ?

 

Could it be that your html forms are build differently ? I've developed this with MS2 code.

 

Last possible solution I can think of is perhaps to get the variable from your form, use of HTTP_GET_VARS might be needed, iso HTTP_PUT_VARS

 

Can you give it a shot by changing the 1.02 section this way ?

If it still doesn't work; can you add the following statements to see the content of both

echo 'POST VARS';

print_r($HTTP_POST_VARS)

echo 'GET VARS';

print_r($HTTP_GET_VARS)

 

Thanks

I don?t understand this. Where I must put this code into?

 

I use the MS2 Version.

Link to comment
Share on other sites

I think this might be a register globals issue.

Can you insert the following code in compare.php ?

Let me know how it goes

~carine

 

// v1.02 if register globals is off, need to fetch $columns explicitly
if (!isset($columns)) {
$columns = array();
$columns = $HTTP_POST_VARS['columns'];
}
? ?
if (COMPARE_PRODUCTS_SIDEBYSIDE_DEBUG == 'true') {
? ?echo 'columns ';
? ?print_r($columns);
}

 

BEFORE this line

	
// v1.01 if $columns is not set, there is nothing to compare, show appropriate message instead
if (count($columns) >= COMPARE_PRODUCTS_SIDEBYSIDE_MINIMUM) {

Correction Fix 1.02B - need to loop to get all array values

Tested this on my site, keeping my fingers crossed as I've now seen too many funny things :unsure:

 

Insert the following code in compare.php

// v1.02 if register globals is off, need to fetch $columns explicitly
if (!isset($columns)) {
 $columns = array();
 $i=0;
 while($HTTP_POST_VARS['columns'][$i]) {
   $columns[] = $HTTP_POST_VARS['columns'][$i];
   $i++;
   }
 }
   
if (COMPARE_PRODUCTS_SIDEBYSIDE_DEBUG == 'true') {
   echo 'columns ';
   print_r($columns);
}

 

 

BEFORE this line

	
// v1.01 if $columns is not set, there is nothing to compare, show appropriate message instead
if (count($columns) >= COMPARE_PRODUCTS_SIDEBYSIDE_MINIMUM) {

KEEP CALM AND CARRY ON

I do not use the responsive bootstrap version since i coded my responsive version earlier, but i have bought every 28d of code package to support burts effort and keep this forum alive (albeit more like on life support).

So if you are still here ? What are you waiting for ?!

 

Find the most frequent unique errors to fix:

grep "PHP" php_error_log.txt | sed "s/^.* PHP/PHP/g" |grep "line" |sort | uniq -c | sort -r > counterrors.txt

Link to comment
Share on other sites

Hi Oliver, I believe I've finally found the problem

 

your product_listing page has forms embedded for each qty & buynow button.

To compare the form is started; but ended by the first buynow </form> tag.

Thus only the first item is selected - you can see this on the compare page, if you select first one, you have columns[0] set, if you select another one; no data for columns is available on the compare page.

 

I think either a complete restructure of the product_listing page is necessary or a rewrite of the mechanism to select products for comparison.

 

In anycase it's not going to be an easy fix. If you have the possibility to remove the quantity box and buynow form from the product listing page, that would definitely be the faster solution to get it up and running on your site.

 

BTW, is this done by a contribution ? (if yes; can you point out which one so I can put this info with the package to avoid others with same setup trying to install this)

KEEP CALM AND CARRY ON

I do not use the responsive bootstrap version since i coded my responsive version earlier, but i have bought every 28d of code package to support burts effort and keep this forum alive (albeit more like on life support).

So if you are still here ? What are you waiting for ?!

 

Find the most frequent unique errors to fix:

grep "PHP" php_error_log.txt | sed "s/^.* PHP/PHP/g" |grep "line" |sort | uniq -c | sort -r > counterrors.txt

Link to comment
Share on other sites

Hi Carine

 

I checked the source of the product_listing page. You're right with the <form> tag.

I think the mechanism of selecting products schould be changes for this contrib. It's not easy. But for me its unpossible with my know-how of php.

 

But your contrib is very usefull. I plan to use it if it will works for more than only one category.

 

Maybe i the future I will find some time to lern php :rolleyes:

Link to comment
Share on other sites

I think the mechanism of selecting products schould be changes for this contrib. It's not easy. But for me its unpossible with my know-how of php.

 

But your contrib is very usefull. I plan to use it if it will works for more than only one category.

I think I'm gonna go for lot's of little forms with an onchange event that submits each one separately as a separate variable, I think this would then also work across categories ...

 

Stay tuned B)

KEEP CALM AND CARRY ON

I do not use the responsive bootstrap version since i coded my responsive version earlier, but i have bought every 28d of code package to support burts effort and keep this forum alive (albeit more like on life support).

So if you are still here ? What are you waiting for ?!

 

Find the most frequent unique errors to fix:

grep "PHP" php_error_log.txt | sed "s/^.* PHP/PHP/g" |grep "line" |sort | uniq -c | sort -r > counterrors.txt

Link to comment
Share on other sites

I have this error:

 

 

CODE

1064 - You have an error in your SQL syntax near 'using (products_id) left join manufacturers m using (' at line 1

 

select p.products_quantity, p.products_image, pd.products_description, pd.products_name, m.manufacturers_name, p.products_model, p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from products_description pd join products p using (products_id) left join manufacturers m using (manufacturers_id) left join specials s on p.products_id = s.products_id where p.products_id in (3313,3388) and pd.language_id = '4' order by p.products_id asc

 

[TEP STOP]

 

 

 

What is the problem?

Link to comment
Share on other sites

Sorry this is my error code:

 

1064 - You have an error in your SQL syntax near 'using (products_id) left join manufacturers m using (m' at line 1

select pd.products_name, pd.products_description, p.products_image, p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from products_description pd join products p using (products_id) left join manufacturers m using (manufacturers_id) left join specials s on p.products_id = s.products_id where p.products_id in (29,30,36,60,80) and pd.language_id = '3' order by p.products_id asc

[TEP STOP]

Link to comment
Share on other sites

Someone else reported this error too, but we haven't found the cause.

I was wondering if your version of mysql might have anything to do with it, if perhaps it doesnot like the 'join' ... 'using (x)' construction, and if 'join' ... 'on T1.x = T2.x' would work.

 

Anyone else having any other ideas about this, or seen similar errors ?

KEEP CALM AND CARRY ON

I do not use the responsive bootstrap version since i coded my responsive version earlier, but i have bought every 28d of code package to support burts effort and keep this forum alive (albeit more like on life support).

So if you are still here ? What are you waiting for ?!

 

Find the most frequent unique errors to fix:

grep "PHP" php_error_log.txt | sed "s/^.* PHP/PHP/g" |grep "line" |sort | uniq -c | sort -r > counterrors.txt

Link to comment
Share on other sites

Hello, there is no solution for sites whitch product_listing page has forms embedded for each qty & buynow button?

 

Thanks.

not yet, I've been working on it, but it's not yet finished.

I'll add you to the beta test distribution :D

KEEP CALM AND CARRY ON

I do not use the responsive bootstrap version since i coded my responsive version earlier, but i have bought every 28d of code package to support burts effort and keep this forum alive (albeit more like on life support).

So if you are still here ? What are you waiting for ?!

 

Find the most frequent unique errors to fix:

grep "PHP" php_error_log.txt | sed "s/^.* PHP/PHP/g" |grep "line" |sort | uniq -c | sort -r > counterrors.txt

Link to comment
Share on other sites

Hi all,

Just loaded v1.1 which allows to compare across product listing pages (NOT across categories).

Every checkbox is in its own little form, so this should be working with the qty buynow contribution.

 

IF you already installed v1.00 or v1.01, please compare current and previous installation steps for the product_listing.php file (steps 3.x), the devil is in the details !

KEEP CALM AND CARRY ON

I do not use the responsive bootstrap version since i coded my responsive version earlier, but i have bought every 28d of code package to support burts effort and keep this forum alive (albeit more like on life support).

So if you are still here ? What are you waiting for ?!

 

Find the most frequent unique errors to fix:

grep "PHP" php_error_log.txt | sed "s/^.* PHP/PHP/g" |grep "line" |sort | uniq -c | sort -r > counterrors.txt

Link to comment
Share on other sites

Join the conversation

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

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
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.

×
×
  • Create New...