A need has arisen to include <g:identifier_exists>no</g:identifier_exists> when the gtin is empty.
I have tried using plugins but they all seem to be geared around replace or removing from fields rather than excluding the field completely from the xml export.
Do you have any suggestions on how I can achieve this.
To Recap: I need to exclude gtin only where the field is empty and add a field <g:identifier_exists>no</g:identifier_exists> instead.
- 1252spike
- RO CSVI
- Tuesday, 31 October 2017
- Subscribe via email
0
Accepted Answer
Pending Moderation
Hello,
You can write your own code to exclude gtin in the Google export XML handler in the folder administrator/components/com_csvi/helper/file/export/xml/google.php in the ContentText method. Make sure that you have these changes saved when you do a update on CSVI Pro as these changes will be overwritten during updates.
You can write your own code to exclude gtin in the Google export XML handler in the folder administrator/components/com_csvi/helper/file/export/xml/google.php in the ContentText method. Make sure that you have these changes saved when you do a update on CSVI Pro as these changes will be overwritten during updates.
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,
With the CSVI Multi replace rule you can toggle between Yes and No when there is a value for product_gtin or when its empty. To do that add product_gtin as a template field by setting column header as g:identifier_exists. Add two replacement rules, one is to check if product_gtin has a value using regular expression and replace it with text Yes and the second one to check if product_gtin is empty and replace with text No. Apply both rules on product_gtin field. Replacing empty value is not supported in the current CSVI code but by loading the patch file you can check and replace empty values too. Let me know if this solution helps.
patch_multireplace_2017_11_02.zip
With the CSVI Multi replace rule you can toggle between Yes and No when there is a value for product_gtin or when its empty. To do that add product_gtin as a template field by setting column header as g:identifier_exists. Add two replacement rules, one is to check if product_gtin has a value using regular expression and replace it with text Yes and the second one to check if product_gtin is empty and replace with text No. Apply both rules on product_gtin field. Replacing empty value is not supported in the current CSVI code but by loading the patch file you can check and replace empty values too. Let me know if this solution helps.
patch_multireplace_2017_11_02.zip
Attachments (1)
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
Thanks for that, I have applied the patch but cannot see the option for empty field... can you recap settings again for me.
I understand the application of the rule to the filename. I think I understand the replacement settings but the option for empty field is not clear.
I understand the application of the rule to the filename. I think I understand the replacement settings but the option for empty field is not clear.
Accepted Answer
Pending Moderation
Hello,
There is no option for empty field but you leave the Find text field as empty(nothing to be entered), Replace text field as No and save the rule. Apply the rule on product_gtin field. Hope it is clear now.
I have applied the patch but cannot see the option for empty field... can you recap settings again for me.
There is no option for empty field but you leave the Find text field as empty(nothing to be entered), Replace text field as No and save the rule. Apply the rule on product_gtin field. Hope it is clear now.
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
OK that's what I was doing... let me test it again later.. moved onto another project now... Thanks
Accepted Answer
Pending Moderation
Hello,
If you still have problem please post the screenshot of your rules or you can post the import template XML so i can check on the rules. To get the template XML file go to CSVI maintenance menu, select CSVI Pro in first option and Backup templates in second option. Select the google export template and click continue. Post the downloaded XML file here.
If you still have problem please post the screenshot of your rules or you can post the import template XML so i can check on the rules. To get the template XML file go to CSVI maintenance menu, select CSVI Pro in first option and Backup templates in second option. Select the google export template and click continue. Post the downloaded XML file here.
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 »