Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Product Listing Drop Down Sort Box


cclayton

Recommended Posts

I have the below code, I am just not sure how to get the php into it in order to get the correct hyperlinks to dynamically sort the page... any ideas as I have been trying to enter in php into where the option value field should be but it keeps blanking out my screen. Below shows the basic code...

 

<form name="form1">
 <select name="menu1" onChange="MM_jumpMenu('parent',this,0)">
   <option selected>Select</option>
   <option>A to Z Order</option>
   <option>Z to A Order</option>
   <option>High to Low Price</option>
   <option>Low to High Price</option>
 </select>
</form>

 

Thanks!

Founder & Director at CSC Tours Ltd

Link to comment
Share on other sites

I created a thread on creating drop downs here http://www.oscommerce.com/forums/index.php?showtopic=342527

Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Link to comment
Share on other sites

That is way more complicated than I wanted to make it... for example, how I envisaged it would be is:

 

<option value="<?php echo $basename; ?>?sort=2d&page=1">A to Z Order</option>

 

And I would like the output url to be:

 

http://www.domain.co.uk/category-c-989.html?sort=2d&page=1

 

The problem I have at the moment is that the output url is showing as:

 

http://www.domain.co.uk/?sort=2d&page=1

 

Any ideas if there is a quick fix to add in the actual category/sub-category page info into the url?

 

Thanks!

Founder & Director at CSC Tours Ltd

Link to comment
Share on other sites

I have done it... for anyone interested what I did was to use this:

 

   <option value="<?php echo $basename; ?>/category-c-<?php echo $cPath; ?>.html?sort=2a&page=1">A to Z Order</option>
   <option value="<?php echo $basename; ?>/category-c-<?php echo $cPath; ?>.html?sort=2d&page=1">Z to A Order</option>
   <option value="<?php echo $basename; ?>/category-c-<?php echo $cPath; ?>.html?sort=3d&page=1">High to Low Price</option>
   <option value="<?php echo $basename; ?>/category-c-<?php echo $cPath; ?>.html?sort=3a&page=1">Low to High Price</option>

 

Works well for me.

Founder & Director at CSC Tours Ltd

Link to comment
Share on other sites

It would appear your really using option to create a series of links, which is not its correct use.

 

However more importantly you have not allowed for the sid, which could cause all sorts of issues for your visitors.

 

http://www.oscommerce.com/forums/index.php?showtopic=330479

Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...