PDA

View Full Version : [Products/Categories] Sorting the products



foster
05-21-2011, 09:34 PM
Probably another simple answer, highly likely I've done it wrong... but...
I've setup my categories, sub-categories and then products. There's 5 basic products each with a drop-down selection of predefined text. For a made up example, product 1 has...

window
door
fence
shed
knife
saw
car

listed in no particular order (that I can see) and not in the same order I added them. I went into 'Add/Enter' product, manually moved the option value up or down until they were in alphabetical order. I checked on my store, and everything is listed as it should be. An easy way for customers to browse the options they want.
I went into Attribute Manager and edited the options (deselected one of the options, eg: fence) and everything went back to complete random again. I have 41 options in the real list, and I thought there must be a better way than the way I'm doing it.

Is anyone able to point a finger at my error?

ridexbuilder
05-22-2011, 01:46 AM
Presumably you mean, Catalog, Products Attributes, Sort Order.

pgmarshall
05-22-2011, 01:55 AM
The product attributes should be sorted in the defined sort order - Admin -> Catalog -> Products Attributes -> Bottom section titled Products Attributes -> Sort Order.

Have you set this?

foster
05-22-2011, 10:54 PM
Correct...

'Catalog/Product attributes - Sort order' is the part in question and I've set those by editing the sort order as I want them presented to the customer. In the store, everything is correct (as per the sort order listing).

Then, if I go into the 'Catalog/Attribute manager', choose a part to edit and un-check one of the options because maybe I don't want to show that option on the list for the present time.

Back into 'Catalog/.../Sort order, and all of the sort order numbers are now back to default '0', becoming a random order on the store list.

I understand that the order will be randomised by all parts having a value of 0, but is there a way to retain the other sort order values that I've put in on the remaining parts, or maybe there's an easy way to sort them via alphabetical and/or numerical order?

Thanks for any insight... and I hope I'm making a bit of sense in my explanation!

pgmarshall
05-22-2011, 11:44 PM
I would strongly advise you to not use attribute manager ... but rather open the product you wish to edit and then use the AJAX attribute manager ... it is much better and I suspect that attribute manager is simply overwriting all your sort orders. (The attribute manager modules was under discussion for removal from v2.5)

Have a go with this method and see if it works better for you.

Regards,

pgmarshall
05-22-2011, 11:50 PM
Confirmed as an issue - basically the attribute manager wipes all of the old settings and reinserts new attribute values ... notice the ID number change ...

Either it needs to copy across the sort order (and probably all of the other info - weight, code suffix, etc.) or remove the module entirely since it is replicating the AJAX attribute manager in product management.

My vote goes for the latter.

Regards,

ridexbuilder
05-23-2011, 01:01 AM
Note: I only use the old skool method. :badteeth:

pgmarshall
05-23-2011, 08:33 AM
Excellent Ridex - can you confirm the bug reported by the original poster?

Regards,

foster
05-23-2011, 03:01 PM
Ok, in my vast experience of using oscMax (well, two weeks of dog-paddling through all the settings), and reading through this link 0000707: Attribute Sorting - osCmax Bug Tracking System (http://bugtrack.oscmax.com/view.php?id=707) on AJAX Attribute Manager, I checked all my php code and it appears I already have this installed already (running oscMax v2.5 RC1). I'm not on my main machine at the moment, so I'm only presuming that the SQL database has the correct settings in it.
I can move the sort order via the 'Add/Edit Product' by using the up/down arrows on the right hand side, which works perfectly.

So, it appears that the reason my sort order gets upset is by going into Catalog/Attribute manager and making changes in there. If that's the case, then no worries... I won't do it anymore. I just wasn't sure if I'd done something dumb again!

Now, hopefully a simple question. In Catalog/Product attributes, down in the attributes section there is a heading 'Code Suffix'. What is that for?

Thanks for all your answers and tips, I much appreciate it!

foster
05-25-2011, 02:42 PM
For some unknown reason, a reply post I did here a couple of days ago was gobbled up and has since disappeared... don't know why, but I'll give it another shot.
Thanks for all your help! It seems I've been using the AJAX system, without knowing it, and I find it easier every time I edit something. I wasn't sure what was going on when all my sort order went haywire, except that I'd probably done something wrong. If it's a bug, glitch or whatever, that's OK, I can live with that... I just won't use the attributes manager.
While on the subject, in 'Catalog/Products attributes' under the products attributes section, there's a heading 'Code Suffix'. What is this for?

Again, thanks for your help...

ridexbuilder
05-25-2011, 03:57 PM
Code suffix allows you to have a unique product code/SKU/EAN per product per attribute.
A very long-standing feature request that Michael has kindly now added (referred to as Product Reference Attributes, in some places).

Example:
Fancy Teapot - product model FT01
Fancy Teapot, small, blue - product model FT01-S-01234
Fancy Teapot, large, green - product model FT01-L-01235
and any number of variations on this theme.

EJ

foster
05-25-2011, 04:20 PM
Ahhhh... perfect! I was hoping that's what it was all about. I'll fiddle with that now.
Thanks for your help :)

