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

#   Want to give a discount on all products or category on every wednesday

##

- **[BluepointWebdesign](/forum/user/34929-bluepointwebdesign "View BluepointWebdesign's Profile")**
- [![BluepointWebdesign's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/34929-bluepointwebdesign "View BluepointWebdesign's Profile") Topic Author
- [ Offline](/forum/user/34929-bluepointwebdesign)

Less More

- Posts: 424
- Thank you received: 11
-
-

3 years 6 days ago [\#356526](#356526) by [BluepointWebdesign](/forum/user/34929-bluepointwebdesign "View BluepointWebdesign's Profile")  *[Want to give a discount on all products or category on every wednesday](/forum/46-discount-coupon/907253-want-to-give-a-discount-on-all-products-or-category-on-every-wednesday#356526 "-- url of the page with the problem -- :   07.bluepoint-concept.nl/feestdagen/pasen  -- HikaShop version -- : 5.0.0 -- Joomla version -- : 4.3.x -- PHP version -- : 8.1.x  Hello,  I need some help with giving for example 10% discount on products or category. The discount is not a problem but i want to give the discount on every Tuesday. How can i accomplish that?  Hope you can help.  Regards, Mark")* was created by *[BluepointWebdesign](/forum/user/34929-bluepointwebdesign "View BluepointWebdesign's Profile")*

-- url of the page with the problem -- : [ 07.bluepoint-concept.nl/feestdagen/pasen](https://07.bluepoint-concept.nl/feestdagen/pasen)
-- HikaShop version -- : 5.0.0
-- Joomla version -- : 4.3.x
-- PHP version -- : 8.1.x

Hello,

I need some help with giving for example 10% discount on products or category. The discount is not a problem but i want to give the discount
on every Tuesday. How can i accomplish that?

Hope you can help.

Regards,
Mark

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQ2LWRpc2NvdW50LWNvdXBvbi85MDcyNTMtd2FudC10by1naXZlLWEtZGlzY291bnQtb24tYWxsLXByb2R1Y3RzLW9yLWNhdGVnb3J5LW9uLWV2ZXJ5LXdlZG5lc2RheT90bXBsPW1hcmtkb3du) 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
-
-

3 years 5 days ago [\#356530](#356530) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Want to give a discount on all products or category on every wednesday](/forum/46-discount-coupon/907253-want-to-give-a-discount-on-all-products-or-category-on-every-wednesday#356530 "-- url of the page with the problem -- :   07.bluepoint-concept.nl/feestdagen/pasen  -- HikaShop version -- : 5.0.0 -- Joomla version -- : 4.3.x -- PHP version -- : 8.1.x  Hello,  I need some help with giving for example 10% discount on products or category. The discount is not a problem but i want to give the discount on every Tuesday. How can i accomplish that?  Hope you can help.  Regards, Mark")*

Hi,

You'll have to first create a discount via the menu Orders&gt;Discounts and configure it to start and end on the next Wednesday.
Once that's done, you can create a mass action with a trigger "every day" and configure a filter so that it always match with exactly one element. For example, it could be a user data mass action with a filter on the user_id being equal to the id of your super admin, which should hopefully never change.
Then, add an action "run MySQL query" with such a MySQL query: Code:

UPDATE #__hikashop_discount SET discount_start = discount_start*604800, discount_end = discount_end*604800 WHERE discount_end &gt; 1 AND discount_start &gt; 1 AND discount_end &lt; UNIX_TIMESTAMP();

That way, it will increase the start and end dates of the discount by the number of seconds in a week if the end date is smaller than the current date (which means that the discount period ended).

Note that if you have other discounts with start and end dates set in the past, this mass action will also update these, so you might want to add a condition like discount_code = "xxx" so that you target only one specific discount.

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

- **[BluepointWebdesign](/forum/user/34929-bluepointwebdesign "View BluepointWebdesign's Profile")**
- [![BluepointWebdesign's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/34929-bluepointwebdesign "View BluepointWebdesign's Profile") Topic Author
- [ Offline](/forum/user/34929-bluepointwebdesign)

Less More

- Posts: 424
- Thank you received: 11
-
-

3 years 5 days ago [\#356541](#356541) by [BluepointWebdesign](/forum/user/34929-bluepointwebdesign "View BluepointWebdesign's Profile")  Replied by *[BluepointWebdesign](/forum/user/34929-bluepointwebdesign "View BluepointWebdesign's Profile")* on topic *[Want to give a discount on all products or category on every wednesday](/forum/46-discount-coupon/907253-want-to-give-a-discount-on-all-products-or-category-on-every-wednesday#356541 "-- url of the page with the problem -- :   07.bluepoint-concept.nl/feestdagen/pasen  -- HikaShop version -- : 5.0.0 -- Joomla version -- : 4.3.x -- PHP version -- : 8.1.x  Hello,  I need some help with giving for example 10% discount on products or category. The discount is not a problem but i want to give the discount on every Tuesday. How can i accomplish that?  Hope you can help.  Regards, Mark")*

Hi thanks for this explaination.
I have made a discount for 10% then in mass action with these settings as you gave me.. But the date of discount will go from 2023-11-07 11.24 to 2106-02-07 07:28
What am i doing wrong? the time zone in Global configuration is on Amsterdam.
hope you can help me a little further..
Thanks in advance

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

- **[BluepointWebdesign](/forum/user/34929-bluepointwebdesign "View BluepointWebdesign's Profile")**
- [![BluepointWebdesign's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/34929-bluepointwebdesign "View BluepointWebdesign's Profile") Topic Author
- [ Offline](/forum/user/34929-bluepointwebdesign)

Less More

- Posts: 424
- Thank you received: 11
-
-

3 years 4 days ago [\#356542](#356542) by [BluepointWebdesign](/forum/user/34929-bluepointwebdesign "View BluepointWebdesign's Profile")  Replied by *[BluepointWebdesign](/forum/user/34929-bluepointwebdesign "View BluepointWebdesign's Profile")* on topic *[Want to give a discount on all products or category on every wednesday](/forum/46-discount-coupon/907253-want-to-give-a-discount-on-all-products-or-category-on-every-wednesday#356542 "-- url of the page with the problem -- :   07.bluepoint-concept.nl/feestdagen/pasen  -- HikaShop version -- : 5.0.0 -- Joomla version -- : 4.3.x -- PHP version -- : 8.1.x  Hello,  I need some help with giving for example 10% discount on products or category. The discount is not a problem but i want to give the discount on every Tuesday. How can i accomplish that?  Hope you can help.  Regards, Mark")*

forgot to sent allong my settings ![:)](/media/kunena/emoticons/3.png ":)")
[ ![screenshot-07.bluepoint-concept.nl-2023.11.10-11&#95;50&#95;13.png](/forum/attachment/58153) ](/forum/attachment/58153 "...0-11&#95;50&#95;13.png")

- [ ![screenshot-07.bluepoint-concept.nl-2023.11.10-11&#95;50&#95;13.png](/forum/attachment/58153) ](/forum/attachment/58153 "...0-11&#95;50&#95;13.png") [ ](/forum/attachment/58153?download=1 "...0-11&#95;50&#95;13.png")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQ2LWRpc2NvdW50LWNvdXBvbi85MDcyNTMtd2FudC10by1naXZlLWEtZGlzY291bnQtb24tYWxsLXByb2R1Y3RzLW9yLWNhdGVnb3J5LW9uLWV2ZXJ5LXdlZG5lc2RheT90bXBsPW1hcmtkb3du) 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
-
-

3 years 4 days ago [\#356543](#356543) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Want to give a discount on all products or category on every wednesday](/forum/46-discount-coupon/907253-want-to-give-a-discount-on-all-products-or-category-on-every-wednesday#356543 "-- url of the page with the problem -- :   07.bluepoint-concept.nl/feestdagen/pasen  -- HikaShop version -- : 5.0.0 -- Joomla version -- : 4.3.x -- PHP version -- : 8.1.x  Hello,  I need some help with giving for example 10% discount on products or category. The discount is not a problem but i want to give the discount on every Tuesday. How can i accomplish that?  Hope you can help.  Regards, Mark")*

Hi,

My bad, I was a bit fast when writing the MySQL query ![:)](/media/kunena/emoticons/3.png ":)")
I wrote * instead of +. Of course the seconds of 1 week ( 604800 ) need to be added to the existing date, and not multiplying it.
So the query should be: Code:

UPDATE #__hikashop_discount SET discount_start = discount_start+604800, discount_end = discount_end+604800 WHERE discount_end &gt; 1 AND discount_start &gt; 1 AND discount_end &lt; UNIX_TIMESTAMP();

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

- **[BluepointWebdesign](/forum/user/34929-bluepointwebdesign "View BluepointWebdesign's Profile")**
- [![BluepointWebdesign's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/34929-bluepointwebdesign "View BluepointWebdesign's Profile") Topic Author
- [ Offline](/forum/user/34929-bluepointwebdesign)

Less More

- Posts: 424
- Thank you received: 11
-
-

3 years 4 days ago [\#356554](#356554) by [BluepointWebdesign](/forum/user/34929-bluepointwebdesign "View BluepointWebdesign's Profile")  Replied by *[BluepointWebdesign](/forum/user/34929-bluepointwebdesign "View BluepointWebdesign's Profile")* on topic *[Want to give a discount on all products or category on every wednesday](/forum/46-discount-coupon/907253-want-to-give-a-discount-on-all-products-or-category-on-every-wednesday#356554 "-- url of the page with the problem -- :   07.bluepoint-concept.nl/feestdagen/pasen  -- HikaShop version -- : 5.0.0 -- Joomla version -- : 4.3.x -- PHP version -- : 8.1.x  Hello,  I need some help with giving for example 10% discount on products or category. The discount is not a problem but i want to give the discount on every Tuesday. How can i accomplish that?  Hope you can help.  Regards, Mark")*

No problem.. I tested it with this and after processing mass action, the discount neatly went 7 days ahead.. yes to next week tuesday.
Does the mass action goes automaticly now? or do i have to make a cron job for this?

thanks..

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQ2LWRpc2NvdW50LWNvdXBvbi85MDcyNTMtd2FudC10by1naXZlLWEtZGlzY291bnQtb24tYWxsLXByb2R1Y3RzLW9yLWNhdGVnb3J5LW9uLWV2ZXJ5LXdlZG5lc2RheT90bXBsPW1hcmtkb3du) 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
-
-

3 years 4 days ago [\#356555](#356555) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Want to give a discount on all products or category on every wednesday](/forum/46-discount-coupon/907253-want-to-give-a-discount-on-all-products-or-category-on-every-wednesday#356555 "-- url of the page with the problem -- :   07.bluepoint-concept.nl/feestdagen/pasen  -- HikaShop version -- : 5.0.0 -- Joomla version -- : 4.3.x -- PHP version -- : 8.1.x  Hello,  I need some help with giving for example 10% discount on products or category. The discount is not a problem but i want to give the discount on every Tuesday. How can i accomplish that?  Hope you can help.  Regards, Mark")*

Hi,

You need to cron job to be set up so that the query can run every day. And the query will only update the discount if the end date is in the past, so it's not a problem if it runs every day.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQ2LWRpc2NvdW50LWNvdXBvbi85MDcyNTMtd2FudC10by1naXZlLWEtZGlzY291bnQtb24tYWxsLXByb2R1Y3RzLW9yLWNhdGVnb3J5LW9uLWV2ZXJ5LXdlZG5lc2RheT90bXBsPW1hcmtkb3du) 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.060 seconds

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