One more question - please.
How do I delete "Manufacturer" from the drop down list?
One more question - please.
How do I delete "Manufacturer" from the drop down list?
OK - I responded before I looked at the drop down clearly. I am excited that it is there - but, I would like only these options to show:
Model
Product Name
Price Low to High
Price High to Low
Is there a way to add "Model"
and delete
Most Popular
Manufacturer
Newest
Oldest
Thanks again,
Lynn
Glad it works and was easy!
Give me a few to play with code & I will post changes.
Ray
For starters lets delete the options you don't want:
in the mod you downloaded find the following file:
\includes\modules\YOUR_TEMPLATE_NAME\product_listing_alpha_sorter.php
In that file find the lines:
RenameCode:$letters_list[] = array('id' => '1', 'text' => 'Most Popular'); $letters_list[] = array('id' => '2', 'text' => 'Price: Low to High'); $letters_list[] = array('id' => '3', 'text' => 'Price: High to Low'); $letters_list[] = array('id' => '4', 'text' => 'Title'); $letters_list[] = array('id' => '5', 'text' => 'Manufacturer'); $letters_list[] = array('id' => '6', 'text' => 'Newest'); $letters_list[] = array('id' => '7', 'text' => 'Oldest');
toCode:$letters_list[] = array('id' => '4', 'text' => 'Title');
&Code:$letters_list[] = array('id' => '4', 'text' => 'Products Name');
Delete
Part 1Code:$letters_list[] = array('id' => '1', 'text' => 'Most Popular'); $letters_list[] = array('id' => '5', 'text' => 'Manufacturer'); $letters_list[] = array('id' => '6', 'text' => 'Newest'); $letters_list[] = array('id' => '7', 'text' => 'Oldest');
Sorry, I did not get to you sooner. I'm back now and ready to get this working. The Part 1 worked perfectly![]()
O.k. good
In ADMIN > CONFIGURATION > PRODUCT LISTING
Display Product Model: set the sort order to 9, looks like it is last on you site, just make sure it is not the same as #'s used above: 2,3,4
Now open:
\includes\index_filters\YOUR_TEMPLATE_NAME\default_filter.php file
find:
change to:Code:case 'PRODUCT_LIST_MODEL': //$listing_sql .= "p.products_model " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name"; break;
now in the:Code:case 'PRODUCT_LIST_MODEL': $listing_sql .= "p.products_model " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name"; break;
\includes\modules\YOUR_TEMPLATE_NAME\product_listing_alpha_sorter.php file
ADD:
change the 9 to the # you assigned to the sort order in ADMIN.Code:$letters_list[] = array('id' => '9', 'text' => 'Model');
Should work, Hope this helped!
Part 2
You are brilliant!
Thank you for all the help provided.
Lynn
NP, Glad I could help!
BTW, if you want the drop-down to appear like you stated in post #12
Model
Product Name
Price Low to High
Price High to Low
in:\includes\modules\YOUR_TEMPLATE_NAME\product_listing_alpha_sorter.php
change this:
to this:Code:$letters_list[] = array('id' => '2', 'text' => 'Price: Low to High'); $letters_list[] = array('id' => '3', 'text' => 'Price: High to Low'); $letters_list[] = array('id' => '4', 'text' => 'Products Name'); $letters_list[] = array('id' => '9', 'text' => 'Model');
Code:$letters_list[] = array('id' => '9', 'text' => 'Model'); $letters_list[] = array('id' => '4', 'text' => 'Products Name'); $letters_list[] = array('id' => '2', 'text' => 'Price: Low to High'); $letters_list[] = array('id' => '3', 'text' => 'Price: High to Low');
Yes, I did prefer to have it listed in that order.
Thank you! I feel like I have learned a lot from you![]()
Glad I could help with this!