Jump to content
ianhaney

shop by price

Recommended Posts

Sorry I can't research on this if it shows correct on my 1.0.4.0 develop store.

Please try to find out what's wrong. Which image path do you get if you right click on the alt text and select Image info.

Share this post


Link to post
Share on other sites
12 minutes ago, raiwa said:

Sorry I can't research on this if it shows correct on my 1.0.4.0 develop store.

Please try to find out what's wrong. Which image path do you get if you right click on the alt text and select Image info.

If I right click on the image I just get images/ as the link to the image.

I just installed a completely fresh Phoenix 1.0.4.0 install to be sure it wasn't me and still the same issue.

Share this post


Link to post
Share on other sites

I have this: http://localhost/.../images/apple-1.jpg

Echo the image in the file and check if you have it in the database.

Edited by raiwa

Share this post


Link to post
Share on other sites

It seems to be this that is causing the issue -

for ($i=0, $n=sizeof($column_list); $i<$n; $i++) {
    switch ($column_list[$i]) {
      case 'PRODUCT_LIST_MODEL':
        $select_column_list .= 'p.products_model, ';
        break;
      case 'PRODUCT_LIST_MANUFACTURER':
        $select_column_list .= 'm.manufacturers_name, ';
        break;
      case 'PRODUCT_LIST_QUANTITY':
        $select_column_list .= 'p.products_quantity, ';
        break;
      case 'PRODUCT_LIST_IMAGE':
        $select_column_list .= 'p.products_image, ';
        break;
      case 'PRODUCT_LIST_WEIGHT':
        $select_column_list .= 'p.products_weight, ';
        break;
    }
  }

  $select_str = "select distinct " . $select_column_list . " p.products_id, pd.products_name, pd.products_description, p.manufacturers_id, p.products_date_added, 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, p.products_quantity as in_stock, if(s.status, 1, 0) as is_special  ";

If I change it to this it works - 

for ($i=0, $n=sizeof($column_list); $i<$n; $i++) {
    switch ($column_list[$i]) {
      case 'PRODUCT_LIST_MODEL':
        $select_column_list .= 'p.products_model, ';
        break;
      case 'PRODUCT_LIST_MANUFACTURER':
        $select_column_list .= 'm.manufacturers_name, ';
        break;
      case 'PRODUCT_LIST_QUANTITY':
        $select_column_list .= 'p.products_quantity, ';
        break;
      case 'PRODUCT_LIST_IMAGE':
        $select_column_list .= 'p.products_image, ';
        break;
      case 'PRODUCT_LIST_WEIGHT':
        $select_column_list .= 'p.products_weight, ';
        break;
    }
  }

  $select_str = "select distinct " . $select_column_list . " p.products_image, p.products_id, pd.products_name, pd.products_description, p.manufacturers_id, p.products_date_added, 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, p.products_quantity as in_stock, if(s.status, 1, 0) as is_special  ";

 

Share this post


Link to post
Share on other sites

Can you please save me the time to be Sherlock Holmes and tell me the difference 😉

Share this post


Link to post
Share on other sites

OK found it:

Enable this in your admin:

Configuration : Product_listing : Product Image (defunct) set to 1 1

Share this post


Link to post
Share on other sites
36 minutes ago, raiwa said:

Can you please save me the time to be Sherlock Holmes and tell me the difference 😉

Sorry, I would have done but my daughters school phoned me to go pick her up after I made my last post.

31 minutes ago, raiwa said:

Enable this in your admin:

Configuration : Product_listing : Product Image (defunct) set to 1

Yep this worked.

Share this post


Link to post
Share on other sites

Update uploaded with the fix for above:

Shop by Price CE Phoenix v.5.1

Changes:
- updated for CE Phoenix 1.0.4.x +
- removed deprecated product listing configurations

 

Share this post


Link to post
Share on other sites

Tried the new Phoenix version but getting LOTS of errors when I click one of the boxes links. (The box displays fine), the same one..

Warning: Use of undefined constant MODULE_CONTENT_HEADER_SHOP_BY_PRICE_USE_DECIMAL

.. /httpdocs/includes/modules/content/header/cm_header_shop_by_price.php on line 131

Its set in the module settings

Downloaded the whole package.

Edited by yahalimu

Share this post


Link to post
Share on other sites

HelloIain @yahalimu,

I checked on my 1.0.4.3 teststore and all works as expeceted.

Maybe you got somethign messed up in your database.

Please try to uninstall and reinstall the module.

Please search also your database configuration table for the shop by price constants like " MODULE_CONTENT_HEADER_SHOP_BY_PRICE_USE_DECIMAL " for which you get the error message.

Share this post


Link to post
Share on other sites

Hi Rainer.

I noticed it was showing errors for the header content module, which I had  not installed. (Just installed the box)

When I installed the header content module all is good, so I just switched it off.

For some reason still referred to it even if not installed.

 

Share this post


Link to post
Share on other sites
19 minutes ago, yahalimu said:

Hi Rainer.

I noticed it was showing errors for the header content module, which I had  not installed. (Just installed the box)

When I installed the header content module all is good, so I just switched it off.

For some reason still referred to it even if not installed.

 

