When you are developing ecommerce websites, you may need to integrate Google Customer Reviews code. Google Customer Reviews enable ecommerce businesses to collect feedback from the buyers and then shows these ratings on the search results and search ads.
If you are going to embed Google Customer Reviews code in your BigCommerce website, you may not know which variables to use for the date “YYYY-MM-DD”.
For the “COUNTRY_CODE”, you will use “US” for United States and “MX” for Mexico (You will have to use ISO 3166-1 alpha-2 format. https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2 You can use the below code for getting date:
var d = new Date(%%LNG_DateOfOrder%%); var curr_date = d.getDate(); var curr_month = d.getMonth(); var curr_year = d.getFullYear(); var formated_date = curr_year + "-" + curr_month + "-" + curr_date;If you want to set the delivery date to be 7 days from the order placement date, you can add that no. of days to the variable curr-date
We are showing your code for 7 days ahead. The JS variable “DATE_TO_BE_USED” in the code is used for 7 days ahead. You can change it to any number of days, by simply changing the multiplier, i.e.7, in this equation 86400 X 7 X 1000.