x5 New 'Short Description' Field in Categories - Solution and Question...
Using the example here as a guide: http://kb.x-cart.com/display/XDD/Adding+new+property+to+a+product
I've added a new field to the category admin screen to add short descriptions. My code looks like this: In XLite/Module/Client/ClientCatsShortDescriptions/Model/CategoryTranslation.php Code:
namespace XLite\Module\Client\ClientCatsShortDescriptions\Model; In XLite/Module/Client/ClientCatsShortDescriptions/View/Model/Category.php Code:
namespace XLite\Module\Client\ClientCatsShortDescriptions\View\Model; in my template listing the categories (cut down for clarity)... Code:
{foreach:getSubcategories(),subcategory} So this works very nicely except in admin the form field for entering the short descriptions is at the bottom of the page. How can I move it to be above the normal description box? I tried Code:
ALTER TABLE `xc_category_translations` MODIFY `shortDescr` VARCHAR(255) AFTER `name` I guess it's something to do with the module being called last on the page? |
Re: x5 New 'Short Description' Field in Categories - Solution and Question...
In your __construct() class you must reorganize the schemaDefault array and put your shortDescr field right above usual Description field instead of adding it to the bottom of the array.
Please, let me know if it makes sense to you. Tony |
Re: x5 New 'Short Description' Field in Categories - Solution and Question...
Ah.. I did this...
In XLite/Module/Client/ClientCatsShortDescriptions/View/Model/Category.php now I have Code:
namespace XLite\Module\Client\ClientCatsShortDescriptions\View\Model; Seems to work. Cool! |
Re: x5 New 'Short Description' Field in Categories - Solution and Question...
UPDATE
For 5.2.6 function method needs to look like this... Code:
public function __construct(array $params = array(), array $sections = array()) |
All times are GMT -8. The time now is 10:28 PM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.