[Skip to main content](#vessel-content)

#   Discount Restriction Dates not Saving

##

- **[a2zcs](/forum/user/33209-a2zcs "View a2zcs's Profile")**
- [![a2zcs's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar33209.jpg)](/forum/user/33209-a2zcs "View a2zcs's Profile") Topic Author
- [ Offline](/forum/user/33209-a2zcs)

Less More

- Posts: 298
- Thank you received: 7
-
-

7 years 2 months ago [\#310878](#310878) by [a2zcs](/forum/user/33209-a2zcs "View a2zcs's Profile")  *[Discount Restriction Dates not Saving](/forum/46-discount-coupon/898280-discount-restriction-dates-not-saving#310878 "-- url of the page with the problem -- :   aquacorals.com  -- HikaShop version -- : 4.2.1 -- Joomla version -- : 3.9.11 -- PHP version -- : 7.2.22 -- Browser(s) name and version -- : Firefox 69.0 -- Error-message(debug-mod must be tuned on) -- : None  I've created a discount of $10 on a certain item that needs to be available for a week. Whenever I try to enter a start date or end date, the dates disappear upon saving. I've checked the timezone and it matches between server and joomla installation. What am I missing?")* was created by *[a2zcs](/forum/user/33209-a2zcs "View a2zcs's Profile")*

-- url of the page with the problem -- : [ aquacorals.com](http://aquacorals.com)
-- HikaShop version -- : 4.2.1
-- Joomla version -- : 3.9.11
-- PHP version -- : 7.2.22
-- Browser(s) name and version -- : Firefox 69.0
-- Error-message(debug-mod must be tuned on) -- : None

I've created a discount of $10 on a certain item that needs to be available for a week. Whenever I try to enter a start date or end date, the dates disappear upon saving. I've checked the timezone and it matches between server and joomla installation.
What am I missing?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQ2LWRpc2NvdW50LWNvdXBvbi84OTgyODAtZGlzY291bnQtcmVzdHJpY3Rpb24tZGF0ZXMtbm90LXNhdmluZz90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86556
- Thank you received: 14304
-
-

7 years 2 months ago [\#310879](#310879) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Discount Restriction Dates not Saving](/forum/46-discount-coupon/898280-discount-restriction-dates-not-saving#310879 "-- url of the page with the problem -- :   aquacorals.com  -- HikaShop version -- : 4.2.1 -- Joomla version -- : 3.9.11 -- PHP version -- : 7.2.22 -- Browser(s) name and version -- : Firefox 69.0 -- Error-message(debug-mod must be tuned on) -- : None  I've created a discount of $10 on a certain item that needs to be available for a week. Whenever I try to enter a start date or end date, the dates disappear upon saving. I've checked the timezone and it matches between server and joomla installation. What am I missing?")*

Hi,

I don't see why this would happen. I'm not able to reproduce the problem on my end, so I'm not sure.
It could be a view override or a plugin or a change to the database structure but I don't see why you would do such thing.
Check the type of the columns in the hikashop_discount table via your PHPMyAdmin. The discount_start and discount_end columns should be of the type int (10). If they are something else, like datetime or date it could create such issue.
Besides that, we would need a backend access to check on the situation and maybe even a FTP access to do some debugging since we don't have the problem on our end.
You can provide that along with a link to this thread via our contact form so that we can look at it if you don't find any issue in the database:
[ www.hikashop.com/support/contact-us.html](https://www.hikashop.com/support/contact-us.html)

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQ2LWRpc2NvdW50LWNvdXBvbi84OTgyODAtZGlzY291bnQtcmVzdHJpY3Rpb24tZGF0ZXMtbm90LXNhdmluZz90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86556
- Thank you received: 14304
-
-

7 years 1 month ago [\#311024](#311024) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Discount Restriction Dates not Saving](/forum/46-discount-coupon/898280-discount-restriction-dates-not-saving#311024 "-- url of the page with the problem -- :   aquacorals.com  -- HikaShop version -- : 4.2.1 -- Joomla version -- : 3.9.11 -- PHP version -- : 7.2.22 -- Browser(s) name and version -- : Firefox 69.0 -- Error-message(debug-mod must be tuned on) -- : None  I've created a discount of $10 on a certain item that needs to be available for a week. Whenever I try to enter a start date or end date, the dates disappear upon saving. I've checked the timezone and it matches between server and joomla installation. What am I missing?")*

Hi,

I was able to reproduce the problem on your website. What's funny is that it depends on the date selected. Sometimes it worked fine and sometimes it didn't.
Reading online, it looks like it's because the format of dates in some languages (in English) of Joomla doesn't follow the format supported by PHP to read dates.
Changing the line: Code:

if(!is_numeric($date)) $date = strtotime($date);

to: Code:

if(!is_numeric($date)) $date = strtotime(str_replace('-','/', $date));

in the file administrator/components/com_hikashop/helpers/helper.php fixed the problem on your website. We'll include this change on our end to.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQ2LWRpc2NvdW50LWNvdXBvbi84OTgyODAtZGlzY291bnQtcmVzdHJpY3Rpb24tZGF0ZXMtbm90LXNhdmluZz90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[a2zcs](/forum/user/33209-a2zcs "View a2zcs's Profile")**
- [![a2zcs's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar33209.jpg)](/forum/user/33209-a2zcs "View a2zcs's Profile") Topic Author
- [ Offline](/forum/user/33209-a2zcs)

Less More

- Posts: 298
- Thank you received: 7
-
-

7 years 1 month ago [\#311032](#311032) by [a2zcs](/forum/user/33209-a2zcs "View a2zcs's Profile")  Replied by *[a2zcs](/forum/user/33209-a2zcs "View a2zcs's Profile")* on topic *[Discount Restriction Dates not Saving](/forum/46-discount-coupon/898280-discount-restriction-dates-not-saving#311032 "-- url of the page with the problem -- :   aquacorals.com  -- HikaShop version -- : 4.2.1 -- Joomla version -- : 3.9.11 -- PHP version -- : 7.2.22 -- Browser(s) name and version -- : Firefox 69.0 -- Error-message(debug-mod must be tuned on) -- : None  I've created a discount of $10 on a certain item that needs to be available for a week. Whenever I try to enter a start date or end date, the dates disappear upon saving. I've checked the timezone and it matches between server and joomla installation. What am I missing?")*

Perfect Thanks! that did it!

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQ2LWRpc2NvdW50LWNvdXBvbi84OTgyODAtZGlzY291bnQtcmVzdHJpY3Rpb24tZGF0ZXMtbm90LXNhdmluZz90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.072 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
