close ad
WARNING: Do Not Install the DREAMWEAVER CC 2017 Update »
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Sometimes Ascending, Sometimes Descending

Thread began 3/06/2010 3:27 pm by jaa397769 | Last modified 3/29/2010 9:33 am by PimpMyHoodie | 1003 views | 8 replies |

jaa397769

Sometimes Ascending, Sometimes Descending

I am putting product into my powerstore 3. The most odd thing is happening, I am adding the product the same exact way everytime, yet I am getting two different results when the product is showing on the front end.

Here is the generated source code from both pages. Look how one is taking product# and then ascending, and the other is descending. What could possibly be wrong? They both are speaking to the same page, Product_results.php correct? How can the database be returning two different results in "sort order"?

THIS ONE IS FINE!
<div class="addToCartSelect">
<label title="Size" for="ProductOptions_88">Size :</label>
<select name="ProductOptions_88" id="ProductOptions_88" onchange="updateProduct()">

<option value="325" selected="selected">S</option>

<option value="326">M</option>

<option value="327">L</option>


<option value="328">XL</option>

<option value="329">XXL</option>
</select>
</div>
<div class="addToCartSelect">
<label title="Pattern" for="ProductOptions_89">Pattern :</label>
<select name="ProductOptions_89" id="ProductOptions_89" onchange="updateProduct()">

THIS ONE IS NOT!
<div class="addToCartSelect">
<label title="Size" for="ProductOptions_86">Size :</label>
<select name="ProductOptions_86" id="ProductOptions_86" onchange="updateProduct()">

<option value="321">XXL</option>

<option value="320">XL</option>

<option value="319">L</option>


<option value="318">M</option>

<option value="317" selected="selected">S</option>
</select>
</div>
<div class="addToCartSelect">
<label title="Color" for="ProductOptions_87">Color :</label>
<select name="ProductOptions_87" id="ProductOptions_87" onchange="updateProduct()">


<option value="323">Black</option>

<option value="322" selected="selected">Red</option>

<option value="324">Olive</option>
</select>
</div>
<option value="330" selected="selected">Olive</option>

<option value="331">Black</option>
</select>
</div>
Im a little confused.

Sign in to reply to this post

jaa397769

Is anyone going to acknowledge this post!

I'm waiting through a whole weekend now the end of business on the third day. With what were paying for these products, and the fact that we can't speak to someone on the phone, you would at least think tech support could answer these threads on the board in a timely manner.
Please I need an answer to my question.
Thank you

Sign in to reply to this post

Dani Chankhour

Sorry for the delay in response. But we are closed on the Weekends, and therefor, Monday is a busy day for support.

The options are ordered by the order you entered the options, so if you added the size options and then the color options, then the order will change.

If you send me a link to your product detail page and tell me what you expect to happen i should be able to assist you. Most likely we will just need to change the ordering to order alphabetically.

Sign in to reply to this post

jaa397769

product detail page

Thanks for the response Dan, there all entered the same way, yet this one and a few others are laying out the wrong way, Please take a look here
Products_Detail.php?ProductID=437

Then when you go to the home page look at this, from products, select,
Mens Apparel
then sub category
Tshirts
you will see three items, all added the same way, Product 2 and 3 are laying out right on front end, Product 1 in reverse.
I tried deleting options and re entering them, but I am still get the same results. It is sorting backwards.
Im confused, because like I said earlier this makes no sense because there all speaking to the same page, Product_Detail and as far as I can see the query has to work the same way. I am truly befuddled on this whole thing. Any help would be greatly appreciated.
Thank you

Sign in to reply to this post

Dani Chankhour

Currently there is no sorting on the option values. but to be consistent we can add a sorting to the query_OptionValues query. In your Product_Details.php, look for the query_OptionValues query and add:

ORDER BY ps3_options.OptionID

to the end of the query. You will need to do this in three places on the Product_Details.php. This will order the values by the order you entered them into the database.


let me know if you have any questions.

Sign in to reply to this post

jaa397769

what does the code look like ammended

Here are the three sections of code can you please show me how to amend the query string.
{
mysql_select_db($database_PowerStoreConnection, $PowerStoreConnection);
$query_OptionValues = sprintf("SELECT ps3_options.OptionID, OptionName FROM ps3_options INNER JOIN ps3_optiongroups ON ps3_optiongroups.OptionGroupID = ps3_options.OptionGroupID WHERE ps3_options.OptionGroupID = %s ", GetSQLValueString($OGIDParam_OptionValues, "int"));
$OptionValues = mysql_query($query_OptionValues, $PowerStoreConnection) or die(mysql_error());
$row_OptionValues = mysql_fetch_assoc($OptionValues);
$totalRows_OptionValues = mysql_num_rows($OptionValues);
}

{ mysql_select_db($database_PowerStoreConnection, $PowerStoreConnection);
$query_OptionValues = sprintf("SELECT ps3_options.OptionID, OptionName FROM ps3_options INNER JOIN ps3_optiongroups ON ps3_optiongroups.OptionGroupID = ps3_options.OptionGroupID WHERE ps3_options.OptionGroupID = %s ", GetSQLValueString($OGIDParam_OptionValues, "int"));
$OptionValues = mysql_query($query_OptionValues, $PowerStoreConnection) or die(mysql_error());
$row_OptionValues = mysql_fetch_assoc($OptionValues);
$totalRows_OptionValues = mysql_num_rows($OptionValues);}


{ mysql_select_db($database_PowerStoreConnection, $PowerStoreConnection);
$query_OptionValues = sprintf("SELECT ps3_options.OptionID, OptionName FROM ps3_options INNER JOIN ps3_optiongroups ON ps3_optiongroups.OptionGroupID = ps3_options.OptionGroupID WHERE ps3_options.OptionGroupID = %s ", GetSQLValueString($OGIDParam_OptionValues, "int"));
$OptionValues = mysql_query($query_OptionValues, $PowerStoreConnection) or die(mysql_error());
$row_OptionValues = mysql_fetch_assoc($OptionValues);
$totalRows_OptionValues = mysql_num_rows($OptionValues);}

Thanks

Sign in to reply to this post

jaa397769

I believe I did it right

Dani, please look over the query and tell me if it is correct, It is working but I want to know that it is the proper way to write it.

mysql_select_db($database_PowerStoreConnection, $PowerStoreConnection);
$query_OptionValues = sprintf("SELECT ps3_options.OptionID, OptionName FROM ps3_options INNER JOIN ps3_optiongroups ON ps3_optiongroups.OptionGroupID = ps3_options.OptionGroupID WHERE ps3_options.OptionGroupID = %s ORDER BY ps3_options.OptionID ", GetSQLValueString($OGIDParam_OptionValues, "int"));
$OptionValues = mysql_query($query_OptionValues, $PowerStoreConnection) or die(mysql_error());
$row_OptionValues = mysql_fetch_assoc($OptionValues);
$totalRows_OptionValues = mysql_num_rows($OptionValues);

Sign in to reply to this post

Dani Chankhour

Sorry i should have given you an example, but it looks like you got it.

Sign in to reply to this post

PimpMyHoodie

I too have been having the same problem, but this fix works perfectly!..

Just to be clear, for anyone else reading this, you will need to update all three instances of this code (as detailed above)..

Also, if you want this same change to take effect in the admin area too (where you actually create/update/review the drop down menus) you will also need to update the page below with exactly the same updates!..

this page:

yourstore.com/Admin/Products_Update.php

;-)

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...