| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
Custom Product Tabs | ||||
|
|
Thread Tools | Search this Thread |
#11
|
|||||||||
|
|||||||||
Re: Custom Product Tabs
Can you send me the whole code of your module via pm or publicly? I will suggest about :h and about condition in the foreach of the second piece,
|
|||||||||
#12
|
|||||||
|
|||||||
Re: Custom Product Tabs
Sure - see attached.
__________________
X-Cart Gold Plus 4.6.5 Mods - WebsiteCM Dynamic Product Tabs, Smack Digital CDSEO Pro, AlteredCart Smart Search, AlteredCart One Page Checkout, Cart Works Power Filter, Firetank Software Feed Manager |
|||||||
#13
|
|||||||||
|
|||||||||
Re: Custom Product Tabs
Hi Mark!
Thank you for the attach. As for HTML text in the attribute values. The problem is that attribute values are already htmlentity encoded: http://www.php.net/htmlentities and you need to decode them in your PHP code. So, your method getExtendedSpecAttributes() will look like this: PHP Code:
The same change needs to be applied to getWhereUsedAttributes() method. 2) As regards to deleting these attributes from Specification section. I will publish code example in a couple of days. Quote:
|
|||||||||
#14
|
|||||||
|
|||||||
Re: Custom Product Tabs
Tony,
Great, that worked. Looking forward to hearing back from you on the necessary code to delete attributes.
__________________
X-Cart Gold Plus 4.6.5 Mods - WebsiteCM Dynamic Product Tabs, Smack Digital CDSEO Pro, AlteredCart Smart Search, AlteredCart One Page Checkout, Cart Works Power Filter, Firetank Software Feed Manager |
|||||||
#15
|
|||||||||
|
|||||||||
Re: Custom Product Tabs
Hi Mark!
I finally managed to write a code sample for you. In order to get this mod working, I had to rewrite the View/Product/Details/Customer/Page/APage.php script and now it looks like this: PHP Code:
As you can see, I moved the logic of determining whether you have or not Extended Spec/Where Used attributes away from this class. This logic is in the getWhereUsedAttributes() and getExtendedSpecAttributes() methods of the widget class. So, now we need to extend the widget class as well and add these methods. For that, you need to create the View/Product/Details/Customer/Attributes.php class inside your module with the following content: PHP Code:
As you can see, this decoration does pretty simple thing. When attributes are sorted in the getAttrList() method, it separates Where Used and Extended Spec attributes, so they would not ever be displayed. At the same time, this routine stores values of these attributes in two new properties: $whereUsedAttributes; $extendedSpecAttributes; so we can pull their content via methods getWhereUsedAttributes() and getExtendedSpecAttributes(). That is it. Mark, if I may ask, once you are done with this mod, can you please publish the result in this thread? It would help me a lot. Thank you. Tony. Last edited by tony_sologubov : 05-20-2014 at 05:59 AM. |
|||||||||
#16
|
|||||||
|
|||||||
Re: Custom Product Tabs
Will this code work for X-cart 4-x ?
|
|||||||
#17
|
|||||||||
|
|||||||||
Re: Custom Product Tabs
Quote:
X-Cart 4 is so radically different from 5, that there is not a single scrap of XC5 code that will work in XC4, except maybe some CSS and JavaScript.
__________________
Mike White - Now Accepting new clients and projects! Work with the best, get a US based development team for just $125 an hour. Call 1-502-773-6454, email mike at babymonkeystudios.com, or skype b8bym0nkey XcartGuru X-cart Tutorials | X-cart 5 Tutorials Check out the responsive template for X-cart. |
|||||||||
|
|||
X-Cart forums © 2001-2020
|