/webdesigner/community?hl=en
This content is likely not relevant anymore. Try searching or browse recent questions.
Transform price from BGN to лв 1 Recommended Answer 1 Reply 0 Upvotes
1 Recommended Answer
$0 Recommended Answers
1 Relevant Answer
$0 Relevant Answers
Hi,
I created responsive ad with GWD. Problem is, in Google Ads data feed, column Price should contain currency (BGN in my case), And my boss wants it to be displayed as "лв". Is there a way to edit currency display in GWD with javascript?
Just to add - tried with Formatted Price, but in that case, HTML5 zip is just not working.
Data schema is custom.
Thank you in advance
Details
Community content may not be verified or up-to-date. Learn more.
Recommended Answer Recommended Answers (1)
Recommended Answer
Most Relevant Answer
By default, dynamic prices will be displayed in the local country currency so sometimes that's an issue when developing for countries outside your own. Editing the feed data, and Formatted Price (only Tangram, non-GMC retail feeds) are the best practices to adjust prices.
You can do it with JS as requested as a last resort but should be used with caution. Here's how:
In GWD Code view, call transformDynamicData(); in the handleDomContentLoaded event:

Then add the function to the GWD event handlers:
transformDynamicData = function(event) {
var dataProvider = document.querySelector('#gpa-data-provider');
dataProvider.addDataTransformer(function(dynamicData) {
//perform data manipulation here
for (var i = 0, l = dynamicData.Product.length; i < l; i++) {
var dataProvider = document.querySelector('#gpa-data-provider');
dataProvider.addDataTransformer(function(dynamicData) {
//perform data manipulation here
for (var i = 0, l = dynamicData.Product.length; i < l; i++) {
dynamicData.Product[i].price = '$' + dynamicData.Product[i].price;
}
});
};
};
You may have to adjust the 2 lines after //perform data manipulation here... that's just an example which prepends the $ symbol to your price value (maybe you'll need to replace 'BGN' with your new value).
Hope that helps,
Kent
Google Web Designer team
Original Poster
marked this as an answer Recommended based on info available
Our automated system analyzes replies to choose the one that's most likely to answer the question. If it seems to be helpful, we may eventually mark it as a Recommended Answer.
Most relevant based on info available
Our automated system analyzes the replies to choose the one that's most likely to answer the question.
Last edited 9/25/20
Helpful?
Most Relevant Answer Most Relevant Answers (0)
All Replies (1)
Recommended Answer
Most Relevant Answer
By default, dynamic prices will be displayed in the local country currency so sometimes that's an issue when developing for countries outside your own. Editing the feed data, and Formatted Price (only Tangram, non-GMC retail feeds) are the best practices to adjust prices.
You can do it with JS as requested as a last resort but should be used with caution. Here's how:
In GWD Code view, call transformDynamicData(); in the handleDomContentLoaded event:

Then add the function to the GWD event handlers:
transformDynamicData = function(event) {
var dataProvider = document.querySelector('#gpa-data-provider');
dataProvider.addDataTransformer(function(dynamicData) {
//perform data manipulation here
for (var i = 0, l = dynamicData.Product.length; i < l; i++) {
var dataProvider = document.querySelector('#gpa-data-provider');
dataProvider.addDataTransformer(function(dynamicData) {
//perform data manipulation here
for (var i = 0, l = dynamicData.Product.length; i < l; i++) {
dynamicData.Product[i].price = '$' + dynamicData.Product[i].price;
}
});
};
};
You may have to adjust the 2 lines after //perform data manipulation here... that's just an example which prepends the $ symbol to your price value (maybe you'll need to replace 'BGN' with your new value).
Hope that helps,
Kent
Google Web Designer team
Original Poster
marked this as an answer Recommended based on info available
Our automated system analyzes replies to choose the one that's most likely to answer the question. If it seems to be helpful, we may eventually mark it as a Recommended Answer.
Most relevant based on info available
Our automated system analyzes the replies to choose the one that's most likely to answer the question.
Last edited 9/25/20
Helpful?
This question is locked and replying has been disabled.
Discard post? You will lose what you have written so far.
false
false
Notifications are currently off and you won't receive updates. To turn them on, go to Notifications preferences on your Profile page.
Please follow our content policy when creating your post.
Discard post?
You will lose what you have written so far.
Personal information found
We found the following personal information in your message:
This information will be visible to anyone who visits or subscribes to notifications for this post. Are you sure you want to continue?
A problem occurred. Please try again.
Create Reply
Edit Reply
Link to post
Delete post?
This will remove the reply from the Answers section.
Notifications are off
Your notifications are currently off and you won't receive subscription updates. To turn them on, go to Notifications preferences on your Profile page.
Report abuse
Google takes abuse of its services very seriously. We're committed to dealing with such abuse according to the laws in your country of residence. When you submit a report, we'll investigate it and take the appropriate action. We'll get back to you only if we require additional details or have more information to share.
Go to the Legal Help page to request content changes for legal reasons.
Reported post for abuse
Unable to send report.
Report post
What type of post are you reporting?
Post is disrespectful, about third party products or contains unrelated content or personal information.
Post contains harassment, hate speech, impersonation, nudity; malicious, illegal, sexually explicit or commercial content.
Google takes abuse of its services very seriously. We're committed to dealing with such abuse according to the laws in your country of residence. When you submit a report, we'll investigate it and take the appropriate action. We'll get back to you only if we require additional details or have more information to share.
Go to the Legal Help page to request content changes for legal reasons.
Reported post for abuse
Unable to send report.
Google user
This reply is no longer available.
Badges
Some community members might have badges that indicate their identity or level of participation in a community.
Google Employee — Google product team members and community managers
Community Specialist — Google partners who help ensure the quality of community content
Diamond Product Expert — Community members with product mastery who help other Google users and Product Experts
Platinum Product Expert — Community members with advanced product knowledge who help other Google users and Product Experts
Gold Product Expert — Community members with in-depth product knowledge who help other Google users by answering questions
Silver Product Expert — Community members with intermediate product knowledge who help other Google users by answering questions
Product Expert Alumni — Former Product Experts who are no longer members of the program
Community content may not be verified or up-to-date.
/webdesigner/threads
//accounts.google.com/ServiceLogin
You'll receive email notifications for new posts at
Unable to delete question.
Unable to update vote.
Unable to update subscription.
You have been unsubscribed
Deleted
Unable to delete reply.
Removed from Answers
Marked as Recommended Answer
Removed recommendation
Undo
Unable to update reply.
Unable to update vote.
Thank you. Your response was recorded.
Unable to undo vote.
Thank you. This reply will now display in the answers section.
Link copied
Locked
Unlocked
Unable to lock
Unable to unlock
Pinned
Unpinned
Unable to pin
Unable to unpin
Marked
Unmarked
Unable to mark
Reported as off topic
/webdesigner/profile/0?hl=en