| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | Mark Forums Read | User manuals | Login |
Multi-language images using translation entities | |||
|
|
Thread Tools | Search this Thread |
#1
|
|||||||||
|
|||||||||
Multi-language images using translation entities
PREMISE
I am working on a multi-language banner slider module. I have already tested the java scripts, CSS and HTML required for the banner slider to work. Rather than having to edit the body field of a page's translation entity each time I want to add a new slide, or remove a slide, I would much rather have things setup in a similar fashion to the built-in Banner Rotation settings. STRUCTURE Code:
Since I am not able to paste all PHP code here, I have included them in a concatenated text file with file headings. (MlBanner.txt). ISSUE AT HAND When skins/admin/modules/<dev>/<mod>/body.twig is as follows: Code:
Code:
If I include both widgets in the body.twig, I do get the settings and the submit button, but the submit button only affects changes made to the settings portion and not the records being added. I have looked at some classes which yield results similar to those I desire, but when I apply those adaptations, nothing seems to bring up both the settings and record entry table with the same submit button to apply changes to either. The Banner Rotation template for example, only calls a single widget: Code:
I simply am not able to ascertain the cause of the behaviour and how to achieve the expected behaviour.
__________________
X-Cart version 5.4.1.46 PHP version 7.4.33 MySQL version 15.1 Apache version 2.4.56 cURL version 7.74.0 |
|||||||||
#2
|
|||||||
|
|||||||
Re: Multi-language images using translation entities
Is it even possible to use items list to save module's setting to begin with?
__________________
X-cart 5.2.12, php 5.6 Ed from Grenoble, France |
|||||||
#3
|
|||||||
|
|||||||
Re: Multi-language images using translation entities
Quote:
In other words, if you want to use items list, maybe you should create a separate tab/page, one with module settings (whatsoever you have there_ and one with the items list. And for the itemslist tab/page, your controller should extend \XLite\Controller\Admin\AAdmin instead of \XLite\Controller\Admin\Settings maybe?
__________________
X-cart 5.2.12, php 5.6 Ed from Grenoble, France |
|||||||
#4
|
|||||||||
|
|||||||||
Re: Multi-language images using translation entities
When I remove the settings from the tab outright, and have only the ItemsList, The "submit" button still fails to display when attempting to add a new record.
__________________
X-Cart version 5.4.1.46 PHP version 7.4.33 MySQL version 15.1 Apache version 2.4.56 cURL version 7.74.0 |
|||||||||
#5
|
|||||||
|
|||||||
Re: Multi-language images using translation entities
My experiences tend to suggest that when the submit button doesn't show up even when you put the code for it (well, sometimes one can simply forget...) it is usually because there is a problem with the entity definition or setter definition. Since you have an entity that is in one to one correspondence with another entity, sometimes defining setter can get tricky.
Otherwise, in your attached code, I see Code:
__________________
X-cart 5.2.12, php 5.6 Ed from Grenoble, France |
|||||||
|
Thread Tools | Search this Thread |
|
|
|
|||
X-Cart forums © 2001-2020
|