Edited by Jan Zonjee, 07 February 2011, 22:49.
Sorting Attributes
#41
Posted 27 May 2010, 09:09
#42
Posted 22 June 2010, 21:54
#43
Posted 13 July 2010, 02:00
#45
Posted 16 August 2010, 10:20
rudolfl, on 31 December 2008, 08:15, said:
$products_options_query = tep_db_query("select pov.products_options_values_id, pov.products_options_values_name, pa.options_values_price, pa.price_prefix, pa.products_attributes_id from " . TABLE_PRODUCTS_ATTRIBUTES . " pa, " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov where pa.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pa.options_id = '" . (int)$products_options_name['products_options_id'] . "' and pa.options_values_id = pov.products_options_values_id and pov.language_id = '" . (int)$languages_id . "'" . " order by pa.options_values_price, pov.products_options_values_name");
This will sort by price first, then by name.
Rudolf
I hope someone can help me I've been trying to get the attributes to be sorted alphabetically but nothing works, tried the above and it did nothing. I've tried a sort order tool but with thousands of attributes it's ridiculous giving them all a number and then having to re-arrange the numbers when new attributes are added(so they are alphabetical). Are there any other ways to either sort attributes alphabetically or an easier way to organize / sort through the attributes?
#46
Posted 04 September 2010, 15:42
$products_options_query = tep_db_query("select pov.products_options_values_id, pov.products_options_values_name, pa.options_values_price, pa.price_prefix from " . TABLE_PRODUCTS_ATTRIBUTES . " pa, " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov where pa.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pa.options_id = '" . (int)$products_options_name['products_options_id'] . "' and pa.options_values_id = pov.products_options_values_id and pov.language_id = '" . (int)$languages_id . "'" . "order by pa.options_values_id DESC");
#47
Posted 07 February 2011, 22:38
#48
Posted 02 March 2011, 21:29
#49
Posted 30 March 2011, 21:07
Barefoot Kid, on 23 November 2006, 12:48, said:
If you replace the options_values_price with convert(concat(price_prefix,options_values_price),signed) it will work....
#50
Posted 02 June 2011, 13:22
Bramp, on 16 August 2010, 10:20, said:
Seriously, I know very little about this stuff. I was wrestling with this same problem for days and it was driving me nuts!!! Then I found this post. The only problem was that I didn't want to sort by price but rather alphabetically. Anyway, I used OPs code and changed the following:
$products_options_query = tep_db_query("select pov.products_options_values_id, pov.products_options_values_name, pa.options_values_price, pa.price_prefix, pa.products_attributes_id from " . TABLE_PRODUCTS_ATTRIBUTES . " pa, " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov where pa.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pa.options_id = '" . (int)$products_options_name['products_options_id'] . "' and pa.options_values_id = pov.products_options_values_id and pov.language_id = '" . (int)$languages_id . "'" . " order by pa.options_values_price, pov.products_options_values_name");
replace pa.options_values_price with pa.options_values_name
The sort seems to be working fine now.
#51
Posted 07 June 2011, 18:47
dp1726, on 02 April 2007, 19:37, said:
But does anybody know how to change the code so that it sorts by model number.
example 1 2 4 7 12 14 18 ect.
Dave
Yes, I was just looking for this very thing when I came across this thread, since Model number is my primary concern.
Because this therad wasn't what I was looking for, I hacked the file myself:
in catalog/index.php, lines 160-164:
if ($column_list[$i] == 'PRODUCT_LIST_NAME') {
$HTTP_GET_VARS['sort'] = $i+1 . 'a';
$listing_sql .= " order by pd.products_name";
break;
}
to this:
if ($column_list[$i] == 'PRODUCT_LIST_MODEL') { //change here
$HTTP_GET_VARS['sort'] = $i+1 . 'a';
$listing_sql .= " order by p.products_model, pd.products_name"; //change here
break;
}
#52
Posted 22 June 2011, 19:13
mitchind, on 29 November 2004, 20:49, said:
All I wanted was something that showed my options in order of price. Or at the very least showed them in the order I entered them.
It's a simple fix that takes less than a minute.
What it does...
First - sorts by price
Second - if price is same (or 0), it sorts based on the order that the option was entered.
File to change ... /catalog/product_info.php
Replace this line
$products_options_query = tep_db_query("select pov.products_options_values_id, pov.products_options_values_name, pa.options_values_price, pa.price_prefix from " . TABLE_PRODUCTS_ATTRIBUTES . " pa, " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov where pa.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pa.options_id = '" . (int)$products_options_name['products_options_id'] . "' and pa.options_values_id = pov.products_options_values_id and pov.language_id = '" . (int)$languages_id . "'");
With this line
$products_options_query = tep_db_query("select pov.products_options_values_id, pov.products_options_values_name, pa.options_values_price, pa.price_prefix, pa.products_attributes_id from " . TABLE_PRODUCTS_ATTRIBUTES . " pa, " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov where pa.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pa.options_id = '" . (int)$products_options_name['products_options_id'] . "' and pa.options_values_id = pov.products_options_values_id and pov.language_id = '" . (int)$languages_id . "'" . " order by pa.options_values_price, pa.products_attributes_id");
Hope someone else will find this useful.
I'd like to have my attributes only appear in the order in which I enter them, I think this code will worked if tweaked a bit, currently I have sizes, some of which add to the base price and some of which subtract from the base
price. any help or tweaks would be greatly appreciated! and thanx in advance.
#53
Posted 02 July 2011, 02:18
Am I the only one with this issue?
If not, can anyone post a MOD that fixes the search results issue.
INSTALLED:Document Manager / Monthly Sales and Tax Returns / Batch Print Invoices / Ultimate HTML EMAILs / AJAX Attribute Manager / OSC PDF Catalog / Move Bookmarks / Sort Order / Easy Populate / Sales Reports / Low Stock Report / Admin: Model # on Category / Product Administration Screen / Mini images in admin / SLiCK reCaptcha / Google + / Beautiful Breadcrumbs / 2.3.1 - Banner Language Mod / ADD New Page / EASY MAP (google) v.3.0 / Who's Online Enhancement for 2.3.1 / Admin Notes / scrambled order number / remove_unused_images / Quantity Select / Unit Weight / Product Specifions (filter results) / AJAX Product Attributes/ Attribute Codes/ Date & Order No. to Invoice/ O.P.I. 2.0 / Attribute Images / Manual Order Editor / Attributes Clone / Order Editor / Create Order / Company VAT No. / Add customer/ CKEditor 2.3.1 / Page Manager / Default images via admin / Percentage Shipping Price / QTPro / Scroll to Top / PDF Invoice / Featured Products / Product Listing Enhancements / AutoBackups / ..Custom Admin Mods /
#54
Posted 02 July 2011, 11:26
Has anyone had this problem? - when this mod is applied the search returns nothing
ISSUE SOLVED
INSTALLED:Document Manager / Monthly Sales and Tax Returns / Batch Print Invoices / Ultimate HTML EMAILs / AJAX Attribute Manager / OSC PDF Catalog / Move Bookmarks / Sort Order / Easy Populate / Sales Reports / Low Stock Report / Admin: Model # on Category / Product Administration Screen / Mini images in admin / SLiCK reCaptcha / Google + / Beautiful Breadcrumbs / 2.3.1 - Banner Language Mod / ADD New Page / EASY MAP (google) v.3.0 / Who's Online Enhancement for 2.3.1 / Admin Notes / scrambled order number / remove_unused_images / Quantity Select / Unit Weight / Product Specifions (filter results) / AJAX Product Attributes/ Attribute Codes/ Date & Order No. to Invoice/ O.P.I. 2.0 / Attribute Images / Manual Order Editor / Attributes Clone / Order Editor / Create Order / Company VAT No. / Add customer/ CKEditor 2.3.1 / Page Manager / Default images via admin / Percentage Shipping Price / QTPro / Scroll to Top / PDF Invoice / Featured Products / Product Listing Enhancements / AutoBackups / ..Custom Admin Mods /
#55
Posted 28 July 2011, 10:33
I am only in the begining with my site
Edited by Jan Zonjee, 28 July 2011, 15:46.
#56
Posted 02 August 2011, 22:16
1
10
100
11
2
3
4
5
6
7
8
9
Is there a way around this? It should place 10 after 9 without having to enter 9 as "09". That has the potential to be confusing for customers.
Seems like it would be a fairly common question, but I've not seen anything on it yet. Perhaps I'm not searching the correct verbage. I'd really appreciate someone steering me in the right direction.
#57
Posted 21 August 2011, 11:14
lazykins, on 16 July 2007, 02:18, said:
This should be simple. Can a better-coder-than-me tell me if I can modify product_info.php to do this?
I need to control what appears first in the list of product options.
I tried installing McGrath's Sorter/Copier but I think maaaaaybe it isn't fully functional with the latest version of the cart. While I didn't receive any errors, and the copy function worked fine, the sorting feature did nothing. I uninstalled it.
Back to square 1.
Amy
Hi its great that people are providing these sorts of things, thanks.
I have tried this but get an error, when I have tried to add a new attribute to a product, any ideas whats happened ? Error below.
1136 - Column count doesn't match value count at row 1
insert into products_attributes values (null, '31', '4', '33', '0', '+')
[TEP STOP]
-----------
Thanks in advance, I've attached an image of my Product Options page, I've set the 'value price' at 0
Conrad
Attached Files
Edited by Acknowledeged74, 21 August 2011, 11:19.
#58
Posted 08 September 2011, 01:24
THANKS!!
#59
Posted 11 September 2011, 22:23
Acknowledeged74, on 21 August 2011, 11:14, said:
I have tried this but get an error, when I have tried to add a new attribute to a product, any ideas whats happened ? Error below.
1136 - Column count doesn't match value count at row 1
insert into products_attributes values (null, '31', '4', '33', '0', '+')
[TEP STOP]
-----------
Thanks in advance, I've attached an image of my Product Options page, I've set the 'value price' at 0
Conrad
YES - I had the same issue
http://forums.oscommerce.com/topic/379509-product-attribute-insert-error/page__fromsearch__1
http://forums.oscommerce.com/topic/379509-product-attribute-insert-error/page__fromsearch__1
INSTALLED:Document Manager / Monthly Sales and Tax Returns / Batch Print Invoices / Ultimate HTML EMAILs / AJAX Attribute Manager / OSC PDF Catalog / Move Bookmarks / Sort Order / Easy Populate / Sales Reports / Low Stock Report / Admin: Model # on Category / Product Administration Screen / Mini images in admin / SLiCK reCaptcha / Google + / Beautiful Breadcrumbs / 2.3.1 - Banner Language Mod / ADD New Page / EASY MAP (google) v.3.0 / Who's Online Enhancement for 2.3.1 / Admin Notes / scrambled order number / remove_unused_images / Quantity Select / Unit Weight / Product Specifions (filter results) / AJAX Product Attributes/ Attribute Codes/ Date & Order No. to Invoice/ O.P.I. 2.0 / Attribute Images / Manual Order Editor / Attributes Clone / Order Editor / Create Order / Company VAT No. / Add customer/ CKEditor 2.3.1 / Page Manager / Default images via admin / Percentage Shipping Price / QTPro / Scroll to Top / PDF Invoice / Featured Products / Product Listing Enhancements / AutoBackups / ..Custom Admin Mods /
#60
Posted 30 October 2011, 20:38
[img]http://forums.oscommerce.com//public/style_emoticons/default/thumbsup.gif[/img]















