ican Posted August 22, 2018 Share Posted August 22, 2018 Hello, I want to show specific price (Discount) end date on product page. How can i do this? Does anyone have idea. Link to comment Share on other sites More sharing options...
Knowband Plugins Posted August 22, 2018 Share Posted August 22, 2018 I think it can be achieved by adding the following line in the template file. {$product.specific_prices.to} You also need to use the date_format smarty modifier to print the same in desired format. Link to comment Share on other sites More sharing options...
ican Posted August 22, 2018 Author Share Posted August 22, 2018 56 minutes ago, Knowband Plugins said: I think it can be achieved by adding the following line in the template file. {$product.specific_prices.to} You also need to use the date_format smarty modifier to print the same in desired format. Can you please tell me how to use date_format smarty modifier ? Link to comment Share on other sites More sharing options...
Knowband Plugins Posted August 22, 2018 Share Posted August 22, 2018 You can use the modifier in the following way. {$product.specific_prices.to|date_format:'%d-%m-%Y'} Refer to the URL below for details. https://stackoverflow.com/questions/3248825/smarty-and-date 1 Link to comment Share on other sites More sharing options...
ican Posted August 22, 2018 Author Share Posted August 22, 2018 13 minutes ago, Knowband Plugins said: You can use the modifier in the following way. {$product.specific_prices.to|date_format:'%d-%m-%Y'} Refer to the URL below for details. https://stackoverflow.com/questions/3248825/smarty-and-date Oh, It's working. Thank you so much. Link to comment Share on other sites More sharing options...
Redcrusader Posted October 26, 2018 Share Posted October 26, 2018 On 8/22/2018 at 4:49 PM, Knowband Plugins said: You can use the modifier in the following way. {$product.specific_prices.to|date_format:'%d-%m-%Y'} Refer to the URL below for details. https://stackoverflow.com/questions/3248825/smarty-and-date This is not working for me {$product.specific_prices.to} <--- This line displays the date, but in format '0000-00-00 00:00:00' (Y-m-d H:i:s) {$product.specific_prices.to|date_format:'%d-%m-%Y'} shows nothing! <--- but this one shows nothing! Please help, really need this. Link to comment Share on other sites More sharing options...
Redcrusader Posted October 26, 2018 Share Posted October 26, 2018 Ok, I solved this: When date format is set for your language (in BO, International > localization > Languages > Your language), then it is possible to display that date format with the following line: {dateFormat date=$product.specific_prices.to} Or display date and time with the following line: {dateFormat date=$product.specific_prices.to full=1} Link to comment Share on other sites More sharing options...
fmoreira86 Posted December 24, 2018 Share Posted December 24, 2018 How can we do this on 1.7? Link to comment Share on other sites More sharing options...
dinesh badrukhiya Posted December 25, 2018 Share Posted December 25, 2018 Add the below lines in related .tpl file. For example, if you want to show it on product page then go to: templates\catalog\product.tpl and add the line. <span>{dateFormat date=$product.specific_prices.to}</span> 1 Link to comment Share on other sites More sharing options...
fmoreira86 Posted December 31, 2018 Share Posted December 31, 2018 On 12/25/2018 at 4:31 AM, dinesh badrukhiya said: Add the below lines in related .tpl file. For example, if you want to show it on product page then go to: templates\catalog\product.tpl and add the line. <span>{dateFormat date=$product.specific_prices.to}</span> Works! Thank you! Link to comment Share on other sites More sharing options...
dinesh badrukhiya Posted December 31, 2018 Share Posted December 31, 2018 Hello, @ican Can you please mark this as solved if you think you got the solution. Link to comment Share on other sites More sharing options...
pistachio Posted September 25, 2023 Share Posted September 25, 2023 Hello, I am having this problem. I need the start and end date to show on page product and I have tried the solutions presented here as well as I have referred to this solved topic but none of them work. I am using version 1.7.6.7 and the classic theme. Would appreciate some insights. Thank you Link to comment Share on other sites More sharing options...
AddWeb Solution Posted October 10, 2023 Share Posted October 10, 2023 On 9/25/2023 at 5:28 PM, pistachio said: Hello, I am having this problem. I need the start and end date to show on page product and I have tried the solutions presented here as well as I have referred to this solved topic but none of them work. I am using version 1.7.6.7 and the classic theme. Would appreciate some insights. Thank you Hi, Quote <div class="specific-price-dates"> <span>Start Date: {dateFormat date=$product.specific_prices.from}</span> <span>End Date: {dateFormat date=$product.specific_prices.to}</span> </div> Try this and let me know If it works! Thanks! Link to comment Share on other sites More sharing options...
AddWeb Solution Posted October 10, 2023 Share Posted October 10, 2023 Clear the cache once you made the changes and check Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now