Jump to content



Photo
- - - - -

shop by price


  • Please log in to reply
22 replies to this topic

#21   rafa84

rafa84
  • Members
  • 1 posts
  • Real Name:ferret

Posted 05 November 2012 - 12:46

hello i would like make Under 5 in array, i try add "Under 5" in the file "includes/modules/boxes/bm_shop_by_price.php": and in sql price_range_id price_range_values
2 10
3 20
4 30
5 50
1 5

and in the file "includes/languages/french/shop_by_price.php i try this
$price_min = Array( 0,
5,
10,
20,
30,
50,
0);
$price_max = Array( 5,
10,
20,
30,
50,
0,
0);

but this don't work please how add "under 5" ? THANKS TO REPLY

Edited by rafa84, 05 November 2012 - 12:48.


#22   ozchap

ozchap
  • Members
  • 10 posts
  • Real Name:David

Posted 05 December 2012 - 06:09


I have the under 5 problem as well. Hoping to see an answer here soon.


Also I had to turn off caching because it crashes here in bm_shop_by_price.php:




function execute() {

global $SID, $oscTemplate;


if ((USE_CACHE == 'true') && empty($SID)) {

$output = tep_cache_SHOP_BY_PRICE_box(); <+++++ WHAT IS THIS DOING? Its undefined

} else {

$output = $this->getData();

}


I need to have caching!


#23   yogeshnaik

yogeshnaik
  • Members
  • 35 posts
  • Real Name:Yogesh
  • Gender:Male

Posted 13 March 2013 - 06:10

Hi Everyone,

I just download and install this addon and get all the same error as you guys. But now I fixed them all. All solution are came from this support thread. And I just put everything together, Please follow below info to fixed your error and I hope I didn't miss anythings. 3 step to solve error from original Addon file.

1) On admin page, you install the modules and will get this error,

Fatal error: require() [function.require]: Failed opening required 'catalog/includes/languages/english/FILENAME_SHOP_BY_PRICE' (include_path='.:/usr/local/lib/php') in catalog/includes/modules/boxes/bm_shop_by_price.php on line 15

To fix it, open catalog/includes/modules/boxes/bm_shop_by_price.php and remove the following line

require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_SHOP_BY_PRICE);

2) When you finish installed, and go to your online store, you will get the following error

1146 - Table 'mysql.table_price_ranges' doesn't exist

select price_range_id, price_range_values from TABLE_PRICE_RANGES order by price_range_values


To fix it, open catalog/includes/datebase_tables.php and add the following before the last ?>

//Start - Shop by price
define('TABLE_PRICE_RANGES', 'price_ranges');
//End - Shop by price

3) Finally, you will have another error something like this

Warning: include(includes/languages/english/modules/boxes/bm_shop_by_price.php) [function.include]: failed to open stream: No such file or directory inC:\xampp\htdocs\includes\classes\osc_template.php on line 86

Warning: include() [function.include]: Failed opening 'includes/languages/english/modules/boxes/bm_shop_by_price.php' for inclusion (include_path='.;C:\xampp\php\PEAR') inC:\xampp\htdocs\includes\classes\osc_template.php on line 86

This is because the author haven't attached one file called bm_shop_by_price.php

To fix it, please create a file called bm_shop_by_price.php by notepad or any editor you are using, and save it into

catalog/includes/languages/english/modules/boxes/

place the following line into your new created file bm_shop_by_price.php

<?php
/* $Id$ osCommerce, Open Source E-Commerce Solutions
http://www.oscommerce.com Copyright © 2010 osCommerce
Released under the GNU General Public License
*/
define('MODULE_BOXES_SHOP_BY_PRICE', 'Shop By Price');
define('MODULE_BOXES_SHOP_BY_PRICE_DESCRIPTION', 'Shop By Price');
define('MODULE_BOXES_SHOP_BY_PRICE_BOX_TITLE', 'Shop By Price');
define('BOX_HEADING_SHOP_BY_PRICE', 'Shop By Price');
define('NAVBAR_TITLE', 'Shop by Price');
// the following $range references come from catalog/shop_by_price.php
?>

That is it, Enjoy!!


Worked like a charm...........

Perfect..... !!

Thanx. /smile.png' class='bbc_emoticon' alt=':)' />

A man is great by Deeds, not by Birth....