ridexbuilder
05-25-2011, 04:22 PM
Remember to press the Thanks (thumb up) button ;)

pgmarshall
05-26-2011, 12:07 AM
Code Suffix is a bit of new functionality in osCmax v2.5 which allows you to contruct your product code 'on the fly' from the attributes associated with the main product. For example: T-Shirt Code = TS Colours = Red = R, Green = Gr, Blue = Bl Size = S, M, L Add all these attributes ... then when you look at your product code in the order it will look something like: TS-R-S = Small Red T-Shirt TS-Bl-L = Large Blue T-Shirt etc. Hope this makes sense, Regards,

ridexbuilder
05-26-2011, 12:15 AM
Code Suffix ... For example: T-Shirt Code = TS Colours = Red = R, Green = Gr, Blue = Bl Size = S, M, L Add all these attributes ... then when you look at your product code in the order it will look something like: TS-R-S = Small Red T-Shirt TS-Bl-L = Large Blue T-Shirt etc...
Thought I'd said all that. :p

pgmarshall
05-26-2011, 04:44 AM
Hmmm! Odd one this ... when I wrote that post your reponse wasn't there ... oh well ... must have been having a brain wobble at the time.

jmelson
07-24-2011, 09:36 PM
Well, I read this thread, and others, but I still can't figure out how to set the display order of product items within a category.
If I edit a category in catalog - categories/products, there is a sort order field at the bottom, and it works.
If I edit a product within the category, there is no sort order field that I can find.

If I look in catalog - products attributes, I can put an item in the products attributes list in the middle of the page and set a sort order, but it doesn't seem to have any effect.

Can anybody give me a hint what I'm missing?

Thanks,

Jon

pgmarshall
07-25-2011, 12:15 AM
The code suffix settings allow you to dynamically build a product code when using attributes. Eg. T-Shirt, Blue, XXL => TSHT-B-XXL; T-Shirt, Red, Small => TSHT-R-S for example. Regards,

jmelson
07-25-2011, 08:25 AM
The code suffix settings allow you to dynamically build a product code when using attributes. Eg. T-Shirt, Blue, XXL => TSHT-B-XXL; T-Shirt, Red, Small => TSHT-R-S for example. Regards,
Fine, I understand that, and don't have a need for that feature. What I am TRYING to do is set the order in which products within a category are displayed. I have looked all over the admin menus and pages, and all over the forum for how to do this. It seems there IS a way to do it, I just can't figure out how.

So, I don't want to set the display order of the code suffix, but the display order of the main products in a category.

I hope you can help.

Thanks,

Jon

pgmarshall
07-25-2011, 09:40 AM
As far as I am aware there is no sort order function at a product level ... there is the dynamic one which allows you sort by the headers - eg. weight, quantity, price, A-Z, Z-A, Newness, Popularity. But not a sort order. I am not sure most people would want to add it manually to all their products.

Solution: (or work around) ... simply order your model references (assuming you are not using them already) ... then use sort by model or perhaps use length, width or height - if you are not using a shipping module that needs these.

Otherwise - it is pretty easy to add a new field to the product table and append the sort order into the index.php page in catalog.

Regards,

jmelson
07-25-2011, 07:38 PM
Otherwise - it is pretty easy to add a new field to the product table and append the sort order into the index.php page in catalog.

Regards,
OK, I think I can figure out adding a new field to the product table, although any suggestions on how to do it right the first time would be welcome. But, if you could describe how to append the sort order into index.php I'd greatly appreciate it. (I am already using the model references.)

Thanks,

Jon

pgmarshall
07-26-2011, 12:49 AM
Sure - but please make sure you backup before you make any changes. You will find in the catalog/index.php 12 different queries which will need to have your new field added to them. Basically after the $select_column_list add the new field p.yournewfield. Then near the bottom simply add the p.yournewfield to the line $listing_sql .= " order by " . $new_products_sort . "pd.products_name"; Let me know how you get on adding the extra field ... Regards,

pgmarshall
07-26-2011, 12:51 AM
On reflection - a sort order might not be a bad idea for the core anyway. If you add it to the bugtracker as a feature request it will get reviewed by the developers. Regards,

ridexbuilder
07-26-2011, 04:49 AM
On reflection - a sort order might not be a bad idea for the core anyway. If you add it to the bugtracker as a feature request it will get reviewed by the developers. Regards,
Remember, EP will need adjusting too. ;)

ozdunker
07-27-2011, 08:23 AM
:D excellent

tinboye
07-31-2011, 11:39 AM
im having an issue with sorting the product attribute option values
when you view the product info page it shows the values in descending order regardless if I open up the product and edit them via the ajax options editor

