Forums / Basic Configuration / Price Range

Price Range

Locked

Views: 6,495

Results 21 to 34 of 34
This thread is locked. New replies are disabled.
7 Jan 2009, 5:00 PM
#21
robertr avatar

robertr

New Zenner

Join Date:
Dec 2008
Location:
New Jersey
Posts:
52
Plugin Contributions:
0

Price Range

I got it semi working.

It doesn't work when you click the monetary value. It goes right thru to "Advanced Search There is no product that matches the search criteria."

I'm trying to get rid of a javascript which I'm pretty sure is the problem. Because I changed someting in tpl_search for the 1st range and that brings me to this:

*Products

Custom 404 Error Page with Site Map Sample Text ...

Put your custom "page not found" message here. You can change this text in the Define Pages Editor located under Tools in the Admin.*

Which is incorrect but differs from the other ranges. This all is within categories. By Brand seems to be working.

Ajeh is the best!!

7 Jan 2009, 5:09 PM
#22
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Price Range

Let's step back for a minute ...

In a perfect world ... you have this Price Range sidebox ...

When do you want to use it?

Specifically, you click this, that, this, etc. and are using this sidebox when?

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

7 Jan 2009, 5:33 PM
#23
robertr avatar

robertr

New Zenner

Join Date:
Dec 2008
Location:
New Jersey
Posts:
52
Plugin Contributions:
0

Re: Price Range

  • OK, the Price Range sidebox does not appear initially.
  • If you click Shop By Brand or select a category from the top menu it appears
  • If you click any range when categories has been selected you're brought here (Screenshot#1) Notice the "Limit to Category", "Search by Price Range" has values plugged into them.
  • When you Shop By Brand the first two price ranges bring you to screenshot#1 with the appropriate price range plugged in. The last 3 price ranges seem to be working.

- I would wish to have only relevant price ranges appear according to brand and/or category. But, that could be the next step once this (code) is actually straightened out. Unless it can be accomplished simulatenaeously.

And here's the tpl_search code

<?php
//
// +----------------------------------------------------------------------+
// |zen-cart Open Source E-commerce                                       |
// +----------------------------------------------------------------------+
// | Copyright (c) 2003 The zen-cart developers                           |
// |                                                                      |
// | http://www.zen-cart.com/index.php                                    |
// |                                                                      |
// | Portions Copyright (c) 2003 osCommerce                               |
// +----------------------------------------------------------------------+
// | This source file is subject to version 2.0 of the GPL license,       |
// | that is bundled with this package in the file LICENSE, and is        |
// | available through the world-wide-web at the following url:           |
// | http://www.zen-cart.com/license/2_0.txt.                             |
// | If you did not receive a copy of the zen-cart license and are unable |
// | to obtain it through the world-wide-web, please send a note to       |
// | [email protected] so we can mail you a copy immediately.          |
// +----------------------------------------------------------------------+
// $Id: tpl_search.php 277 2004-09-10 23:03:52Z wilt $
// $Id: tpl_search.php,v 1.0 2005/02/01 00:00:00 juxi zoza $
//
  $content = '';
 
//------------------------------------------------------------------------ REMOVED  
//  $content .= '<span class="search_subtitle">' . BOX_SEARCH_QUICK_TEXT . '</span>';

  
//	Optional silver.gif, used by Zencart in many places
//	$content .= zen_draw_separator('pixel_silver.gif') . '<br />';	

//------------------------------------------------------------------------ REMOVED  

//	Optional <HR> "Horizontal Rule"
//	$content .='<HR />';
//
//  $content .= zen_draw_form('quick_find', zen_href_link(FILENAME_ADVANCED_SEARCH_RESULT, '', 'NONSSL', false), 'get');
//  $content .= zen_draw_hidden_field('main_page',FILENAME_ADVANCED_SEARCH_RESULT);
//  $content .= zen_draw_hidden_field('search_in_description', '1');
//  $content .= '<div align="center">' . zen_draw_input_field('keyword', '', 'size="18" maxlength="100" style="width: ' . ($column_width-30) . 'px"') . '<br /><input type="submit" value="' . HEADER_SEARCH_BUTTON . '" style="width: 50px" />';
//  $content .= "</div></form>";
//
//  $content .= '<br /><span class="search_subtitle">' . BOX_SEARCH_QUICK_PRICE . '</span>';
//
////	Optional silver.gif, used by Zencart in many places
////	$content .= zen_draw_separator('pixel_silver.gif') . '<br />';	
//
////	Optional <HR> "Horizontal Rule"
//	$content .='<HR />';
//
//------------------------------------------------------------------------ REMOVED  

