In BigCommerce using the standard handlebars syntax {{price.with_tax.value}} price is displayed as 319.99. I would like to display this price without the decimal in raw format as 31999. Is this possible to retrieve in BigCommerce?
Thanks
You can use the multiply Handlebars helper to get the result you desire.
{{multiply price.with_tax.value 100}}
Related
I want to get the date in this format -
MM-dd-yy.
For example: 10-12-23
I'm writing this code but don't getting the desired solution -
{<entity_name>:<attribute>/#date;} Check-In Link
What should I write in the date part?
I'm afraid the only way to make it work is to set the user's locale to a locale that uses MM-dd-yy format.
Alternatively, it's possible to create a custom string field, populate that field with a properly formatted date and use the value of it in your template.
So, I'm working on a template where I have a merge variable, dateSubmitted. This variable comes from an API where it's formatted as so:
dateSubmitted = 2017-09-13GMT22:25:45.513+00:00
I'm trying to insert this date in a slightly nicer way into an email, so in my Mandrill template (using Handlebars) I'm doing the following:
<li><em>Date Submitted:</em> {{date dateSubmitted}}</li>
However, my date continues to display in the email as 2017-09-13GMT22:25:45.513+00:00. What am I doing wrong?
Stumble upon this too. After an hour I re-read the docs, where is stated, that this inline helper is used to
print the current date with a given format, defaults to d/m/Y
So, it is not for formatting your variables but for just displaying current date in custom format.
I'm relatively new to using WooCommerce so all advice would be great.
I've got a number of inclass training course products I'm trying to sell. Each have multiple date offerings.
Is there a way I can set the attribute term to a date value or do I have to manually add every possible date?
Is there another way to solve this problem, I am just ignorant off?
Thank you!
When you add the products and while entering the product data in general tab you will see two fields REGULAR PRICE & SALE PRICE beside the SALE PRICE text box you will see the schedule click on it you will find the DATE fields from Date to Date variations in price you can set it from there. Here I set an Image
Here you will Find the date fields to set
I have a template, where I have a table with column which I want to format as currency (2 decimal places). I'm using Velocity and NumberTool, which is putted in context.
I tried to use <<$number.format("currency", $My_data)>> in template, but as result I got empty column.
Is there some possibility to format list field in table without writing e.g. new foreach? Is some function which can be use in tempate to format field in one column?
Regards
I resolve it by myself.
I must just override VelocityTemplateEngine and Formatter to recognize phrases like <<$numberTool.format($My_data)>>, becouse default formatter was looking for field name after first '$'.
I have a events page using a custom wp_query so that I can split post into upcoming events and past events. To do this I need the date to be stored in the database Y/m/d format but would like it to display on the front ends d/m/y. Any help on how I should do this, I could reverse it with jquery but there might be a better way?
thanks
That page is probably using the_date() function.
If so, modify it using format parameter to something like this:
the_date('d/m/Y');
Check also this Codex page about formatting the date and time.