Forum Search
- Forum
- Joomla Extensions Support Questions
- Virtuemart Extensions Support Questions
- XML Feed: Tags with Field Names in Camel Case?
XML Feed: Tags with Field Names in Camel Case?
- znetworks
- Topic Author
- Offline
- Fresh Boarder
-
Less
More
- Posts: 2
- Thank you received: 0
8 years 1 month ago #307
by znetworks
XML Feed: Tags with Field Names in Camel Case? was created by znetworks
I have a custom XML Feed based on GoogleBaseXML to continually update/transfer information to a custom made website. The XML Feed is working except I would like the field names in the Feed to be in Camel Case, as opposed to all uppercase word starts or all lowercase word starts. (ie productName, not productname or ProductName)
I have tried adding some PHP functions to convert the XML Feed to Camel Case tags, but it disregards the code and reverts back to the standard format.
Any advice or a possible solution, or any PHP code I can add in to convert the tags would be very much appreciated.
I have tried adding some PHP functions to convert the XML Feed to Camel Case tags, but it disregards the code and reverts back to the standard format.
Any advice or a possible solution, or any PHP code I can add in to convert the tags would be very much appreciated.
Please Log in or Create an account to join the conversation.
- boggler
- Offline
- Moderator
-
Less
More
- Posts: 1283
- Karma: 18
- Thank you received: 155
8 years 1 month ago #308
by boggler
Replied by boggler on topic XML Feed: Tags with Field Names in Camel Case?
The xml tag names are defined in the file components/com_googlebasexml/models/googlebasexml.php.
Look for the function getTags() - if you are using a version of the component prior to 2.0.0 then it will be around line 870, if you are using 2.0.0 then it is around line 1100.
The function is self-explanatory, it simply defines the tag names, eg
You can change the values to whatever you want.
Look for the function getTags() - if you are using a version of the component prior to 2.0.0 then it will be around line 870, if you are using 2.0.0 then it is around line 1100.
The function is self-explanatory, it simply defines the tag names, eg
$tags->description = 'description';
$tags->id = 'g:id';
$tags->link = 'link';
$tags->price = 'g:price';
$tags->sale_price = 'g:sale_price';
$tags->sale_price_effective = 'g:sale_price_effective_date';
You can change the values to whatever you want.
Please Log in or Create an account to join the conversation.
Moderators: boggler
- Forum
- Joomla Extensions Support Questions
- Virtuemart Extensions Support Questions
- XML Feed: Tags with Field Names in Camel Case?
Time to create page: 0.245 seconds