//	Advanced Search URLs are created
//	Add or Delete $content rows, as needed

//------------------------------------------------------------------------ ADDED
//	Define Search Price From and To ranges
	define('SP_RANGE_1_F','0.00'	);	define('SP_RANGE_1_T','49.99' );
	define('SP_RANGE_2_F','50.00'	);	define('SP_RANGE_2_T','99.99' );
	define('SP_RANGE_3_F','100.00'	);	define('SP_RANGE_3_T','499.99');
	define('SP_RANGE_4_F','500.00'	);	define('SP_RANGE_4_T','999.99');
	define('SP_RANGE_5_F','1000.00'	);	define('SP_RANGE_5_T',''	  );

//	Use Search Price From & To Defines to Define text shown in sidebox
	define('SP_RANGE_1', "\$" . SP_RANGE_1_F . " - \$" . SP_RANGE_1_T);
	define('SP_RANGE_2', "\$" . SP_RANGE_2_F . " - \$" . SP_RANGE_2_T);
	define('SP_RANGE_3', "\$" . SP_RANGE_3_F . " - \$" . SP_RANGE_3_T);
	define('SP_RANGE_4', "\$" . SP_RANGE_4_F . " - \$" . SP_RANGE_4_T);
	define('SP_RANGE_5', "\$" . SP_RANGE_5_F . " +");
//------------------------------------------------------------------------ ADDED

	$content .= '<hr class="leg_hr_sidebox"/>';
	$content .= '<div class="search_pricerange">';
	

$content .= '<a href="' . zen_href_link('advanced_search&keyword=&pfrom=' . SP_RANGE_1_F . '&pto=' . SP_RANGE_1_T . '&categories_id=' . $_GET['cPath']) . '">' . SP_RANGE_1 . '</a><br />';
$content .= '<a href="' . zen_href_link('advanced_search&keyword=&pfrom=' . SP_RANGE_2_F . '&pto=' . SP_RANGE_2_T . '&categories_id=' . $_GET['cPath']) . '">' . SP_RANGE_2 . '</a><br />';
$content .= '<a href="' . zen_href_link('advanced_search_result&keyword=&pfrom=' . SP_RANGE_3_F . '&pto=' . SP_RANGE_3_T . '&categories_id=' . $_GET['cPath']) . '">' . SP_RANGE_3 . '</a><br />';
$content .= '<a href="' . zen_href_link('advanced_search_result&keyword=&pfrom=' . SP_RANGE_4_F . '&pto=' . SP_RANGE_4_T . '&categories_id=' . $_GET['cPath']) . '">' . SP_RANGE_4 . '</a><br />';
$content .= '<a href="' . zen_href_link('advanced_search_result&keyword=&pfrom=' . SP_RANGE_5_F . '&pto=' . SP_RANGE_5_T . '&categories_id=' . $_GET['cPath']) . '">' . SP_RANGE_5 . '</a><br />';
	echo 'PATH ' . $_GET['categories_id'] . ' - cpath ' . $_GET['cPath'] . ' - get $current ' . $_GET['current_categories_id'] . ' $current ' . $current_categories_id . '<br>';
	
//	$content .= '<a href="' . zen_href_link('advanced_search_result&keyword=&pfrom=' . SP_RANGE_1_F . '&pto=' . SP_RANGE_1_T) . '">' . SP_RANGE_1 . '</a><br />';
//	$content .= '<a href="' . zen_href_link('advanced_search_result&keyword=&pfrom=' . SP_RANGE_2_F . '&pto=' . SP_RANGE_2_T) . '">' . SP_RANGE_2 . '</a><br />';
//	$content .= '<a href="' . zen_href_link('advanced_search_result&keyword=&pfrom=' . SP_RANGE_3_F . '&pto=' . SP_RANGE_3_T) . '">' . SP_RANGE_3 . '</a><br />';
//	$content .= '<a href="' . zen_href_link('advanced_search_result&keyword=&pfrom=' . SP_RANGE_4_F . '&pto=' . SP_RANGE_4_T) . '">' . SP_RANGE_4 . '</a><br />';
//	$content .= '<a href="' . zen_href_link('advanced_search_result&keyword=&pfrom=' . SP_RANGE_5_F . '&pto=' . SP_RANGE_5_T) . '">' . SP_RANGE_5 . '</a><br />';
	$content .= '</div>';
	$content .= '<br/>';

