Hi
I hope this is the right place to post this question.
Is there a way to hide display only attributes?
Hi
I hope this is the right place to post this question.
Is there a way to hide display only attributes?
Only a fool say's money doesn't matter. No rich man ever starved to death.
May i have a link to the attribute in question here please ...
And explain a little more in detail ..
Mark
Hare Do
Hi
I have installed the Numinix googlefroogle add on and it uses the attributes for google categories but the problem is the display only attributes show on the ad and I need to hide them. I am not the only one looking for a solution to this and numinix does not respond to posts about it.
http://velvetfreeway.com/aaaa/index....&products_id=1
It would be great if you could help
Only a fool say's money doesn't matter. No rich man ever starved to death.
You could hide these display only attributes via CSS:
1)
Find in includes/modules/(YOURTEMPLATE)/attributes.php:
Assign an ID by changing to:Code:// Read Only - just for display purposes if ($products_options_names->fields['products_options_type'] == PRODUCTS_OPTIONS_TYPE_READONLY) { // $tmp_html .= '<input type="hidden" name ="id[' . $products_options_names->fields['products_options_id'] . ']"' . '" value="' . stripslashes($products_options->fields['products_options_values_name']) . ' SELECTED' . '" /> ' . $products_options->fields['products_options_values_name']; $tmp_html .= $products_options_details . '<br />'; } else { $zv_display_select_option ++; }
2)Code:// Read Only - just for display purposes if ($products_options_names->fields['products_options_type'] == PRODUCTS_OPTIONS_TYPE_READONLY) { // $tmp_html .= '<input type="hidden" name ="id[' . $products_options_names->fields['products_options_id'] . ']"' . '" value="' . stripslashes($products_options->fields['products_options_values_name']) . ' SELECTED' . '" /> ' . $products_options->fields['products_options_values_name']; $tmp_html .= '<div id="merchanthide">' . $products_options_details . '</div>'; } else { $zv_display_select_option ++; }
Now you can add the following to your includes/templates/YOURTEMPLATE/stylesheet.css:
Code:#merchanthide{ display:none; }
Thanks for that but for some reason it does not work
Only a fool say's money doesn't matter. No rich man ever starved to death.
Let me know if you still need a solution that works globally. In plain words NO read only attributes will show anywhere on the site. Works perfectly with Dynamic Filter and you only have to alter 2 lines in 1 file
Making sure we get the cost of freight back will drive us all mad at some stage.
Since this forum is a venue to help those in need, how's about posting your solution just in case you're on a cruise when it's needed.
Are You Vulnerable for an Accessibility Lawsuit?
myZenCartHost.com - Zen Cart Certified, PCI Compatible Hosting by JEANDRET
Free SSL, Domain, and MagicThumb with semi-annual and longer hosting.
I've found this solution:
Edit your /includes/modules/<template>/attributes.php file. If it doesn't exist, copy the attributes.php file from /includes/modules/attributes.php and put it there.
Once in the file, locate these lines (this started on line 554 for me):
Comment the lines so it looks like this:Code:// READONLY case ($products_options_names->fields['products_options_type'] == PRODUCTS_OPTIONS_TYPE_READONLY): $options_name[] = $products_options_names->fields['products_options_name']; $options_menu[] = $tmp_html . "\n"; $options_comment[] = $products_options_names->fields['products_options_comment']; $options_comment_position[] = ($products_options_names->fields['products_options_comment_position'] == '1' ? '1' : '0'); break;
Make sure you leave the 'break;' uncommented so the switch statement knows to break.Code:// READONLY case ($products_options_names->fields['products_options_type'] == PRODUCTS_OPTIONS_TYPE_READONLY): //$options_name[] = $products_options_names->fields['products_options_name']; //$options_menu[] = $tmp_html . "\n"; //$options_comment[] = $products_options_names->fields['products_options_comment']; //$options_comment_position[] = ($products_options_names->fields['products_options_comment_position'] == '1' ? '1' : '0'); break;
I left the case uncommented because I personally don't like messing with code I didn't write all too much. While it probably won't hurt to just remove the above portion entirely, I like to just comment out what I don't need so I can just remove the comments if I need it later.
My Site - Zen Cart & WordPress integration specialist
I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.
How does googlefroogle use the read-only attributes? Does it look at your website at all, or does it just get a feed straight from you?
Giving read-only attributes an id means that if there is more than one, there will be duplicate ids on the page - an HTML/CSS no-no. Make it a class instead of an id to be safe. Better yet, base the class (or id in this case) on the options name id and you will get a unique tag that can be used to address just this kind of read-only attribute, leaving others alone. Of course, if every product has a different option name for its google attribute, that would be impractical to handle in styling.
Bookmarks