Im trying to create a plugin to export and calculate some field but it seemstome that i'm not able to call customfield...
i'm using this function to get the value:
$Var1= $fields->getField($settings->var1Xml)->value;
Icreated a plugin where i can write the names of the custom field and i set it up on the xml
Accepted Answer
Pending Moderation
The customfield name are UPPERCASE (ex. COM_VIRTUEMART_APA_P_LISTINO) ... if this can be the issue
Accepted Answer
Pending Moderation
Hello,
Are you writing a custom rule plugin for VirtueMart export? If yes, please have a look at Writing a rule plugin document to know on it. Check if all the variables are set according to the document so to get the value.
Are you writing a custom rule plugin for VirtueMart export? If yes, please have a look at Writing a rule plugin document to know on it. Check if all the variables are set according to the document so to get the value.
Kind regards,
Tharuna
=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
Tharuna
=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
Accepted Answer
Pending Moderation
I've chekced multipletimes but i can't find what's wrong:
I have a custom field called COM_VIRTUEMART_APA_P_NETTO (in the language file translated as: PREZZO NETTO)
in the plugin xml file:
<field name="listprice"
label="COM_CSVI_PLUGINFORM_PRICE_LIST_LABEL"
type="text"
required="true"
class="input-normal" />
in the plugin php file I left only:
$value = $fields->getField($settings->listprice)->value;
I tried also $value = $fields->getField($settings->listprice);
Still no result
If I pass a manual value to $value it works.. but not as I showed before
Ideas?
I have a custom field called COM_VIRTUEMART_APA_P_NETTO (in the language file translated as: PREZZO NETTO)
in the plugin xml file:
<field name="listprice"
label="COM_CSVI_PLUGINFORM_PRICE_LIST_LABEL"
type="text"
required="true"
class="input-normal" />
in the plugin php file I left only:
$value = $fields->getField($settings->listprice)->value;
I tried also $value = $fields->getField($settings->listprice);
Still no result
If I pass a manual value to $value it works.. but not as I showed before
Ideas?
Accepted Answer
Pending Moderation
Hello,
Try to put only $settings->listprice instead of $fields->getField($settings->listprice); in your php file and see if you get the value from the XML form.
Try to put only $settings->listprice instead of $fields->getField($settings->listprice); in your php file and see if you get the value from the XML form.
Kind regards,
Tharuna
=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
Tharuna
=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
Accepted Answer
Pending Moderation
Hello,
Since you said that it is a language string you need to user JText to get the translated value like JText::_('COM_VIRTUEMART_APA_P_NETTO').
Since you said that it is a language string you need to user JText to get the translated value like JText::_('COM_VIRTUEMART_APA_P_NETTO').
Kind regards,
Tharuna
=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
Tharuna
=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
Accepted Answer
Pending Moderation
Hello,
Probably i understood wrong. I thought you wanted the translated value of custom field COM_VIRTUEMART_APA_P_NETTO which is in language file. To do that you need to use JText as explained in my previous post.
The $settings->listprice will get you the value you have in text field in your XML form. I don't understand what else value you are looking for.
I have a custom field called COM_VIRTUEMART_APA_P_NETTO (in the language file translated as: PREZZO NETTO)
Probably i understood wrong. I thought you wanted the translated value of custom field COM_VIRTUEMART_APA_P_NETTO which is in language file. To do that you need to use JText as explained in my previous post.
The $settings->listprice will get you the value you have in text field in your XML form. I don't understand what else value you are looking for.
Kind regards,
Tharuna
=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
Tharuna
=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
Accepted Answer
Pending Moderation
the content value of the custom field:
COM_VIRTUEMART_APA_P_NETTO is a custom field charged for every product so in the plugin form i pass the name of the custom field that I have to get in the plugin php... but i dont know how to get it....
lets say that in the custom field i have the value 100 for theproduct X
... how can I get the value 100?
COM_VIRTUEMART_APA_P_NETTO is a custom field charged for every product so in the plugin form i pass the name of the custom field that I have to get in the plugin php... but i dont know how to get it....
lets say that in the custom field i have the value 100 for theproduct X
... how can I get the value 100?
Accepted Answer
Pending Moderation
Hello,
You need to write SQL query to get the value of the custom field from virtuemart_product_customfields table. To do that write query to get the virtuemart_custom_id of COM_VIRTUEMART_APA_P_NETTO from virtuemart_customs table and then using this virtuemart_custom_id and virtuemart_product_id you can get the value from virtuemart_product_customfields table. Since this is your custom code it is out of CSVI scope to help more on this.
You need to write SQL query to get the value of the custom field from virtuemart_product_customfields table. To do that write query to get the virtuemart_custom_id of COM_VIRTUEMART_APA_P_NETTO from virtuemart_customs table and then using this virtuemart_custom_id and virtuemart_product_id you can get the value from virtuemart_product_customfields table. Since this is your custom code it is out of CSVI scope to help more on this.
Kind regards,
Tharuna
=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
Tharuna
=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
Accepted Answer
Pending Moderation
I solved creating an exported suspended field fields... then I used the given name of the field inside my plugin
Accepted Answer
Pending Moderation
Glad to know that you solved it.
Kind regards,
Tharuna
=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
Tharuna
=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
- Page :
- 1
There are no replies made for this post yet.
Be one of the first to reply to this post!
Be one of the first to reply to this post!
Please login to post a reply
You will need to be logged in to be able to post a reply. Login using the form on the right or register an account if you are new here. Register Here »