//	Optional <HR> "Horizontal Rule"
	$content .='<HR />';

//	$content .= '<a id="advanced_search" href="' . zen_href_link(FILENAME_ADVANCED_SEARCH) . '">' . BOX_SEARCH_ADVANCED_SEARCH . '</a>';

//	Optional silver.gif, used by Zencart in many places
//	$content .= zen_draw_separator('pixel_silver.gif') . '<br />';	

?>

Ajeh is the best!!

7 Jan 2009, 5:58 PM
#24
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Price Range

So you are saying you want this to "take" you to the advance search not be the actual filter on prices when a category is selected ... correct?

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

7 Jan 2009, 6:35 PM
#25
robertr avatar

robertr

New Zenner

Join Date:
Dec 2008
Location:
New Jersey
Posts:
52
Plugin Contributions:
0

Re: Price Range

Ajeh:

So you are saying you want this to "take" you to the advance search not be the actual filter on prices when a category is selected ... correct?

Right the filter should be Price Range not Advanced Search. Price Range is the driving force.

In actuality if only relevant prices for brand/category are presented there'll never be no match.

Ajeh is the best!!

7 Jan 2009, 6:46 PM
#26
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Price Range

The question I am asking is ... right now, the way this is designed, it takes you to the Advanced Search with pre-filled in fields where you need to enter the keyword ...

Is this what you want?

Or, do you want to be navigating through Categories on the Product Listing and filter the Product Listing to these price ranges?

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

7 Jan 2009, 6:50 PM
#27
robertr avatar

robertr

New Zenner

Join Date:
Dec 2008
Location:
New Jersey
Posts:
52
Plugin Contributions:
0

Re: Price Range

Navigating through Categories on the Product Listing and filter the Product Listing to these price ranges?

Ajeh is the best!!

7 Jan 2009, 7:39 PM
#28
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Price Range

This will need more customization as this is made right now to use a search criteria and you are saying you just want the pricing affect ...

I will have to look at this later to really do anything with it to work out so that this is just a price filter not a search as well ...

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

7 Jan 2009, 7:46 PM
#29
robertr avatar

robertr

New Zenner

Join Date:
Dec 2008
Location:
New Jersey
Posts:
52
Plugin Contributions:
0

Re: Price Range

OK thanks! I'll keep on digging as well.

Ajeh is the best!!

8 Jan 2009, 2:58 PM
#30
robertr avatar

robertr

New Zenner

Join Date:
Dec 2008
Location:
New Jersey
Posts:
52
Plugin Contributions:
0

Re: Price Range

How ya doin' bro? I have less hair than yesterday. :P

Ajeh is the best!!

8 Jan 2009, 7:01 PM
#31
robertr avatar

robertr

New Zenner

Join Date:
Dec 2008
Location:
New Jersey
Posts:
52
Plugin Contributions:
0

Re: Price Range

What's the latest Ajeh?

Ajeh is the best!!

24 Feb 2009, 3:01 AM
#32
robertr avatar

robertr

New Zenner

Join Date:
Dec 2008
Location:
New Jersey
Posts:
52
Plugin Contributions:
0

Re: Price Range

Ajeh, Where the ########'s the code??

Ajeh is the best!!

24 Feb 2009, 4:15 AM
#33
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Price Range

Golly ... guess I am busy writing code and haven't written your custom code yet ... dontcha wish we just sat around writing code for folks in all our spare time? Oh yeah ... we don't have spare time ... silly silly me ... :lamo:

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

24 Feb 2009, 8:42 AM
#34
misty avatar

misty

Inactive

Join Date:
Apr 2004
Location:
UK
Posts:
5,752
Plugin Contributions:
1

Re: Price Range

Maybe cups of coffee for zen cart team or quick post in
Commercial Section will speed things along..
:wink:

Dezina ZenCart Templates
Please do not PM for support queries..Post in forums..help others