The odd thing is, I have attributes displaying according to sort order, not id, and the display order changes when I change the sort order.
The odd thing is, I have attributes displaying according to sort order, not id, and the display order changes when I change the sort order.
OK, I MUST be losing my mind or missing something really obvious, because it still isn't working.
example1.gif shows my table of Option Name values and sort orders.
example2.gif shows a visual explanation of where each of those options will be placed on those four product pages.
Here is my CSS code:
The example at http://tinyurl.com/87bxoxe is for KS 3 Day and KS 5 Day.Code:.wrapperAttribsOptions label {font-size: 1.0em;}/*make "label" elements match other text*/ h3#attribsOptionsText {display: none;}/*hide the "Please Choose:" heading*/ h4.optionName {font-size: 1.0em;} .wrapperAttribsOptions+br.clearBoth {display: none;}/*allow floated attributes to sit side by side if desired*/ /*Titles*/ #wAttrib-9, #wAttrib-10, #wAttrib-11, #wAttrib-12 { background-color: #E8E2EE; color: #4C1E73; float: left; font-size: 12px; margin: 0 10px 0 0; } /*Juices*/ #wAttrib-13, #wAttrib-17, #wAttrib-22 { float: left; clear: left; background-color: #e8e2ee; margin:0 10px 0 0; padding: 5px 20px 5px 5px; } /*Meals and spacer 3*/ #wAttrib-14, #wAttrib-18, #wAttrib-24 { float: left; background-color: #e8e2ee; margin:0 10px 0 0; padding: 5px 5px 5px 5px; } /*Meal Bars, spacer 1, spacer 4*/ #wAttrib-15, #wAttrib-19, #wAttrib-23, #wAttrib-20, #wAttrib-25 { float: left; background-color: #e8e2ee; margin:0 10px 0 0; padding: 5px 20px 5px 5px; } /*Smoothies and spacer 2*/ #wAttrib-16, #wAttrib-21 { float: left; background-color: #e8e2ee; margin:0 10px 0 0; padding: 5px 20px 5px 5px; } #wAttrib-9 h4.optionName, #wAttrib-10 h4.optionName, #wAttrib-11 h4.optionName, #wAttrib-12 h4.optionName, #wAttrib-13 h4.optionName, #wAttrib-14 h4.optionName, #wAttrib-15 h4.optionName, #wAttrib-16 h4.optionName, #wAttrib-17 h4.optionName, #wAttrib-18 h4.optionName, #wAttrib-19 h4.optionName, #wAttrib-20 h4.optionName, #wAttrib-21 h4.optionName, #wAttrib-22 h4.optionName, #wAttrib-23 h4.optionName, #wAttrib-24 h4.optionName, #wAttrib-25 h4.optionName { color:#4C1E73; display: none; } .wrapperAttribsOptions { margin: 0; }
As you can see, both the ID and the Sort Order are in the order I want them... but they are not displaying in that order. Additionally, when I change the "Juice" header text attribute (sort order 1) to sort order 21, it does not change at all on the product page.
I am on ZC 1.3.9d if that helps at all...
Any ideas?
P.S., the attributes in the 100's can be ignored, as they are for other products.
Last edited by hockey2112; 17 Nov 2011 at 06:15 PM.
Hey gjh42, would you be willing to take a look in my admin if I PM'ed you some login credentials?
I can take a quick look now.
By the way, the "updates for v1.3.9h" that delia posted about are simply a change from the ereg_replace() to the preg_replace() function in one active line (and one commented-out line). It might make a difference for servers running PHP5.3, so changing this in two places in your current copy of attributes.phpto thisPHP Code:
ereg_replace('txt_', '', $key)
will bring it functionally up to date.PHP Code:
preg_replace('/txt_/', '', $key)
I had the change in my development copy, so it will be included in the "wrapper improvements" version... yet another mod I just need to test before releasing the new version:)
I'm not seeing anything wrong with your attributes settings or admin displays, but the storefront just ignores that sort order. Very weird.
I do note that there are missing defines in your admin homepage Customers box (BOX_TITLE_CUSTOMERS) (caused by COWOA implementation?), which is probably not related, but who knows?
Have you done the code update? Again, that is unlikely to affect the display in the way you are seeing, but it can't hurt to fix it.
What is different about the environment in your localhost and live server? It pretty much has to be something there...The odd thing is, I have attributes displaying according to sort order, not id, and the display order changes when I change the sort order.
Yep, that's how it works on my localhost version... it is so strange, like it is ignoring the sort order on the live site.
Yep, I did do the code update a day or two ago.
The live site has had a fair number of customizations done to it over the course of the last year or so... the localhost version was a fresh install. Unfortunately, there may be a number of different things on the live site.
Do you know of a way to track down where in the code it tells the system how to sort the attributes? Maybe there is something that was changed that causes the code to no longer pay attention to the sort order applied in the back-end?
attributes.php sets the query sort order with this:so finding where the PRODUCTS_OPTIONS_SORT_ORDER constant is defined/set will be helpful. It should be set in admin and stored in the database, but I'm not sure that constant name will help to track down the setting location.PHP Code:
if ($pr_attr->fields['total'] > 0) {
if (PRODUCTS_OPTIONS_SORT_ORDER=='0') {
$options_order_by= ' order by LPAD(popt.products_options_sort_order,11,"0")';
} else {
$options_order_by= ' order by popt.products_options_name';
}
Bookmarks