News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

developing a plugin that has dynamic setup options in xml

Started by welrachid, September 13, 2015, 11:33:09 AM

Previous topic - Next topic

welrachid

Hi everyone.
I'm developing a plugin that i would like to do some certain action based on the possible order statuses a shop has.
This would normally require me to make some entries in the XML file that comes with the plugin. Since a xml file is not dynamic i cannot figure out how i would include other possible order statuses a shop can have (than those that are standard)
I would like the plugin to be a plugin that is called each time a status change happens.

Joomla 3.4.3
VM 3.0.9.4

If you want me to clarify anything please do not hesitate to ask

Thanks
Wel
Best regards,
Wel

GJC Web Design

Do you mean to have any Status that a shopper owner might create available in the plugin admin?
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

welrachid

yes exactly.

if a shopowner for example creates a new order status lets say A,B,C,D (or whatever) i want those to be able to be listed in the plugin administration..
Best regards,
Wel

GJC Web Design

have a look either how e.g.

<field name="categories" value_field="category_name" type="vmcategories" multiple="true" size="10" default="" label="VMSHIPMENT_WEIGHT_CATEGORIES"
                       description="VMSHIPMENT_WEIGHT_CATEGORIES_DESC"/>

is rendered
administrator\components\com_virtuemart\fields\vmcategories.php  with a form field subclassed from JFormField

or do a query in the xml

https://docs.joomla.org/SQL_form_field_type

GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

welrachid

Thanks will look into it. Will report if i succeed in doing what i have in mind :)
Best regards,
Wel

Studio 42

SImply, check Joomla fields types or do a custom field type. NO mystery to do this.
If you said adding new undefined dynamic fields to XML, this is more complicate using Joomla Jform and need to prebuild the XML file on demand and push it to the main form.