in the product page where you edit the details of the product I have them arranged from smallest to largest

8"
8.5"
9"
9.5"
etc all the way to 13"

yet when you view the page live it shows it in random order.
12" (+$1.00)
12.5" (+$1.50)
13" (+$2.00)
9.5"
10"
10.5"
11"
11.5" (+$0.50)
9"
8.5"
8"

in the product attribute page the sort order for the values are all correct

is this still a bug in oscmax 2.5 rc1 ??

ridexbuilder
07-31-2011, 12:27 PM
Just checked for you:
osCMax 2.5 svn1458 : Apple iPad - $400.93 (http://max25.dev.ejsolutions.co.uk/catalog/product_info.php?products_id=12)
Works fine, though product stock table doesn't honour it (I know why, 'cos there's no code to do it ;)).
Note: I changed product sort order (to reverse) on the Product Attributes page and note the SVN too.

tinboye
07-31-2011, 07:20 PM
im using osCmax v2.5 RC1 (http://www.oscmax.com/forums/)

and if you see my product page
Jewels of Magnetic Therapy : Build your own Anklet - $35.00 (http://shop.jewelsofmagnetictherapy.com/product_info.php?cPath=3&products_id=1)
you will see how the sizes are mixed up, yet on my product attribute page in admin it shows sort order properly numbered
and when i go to edit the actual product i used the arrows up and down to arrange them in order. smallest to largest.
I even went as far as creating new attributes within the product page not through product attribute page.

ridexbuilder
08-01-2011, 01:01 AM
Let me be more blunt...

is this still a bug in oscmax 2.5 rc1 ??
Yes - 'cos RC1 is static! No - 'cos it's fixed in SVN

tinboye
08-01-2011, 07:14 AM
ok i dont know these terms svn, and i do not see that svn version of oscmax available for download anywhere. Is it just a bug fix from the bug tracker that can be applied to my current version?
I chose oscmax 2.5 rc1 because it was a stable version and was recommended that it could be used for a live store. unlike 2.5 beta 3. which i had first installed then had to uninstall and install 2.5 rc1

pgmarshall
08-01-2011, 08:01 AM
Yep! SVN is basically the version with the latest bug fixes. You need an SVN client to download it (see wiki under useful software) - best only to do this if you know what you are doing. Otherwise stick to the official releases ... Once we reach a significant point we create a release candidate (RC) which you can use (but it may not be perfect) once we have fixed all the bugs reported by the users of the RC releases you will get a stable release. There will be a patch to apply from RC1 to RC2 and finally to v2.5 Stable. Regards,

tinboye
08-01-2011, 10:00 AM
if i get this release candidate will things you already have working in RC be effected? i really need this sorting thing to work properly. i know it might seem minor issue to some but im a perfectionist and the store im building has to be perfect for me to make it public. I would have went with CRELoaded, but they want money to get certain features oscmax had for free, ive pretty much tried every ecommerce script out there and oscmax is the most userfriendly. i tried magento which i really liked but it was far to complex to get things working. I needed the options to create customers and create invoices, 90% of the shopping carts out there do not have these features. And now ive invested far to much time and money into oscmax to change scripts now.

pgmarshall
08-01-2011, 10:07 AM
You can use the SVN version if you want be you will need to be able to patch your store to the final stable v2.5 - it is not too difficult as long as you know a bit of SQL/PHP.

Best thing to do is to get a copy of the SVN using TortoiseSVN and load it locally on XAAMP or WAMP and test it fits your needs first ...

Regards,

tinboye
08-01-2011, 11:29 AM
ok i downloaded TortoiseSVN onto my pc, but it says its a shell extension and i would need to right click on a folder to use.
i run windows 7 ultimate on my pc, my site runs on linux server not on my local machine.


I went to the csv repository and found the revision 1458

onepage_checkout.php - oscmax2 - osCmax - osCommerce Maximized - Google Project Hosting (http://code.google.com/p/oscmax2/source/browse/branches/dev/2.1/catalog/includes/classes/onepage_checkout.php?spec=svn1458&r=1458)

would i only need to replace the code in the 1 file to make this work?
onepage_checkout.php (http://code.google.com/p/oscmax2/source/browse/branches/dev/2.1/catalog/includes/classes/onepage_checkout.php?spec=svn1458&r=1458)

tinboye
08-01-2011, 11:57 AM
ok my bad, i figured it out, and narrowed it down to the pad_base.php file which was changed by the paps 3rd party addon, ive contacted him for changes. I found this out by renaming the old pad_base.php to pad_basepaps.php and then uploading pad_base.php from the rc1 copy i had and the sorting works now.

the party replaced is
function _build_attributes_array($build_stocked, $build_nonstocked) {
the whole function was rewritten for paps.

Sorry for all this.

ozdunker
01-30-2012, 10:29 PM
Just wondering if there is an update on the sorting of the products. thanks