| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
Remove attributes with multiple values from Specification Tab? | ||||
|
|
Thread Tools | Search this Thread |
#11
|
|||||||
|
|||||||
Re: Remove attributes with multiple values from Specification Tab?
Here's a way I found to hide product specific attributes that are not in a group
In my case I had several global attributes to display and when I added 2 yes/no product-specific attributes for variants, those attributes display on top with yes/no as the value, which doesn't look right and is unnecessary as luck would have it, my global attributes were all in a group, and the template that displays attributes has two IF statements to place a <div> around grouped attributes, which can be made into one IF block that only displays grouped attributes, so that the yes/no attributes do not get displayed because they are not in a group copy skins\default\en\product\details\parts\attribute.t pl to skins\custom_skin\default\en\product\details\parts \attribute.tpl and comment out the first {end} and the second {if:getAttributeGroup()} statements Code:
instead of only hiding attributes that are not grouped, you could probably expand the if statement to hide specific groups of attributes based on the group title in {getTitle()}
__________________
SignTorch Vector Graphics dropping xc4.6.x, tested xc5 (FAIL) |
|||||||
#12
|
|||||||
|
|||||||
Re: Remove attributes with multiple values from Specification Tab?
That did not work for me.
__________________
X-Cart 4.3 Joomla Among other things |
|||||||
#13
|
|||||||
|
|||||||
Re: Remove attributes with multiple values from Specification Tab?
Quote:
http://www.signtorch.com/bin/xcart/attribute-group.jpg then place a text marker (1234) in the custom template like so Code:
and then you should see the template text markers, but not the ungrouped attributes http://www.signtorch.com/bin/xcart/attribute-group2.jpg if you do not see the text markers, then the custom template may not be at the correct path and filename and make sure the custom skins module is enabled
__________________
SignTorch Vector Graphics dropping xc4.6.x, tested xc5 (FAIL) |
|||||||
#14
|
|||||||
|
|||||||
Re: Remove attributes with multiple values from Specification Tab?
My apologies. Mine are grouped.
__________________
X-Cart 4.3 Joomla Among other things |
|||||||
#15
|
|||||||
|
|||||||
Re: Remove attributes with multiple values from Specification Tab?
Quote:
ok, here's a down and dirty way to hide individual attributes based on hard-coded name values if you need to hide a whole group, title and all, that would be different in attribute.tpl shown above, add an inline style on the <li tag Code:
then put the following code block in a new file classes\XLite\Module\XC\CustomSkin\View\Product\De tails\Customer\Attributes.php the code shown hides two of the attributes shown in my screenshots above adjust the blue text values and number of if statements to match the name and number of attributes you want to hide the two red statements are what I added to the original Attributes class Code:
__________________
SignTorch Vector Graphics dropping xc4.6.x, tested xc5 (FAIL) |
|||||||
|
#16
|
|||||||
|
|||||||
Re: Remove attributes with multiple values from Specification Tab?
I need to know how to get rid Specifications tab all together. My client just said kill it.
__________________
X-Cart 4.3 Joomla Among other things |
|||||||
#17
|
|||||||
|
|||||||
Re: Remove attributes with multiple values from Specification Tab?
you could remove all product attributes
------- or to hide all tabs and tab content, put this in custom.css (then description uses full container width) .product-details-tabs .tabs {display:none;} -------- or an easy way to selectively remove the specifications tab, run this SQL UPDATE xc_products SET attrSepTab = 0; then copy skins/default/en/product/details/parts/common.product-main-attributes.tpl to custom_skin and comment out the {*<ul> ... </ul>*} tags that hides the attributes and any group titles on any products where attrSepTab is 0 that way you could show the specifications tab on some products by setting attrSepTabs to not 0 on certain products --------- to just globally hide the specs tab you could decorate getTabs() in classes/XLite/View/Product/Details/Customer/Page/APage.php with something like this (untested) Code:
__________________
SignTorch Vector Graphics dropping xc4.6.x, tested xc5 (FAIL) |
|||||||
|
#18
|
|||||||
|
|||||||
Re: Remove attributes with multiple values from Specification Tab?
Another approach...
You can remove the tab and replace it with a tab of your own content from the Product object like this: Code:
(also need in skins/default/en/module/DEV-ID/MODULE-NAME/ folder Code:
In this case the client wants to add text and images into the Specification tab. I'd previously added this to the Product Info section in admin so product_translations in the database contains a specification column. The code above display the data from this column.
__________________
Core version: 5.5.xx |
|||||||
|
|
|||
X-Cart forums © 2001-2020
|