Jump to content

The order of size variations isn't in order?


Guest Acknowledged74

Recommended Posts

Guest Acknowledged74

Hi

I have several products that come in different sizes. I did add them in order but the drop down with the actually product shows the following:

8, 10, 12, 14, 2, 4, 6 ...

Why has this been reordered? Natuarally it would look a million times better if it were, 2,4,6,8,10,12,14 etc

why has this changed the order? and much more importantly can I change that order?

Thanks so much in advance.

Link to comment
Share on other sites

Guest Acknowledged74

Hi

Getting a little desperate now.

I've deleted the options an re-added in correct order. Once I save it put them back in the wrong order?

Has no-one had this issue before?

Link to comment
Share on other sites

It would be possible to put the options in alphabetical (and therefore alphanumerical) order.

This would require a code change.

However, if you have S/M/L/XL sizes, these would also be in the same order;

L/M/S/XL

This is probably not what you want. There is not a field in the database for the order of Options, nor is there any code for this.

I would suggest asking for assistance for this change over at cubecartforums.org

There may be an existing modification, or a commercial developer may be able to provide this.

Link to comment
Share on other sites

Guest Acknowledged74

I appreciate that someone has taken the time to respond.

Why is it changing the order? Would it make a difference if I say had variations size 2, size 4.... rather than just 2, 4, 6 and so on?

I guess alphanumerically they will all just be size plus the existing problem?

Man CC is buggy, it seemed really cool until you notice this issue that seem really simple to fix, but apparently aren't.

I have posted under 'General Support (v4)' hopefully that's the right area.

We would be willing to pay, but the shop is for a local children's charity and we/they don't have money to throw around.

I would have thought this problem must come up fairly often.

Link to comment
Share on other sites

Ok, I have found a code modification.

Google;

Sort Product Options CC4

This is a commercial bit of code, and so is not free, but for the time required to write, would be good value.

If your charity cannot afford this then you'll need to make your own code changes to provide a simple (sorted by name) query.

I imagine the hosting company is not providing free server space, and its not realistic to expect 3rd parties to provide work for free.

I think you mis-understand the term "buggy". A software bug is essentially an undefined action. Just because the order of options cannot be set, does not mean the code is buggy.. it just does not suit your needs and needs some code changes.

Jason

Link to comment
Share on other sites

Guest Acknowledged74

Thanks Jason, really appreciate your time.

Ok I've been passed one the code change very kind from someone at CC support.

For anyone else who later finds this post/reply its:

Find viewProd.inc.php file which is in /includes/content

## Build SQL for product options

$query = sprintf("SELECT B.*, T.option_name, T.option_type, M.value_name FROM %1\$sCubeCart_options_bot AS B LEFT JOIN %1\$sCubeCart_options_mid AS M ON B.value_id = M.value_id, %1\$sCubeCart_options_top AS T WHERE B.option_id = T.option_id AND B.product = %2\$d ORDER BY T.option_name, M.value_name ASC", $glob['dbprefix'], $_GET['productId']);

## Build SQL for product options

$query = sprintf("SELECT B.*, T.option_name, T.option_type, M.value_name FROM %1\$sCubeCart_options_bot AS B LEFT JOIN %1\$sCubeCart_options_mid AS M ON B.value_id = M.value_id, %1\$sCubeCart_options_top AS T WHERE B.option_id = T.option_id AND B.product = %2\$d ORDER BY T.option_name, CAST(M.value_name AS SIGNED) ASC", $glob['dbprefix'], $_GET['productId']);

So the very simple amendment there is

M.value_name ASC

replaced by

CAST(M.value_name AS SIGNED) ASC

It seems to work fine.

Regards

Ash

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...