I checked again and the constants of the header module are not used in the box module. So I do not understand what happens in your store.

Share this post


Link to post
Share on other sites

How strange.

And you can uninstall the header module without the server warning errors?

I shall have to investigate more.

Share this post


Link to post
Share on other sites

Checked and working with Phoenix 1.0.5.1

Shop by Price CE Phoenix v.5.1

Share this post


Link to post
Share on other sites

@raiwa I'm using Phoenix 1.0.7.4 and this is the error on catalog/shop_by_price.php

1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'ORDER BY final_price , pd.products_name LIMIT 0, 20' at line 1

select distinct p.products_id, m.*, p.*, pd.*, p.products_quantity as in_stock, 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, if(s.status, 1, 0) as is_special from products p left join manufacturers m using(manufacturers_id) left join specials s on p.products_id = s.products_id, products_description pd, categories c, products_to_categories p2c where p.products_status = '1' and p.products_id = pd.products_id and pd.language_id = '1' and p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and p2c.products_id = p.products_id and p2c.products_id = pd.products_id and (p2c.categories_id = '5748') and (IF(s.status, s.specials_new_products_price, p.products_price) >= 10) and (IF(s.status, s.specials_new_products_price, p.products_price) <= 20) order by final_price, pd.products_name ORDER BY final_price , pd.products_name LIMIT 0, 20

I think and hope it will work if this is resolved.

Share this post


Link to post
Share on other sites
2 minutes ago, discxpress said:

@raiwa I'm using Phoenix 1.0.7.4 and this is the error on catalog/shop_by_price.php


1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'ORDER BY final_price , pd.products_name LIMIT 0, 20' at line 1

select distinct p.products_id, m.*, p.*, pd.*, p.products_quantity as in_stock, 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, if(s.status, 1, 0) as is_special from products p left join manufacturers m using(manufacturers_id) left join specials s on p.products_id = s.products_id, products_description pd, categories c, products_to_categories p2c where p.products_status = '1' and p.products_id = pd.products_id and pd.language_id = '1' and p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and p2c.products_id = p.products_id and p2c.products_id = pd.products_id and (p2c.categories_id = '5748') and (IF(s.status, s.specials_new_products_price, p.products_price) >= 10) and (IF(s.status, s.specials_new_products_price, p.products_price) <= 20) order by final_price, pd.products_name ORDER BY final_price , pd.products_name LIMIT 0, 20

I think and hope it will work if this is resolved.

It's on my  to do list. Thanks

Share this post


Link to post
Share on other sites

Uploaded Shop By Price v5.2

Shop by Price CE Phoenix v.5.2

Requires Phoenix 1.0.7.2+

Changes in Shop By Price v5.2
- updated for CE Phoenix 1.0.7.2+
- updated shop_by_price.php for templateable pages
- updated modules to abstract modules

Share this post


Link to post
Share on other sites

Updated. Thanks for your time with this. I have a question and a minor issue.

The module searches and displays results of products that are not in the category.

How to get header module to appear in the center?

Share this post


Link to post
Share on other sites

Hi Lecarl @discxpress,

Thanks for the report. Yes, the categories filter got messed up by the update.

Please use this one, it's the file which goes in the store root:

shop_by_price.php

Please confirm and I'll upload the update.

For to center the header module, please try to adjust it playing with the sort order and width.

If you need custom adjustment, have a look here:

https://getbootstrap.com/docs/4.5/utilities/flex/

 

Share this post


Link to post
Share on other sites

Uploaded Shop By Price v5.2.1 with the above fix

Shop by Price CE Phoenix v.5.2.1

Requires Phoenix 1.0.7.2+

Changes in Shop By Price v5.2.1
- fixed categories filter. Thanks to @discxpress for the report and testing

Changes in Shop By Price v5.2
- updated for CE Phoenix 1.0.7.2+
- updated shop_by_price.php for templateable pages
- updated modules to abstract modules

Share this post


Link to post
Share on other sites

I have 2 more issues:

  1. The back button doesn't work. The page just loops.

  2. The Shop by Price module appears on every page. Maybe because it's in the header. 

 

Share this post


Link to post
Share on other sites
1 hour ago, discxpress said:

I have 2 more issues:

  1. The back button doesn't work. The page just loops.

  2. The Shop by Price module appears on every page. Maybe because it's in the header. 

 

1. It works for me and links to the advanced search page. Must be something in your store. However the back button didn't exist in the previous versions. If you wish, just remove it.

2. This was always like this. If you wish to show it only on certain pages, add a $PHP_SELF check to the module.

Share this post


Link to post
Share on other sites
1 minute ago, raiwa said:

1. It works for me and links to the advanced search page. Must be something in your store. However the back button didn't exist in the previous versions. If you wish, just remove it.

2. This was always like this. If you wish to show it only on certain pages, add a $PHP_SELF check to the module.

1. It may be the button spinner causing it. I may consider removing it.

2. Ok. I don't know know anything about $PHP_SELF check 😄 I wish I knew how to code.

Share this post


Link to post
Share on other sites

wrap all coding inside the execute function of the header module inside this condition:

if ($GLOBALS['PHP_SELF'] == 'index.php') {

..............

}

this will show the module only on index.php

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×