Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hi there,
on views we returned an "{{amount}}" value printed out instead, we suppose, the "blank" value.
For example we have a "${{amount}} 15.00" instead of "$15.00" on the product price.
We did try to inspect it and we found the function have a white space before "{{amount}}" in the search parameter on str_replace:
function shopify_money_format() {
$format = shopify_store_info()->money_format;
return str_replace(' {{amount}}', '', $format);
}
Removing it, the price is correctly printed:
function shopify_money_format() {
$format = shopify_store_info()->money_format;
return str_replace('{{amount}}', '', $format);
}
I'll attach the patch we used, hoping it's the right way and it will help. :)
Comment | File | Size | Author |
---|---|---|---|
0001-Space-on-amount-removed.patch | 999 bytes | bazzmann | |
Comments
Comment #1
John Carbone CreditAttribution: John Carbone commentedThanks! We'll include this in the next dev/alpha.
Comment #3
donutdan4114 CreditAttribution: donutdan4114 at Bonify commented