Zen Cart Logo
If this is your first visit, check our documentation. To post, register or login.
Forums / Setting Up Your Zen Cart Products / Setting Up Categories, Products, Attributes / V155a - Attribute issue showing "Display Only" items on product page on the site

V155a - Attribute issue showing "Display Only" items on product page on the site

Started by sw1138lr on 4 Jul 2016, 5:47 PM · Views: 4,876

Results 1 to 8 of 8
4 Jul 2016, 5:47 PM
#1
sw1138lr avatar

sw1138lr

New Zenner

Join Date:
Jun 2012
Posts:
94
Plugin Contributions:
0

Post #1 by sw1138lr

Attributes: We installed a test version of V1.5.5a. When I view the products on the storefront (products on the test site version V1.5.5a) it is showing my attributes that are marked as display only. When I view the Attributes Controller screen within the Admin for that product is shows it to be "yes" - yellow button with no red "X" on that option. Why would that be happening? They are working in my current production and they don't display.

I research the issue extensively - I downloaded into a spreadsheet all the attributes databases and compared them back to production. I did not find any differences. We are upgrading from V1.5.0 to V1.5.5a.

The "required" attribute is OFF on all the products.

Can anyone help with this issue?

5 Jul 2016, 2:31 AM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,512
Plugin Contributions:
176

Post #2 by drbyte

I don't think I have an answer for your primary question, but until Ajeh comes along I'll ask a clarifying question:

"Display Only" means "yes, display this, but it doesn't offer any choices, because it is just an informational message".
Is that what you're expecting from the "Display Only" option?

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

6 Jul 2016, 8:54 PM
#3
sw1138lr avatar

sw1138lr

New Zenner

Join Date:
Jun 2012
Posts:
94
Plugin Contributions:
0

Post #3 by sw1138lr

DrByte:

I don't think I have an answer for your primary question, but until Ajeh comes along I'll ask a clarifying question:

"Display Only" means "yes, display this, but it doesn't offer any choices, because it is just an informational message".
Is that what you're expecting from the "Display Only" option?

I'm expecting it work the same as it does in version 1.5.0. Which is when you mark it "Yes" it does not display the option to the customer. We use the Display only options for the Google Feeder to set the google taxonomy list. example: "Toys & Games > Toys > Dolls, Playsets & Toy Figures > Action & Toy Figures".

6 Jul 2016, 9:26 PM
#4
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Post #4 by mc12345678

sw1138lr:

I'm expecting it work the same as it does in version 1.5.0. Which is when you mark it "Yes" it does not display the option to the customer. We use the Display only options for the Google Feeder to set the google taxonomy list. example: "Toys & Games > Toys > Dolls, Playsets & Toy Figures > Action & Toy Figures".
That would more than likely have been something incorporated into a version of the attributes.php file. If incorporated as suggested in the forum using an override file then the changes would be found in includes/modules/YOUR_TEMPLATE/attributes.php. Others have also used a read only option name attribute type and then used css to hide the display of the specific attribute.

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

6 Jul 2016, 9:40 PM
#5
sw1138lr avatar

sw1138lr

New Zenner

Join Date:
Jun 2012
Posts:
94
Plugin Contributions:
0

Post #5 by sw1138lr

mc12345678:

That would more than likely have been something incorporated into a version of the attributes.php file. If incorporated as suggested in the forum using an override file then the changes would be found in includes/modules/YOUR_TEMPLATE/attributes.php. Others have also used a read only option name attribute type and then used css to hide the display of the specific attribute.

I don't think you understand the issue.

With version 1.5.5a it is showing attributes that are marked as display only. When I view the Attributes Controller screen within the Admin for all products is shows it to be "yes" - yellow button with no red "X" on that option.

When you mark this option Yes - it should not put the option on the web screen for the users to view the attribute.

6 Jul 2016, 9:44 PM
#6
sw1138lr avatar

sw1138lr

New Zenner

Join Date:
Jun 2012
Posts:
94
Plugin Contributions:
0

Post #6 by sw1138lr

sw1138lr:

I don't think you understand the issue.

With version 1.5.5a it is showing attributes that are marked as display only. When I view the Attributes Controller screen within the Admin for all products is shows it to be "yes" - yellow button with no red "X" on that option.

When you mark this option Yes - it should not put the option on the web screen for the users to view the attribute.

I changed the value from "yes" to "No' - with red "X" and it still show the attribute on the screen.

6 Jul 2016, 9:56 PM
#7
sw1138lr avatar

sw1138lr

New Zenner

Join Date:
Jun 2012
Posts:
94
Plugin Contributions:
0

Post #7 by sw1138lr

sw1138lr:

I changed the value from "yes" to "No' - with red "X" and it still show the attribute on the screen.

I see the file your referencing includes/modules/YOUR_TEMPLATE/attributes.php. and I found this note about display only:

To turn off the attributes that are marked as Display Only.

Each query that selects data from the table TABLE_PRODUCTS_ATTRIBUTES needs to have the following condition

AND patrib.attributes_display_only = 0

Note, that on one of the queries, the table TABLE_PRODUCTS_ATTRIBUTES is referenced as pa so the condition would be

AND pa.attributes_display_only = 0

6 Jul 2016, 10:07 PM
#8
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Post #8 by mc12345678

The problem with totally turning off the attribute in a fashion similar to that without additional code to push the content to somewhere in the browser "feed" is that if it is not pulled from the database, then it is not available for the other application. Ugh, not sure I can explain well what I'm thinking...

Would suggest viewing the page source of the applicable page and see if that additional content you are expecting is presented twice or just once as the code is/stands for the setup that was in place when the attribute displayed always.

My thought of application of this was to have the attributes_display_only field included in the query, and when an attribute was assembled having that marked, then to add a style tag to the html portion of the attribute to have display:none. With the idea that the value would still be pushed to the browser, but not displayed. But I also don't know how the data for your feed is put together/presented to be able to properly advise. No link provided, no identification of specific plugin version/download location, etc...

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...