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

#   Unable to delete a discount

##

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

Less More

- Posts: 306
- Thank you received: 42
-
-

13 years 2 months ago [\#122701](#122701) by [trevsmiff](/forum/user/9214-trevsmiff "View trevsmiff's Profile")  *[Unable to delete a discount](/forum/22-market-bug-report/861853-unable-to-delete-a-discount#122701 "-- HikaMarket -- : 1.3.0&#95;2013-09-01 -- HikaShop version -- : 2.2.1 Business -- Joomla version -- : 3.1.5 -- PHP version -- : 5.3.13 -- Browser(s) name and version -- : Firefox 23.0.1  The delete discount button does not seem to be working. When I click on the 'X' to delete a discount a pop-up is displayed to confirm that I want to delete but the discount is not deleted.  regards Trevor")* was created by *[trevsmiff](/forum/user/9214-trevsmiff "View trevsmiff's Profile")*

-- HikaMarket -- : 1.3.0_2013-09-01
-- HikaShop version -- : 2.2.1 Business
-- Joomla version -- : 3.1.5
-- PHP version -- : 5.3.13
-- Browser(s) name and version -- : Firefox 23.0.1

The delete discount button does not seem to be working. When I click on the 'X' to delete a discount a pop-up is displayed to confirm that I want to delete but the discount is not deleted.

regards
Trevor

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

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26401
- Thank you received: 4081
-
- [](http://obsi.dev)
-

13 years 2 months ago [\#122737](#122737) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[Unable to delete a discount](/forum/22-market-bug-report/861853-unable-to-delete-a-discount#122737 "-- HikaMarket -- : 1.3.0&#95;2013-09-01 -- HikaShop version -- : 2.2.1 Business -- Joomla version -- : 3.1.5 -- PHP version -- : 5.3.13 -- Browser(s) name and version -- : Firefox 23.0.1  The delete discount button does not seem to be working. When I click on the 'X' to delete a discount a pop-up is displayed to confirm that I want to delete but the discount is not deleted.  regards Trevor")*

Hi,

Right.
There was some untested feature in the discount edition of HikaMarket. We will proceed to some test during the week.
Sorry for the inconvenient.

You have to modify three files in order to fix it.
The first file is "components/com_hikamarket/controllers/discount.php" and replace Code:

'delete' =&gt; array()

By Code:

'delete' =&gt; array('delete')

After that, the file "components/com_hikamarket/views/discountmarket/tmpl/listing.php" and replace Code:

&lt;tr class="row&lt;?php echo $k; ?&gt;" id="&lt;?php $rowId; ?&gt;"&gt;

By Code:

&lt;tr class="row&lt;?php echo $k; ?&gt;" id="&lt;?php echo $rowId; ?&gt;"&gt;

And finally the file "administrator/components/com_hikamarket/classes/discount.php" and replace Code:

if(!$app-&gt;isAdmin() &amp;&amp; ((int)$value1 == 0 &#124;&#124; hikamarket::acl('discount_delete') &#124;&#124; !hikamarket::isVendorDiscount((int)$value1)))

By Code:

if(!$app-&gt;isAdmin() &amp;&amp; ((int)$value1 == 0 &#124;&#124; !hikamarket::acl('discount_delete') &#124;&#124; !hikamarket::isVendorDiscount((int)$value1)))

It should fix the different problem (the right to delete and the fix to remove the complete row line and not the case which contains the delete button.

Regards,

---

Jerome - Obsidev.com
HikaMarket &amp; HikaSerial developer / HikaShop core dev team.

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

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

Less More

- Posts: 306
- Thank you received: 42
-
-

13 years 2 months ago [\#122741](#122741) by [trevsmiff](/forum/user/9214-trevsmiff "View trevsmiff's Profile")  Replied by *[trevsmiff](/forum/user/9214-trevsmiff "View trevsmiff's Profile")* on topic *[Unable to delete a discount](/forum/22-market-bug-report/861853-unable-to-delete-a-discount#122741 "-- HikaMarket -- : 1.3.0&#95;2013-09-01 -- HikaShop version -- : 2.2.1 Business -- Joomla version -- : 3.1.5 -- PHP version -- : 5.3.13 -- Browser(s) name and version -- : Firefox 23.0.1  The delete discount button does not seem to be working. When I click on the 'X' to delete a discount a pop-up is displayed to confirm that I want to delete but the discount is not deleted.  regards Trevor")*

Thanks again Jerome, that works.

Trevor

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

Moderators: [Obsidev](/forum/user/7040-obsidev "View Obsidev's Profile")

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

Time to create page: 0.053 seconds

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