Skip to main content

Unable to delete a discount

More
13 years 4 weeks ago #122701 by trevsmiff
-- 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 or Create an account to join the conversation.

More
13 years 4 weeks ago #122737 by Jerome
Replied by Jerome on topic Unable to delete a discount
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' => array()
By
Code:
'delete' => array('delete')

After that, the file "components/com_hikamarket/views/discountmarket/tmpl/listing.php" and replace
Code:
<tr class="row<?php echo $k; ?>" id="<?php $rowId; ?>">
By
Code:
<tr class="row<?php echo $k; ?>" id="<?php echo $rowId; ?>">
And finally the file "administrator/components/com_hikamarket/classes/discount.php" and replace
Code:
if(!$app->isAdmin() && ((int)$value1 == 0 || hikamarket::acl('discount_delete') || !hikamarket::isVendorDiscount((int)$value1)))
By
Code:
if(!$app->isAdmin() && ((int)$value1 == 0 || !hikamarket::acl('discount_delete') || !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 & HikaSerial developer / HikaShop core dev team.

Please Log in or Create an account to join the conversation.

More
13 years 4 weeks ago #122741 by trevsmiff
Thanks again Jerome, that works.

Trevor

Please Log in or Create an account to join the conversation.

Moderators: Obsidev
Time to create page: 0.200 seconds
Powered by Kunena Forum