Category fields are not updated

Discussion in 'Coupons & Deals Script' started by ganodan, Dec 7, 2014.

  1. ganodan

    ganodan New Member

    "child" & "parents" category fields are not updated,

    I noticed this bug and a fix is available, can it be posted here?

    Thanks,
    Dan.
  2. wazza

    wazza Member

    What package are you using?
  3. ganodan

    ganodan New Member

  4. wazza

    wazza Member

    ahh ok...thought i may be able to help but if it is a known issue has the fix been applied to current version? Maybe just uploading the version with fixes done may help?

    Backup first
    ganodan likes this.
  5. ganodan

    ganodan New Member

    Tried that did not work, It has not been applied to the current version yet.
  6. wazza

    wazza Member

    ahh ok. sorry i cant help at the moment. i havnt even installed the coupons package so i can`t even take a look at it for you.
    Im sure the guys wont be long with the fix.
  7. Andrew_G.

    Andrew_G. Staff Member

    Greetings @ganodan ,

    In order to fix the bug #1931 you need to open ../packages/coupons/admin/categories.php file and replace the following code:
    Code (Text):
    if (in_array($action, iaCore::ACTION_EDIT, iaCore::ACTION_DELETE))
    with this code:
    Code (Text):
    if (in_array($action, array(iaCore::ACTION_EDIT, iaCore::ACTION_DELETE)))
    save changes.

    Thanks for your interest in our software products!
  8. ganodan

    ganodan New Member

    Thank Andrew,

    The problem I found is that if you create a new category or subcategory the database process if not fully completed, I have tested this on the Coupon Demo site and the same problem can be found there.

    Try creating a new category & subcategory, then move a coupon to the new category, then look in that category.

    Dan.
  9. ganodan

    ganodan New Member

    Hello @Andrew_G.

    Can the fix for bug above get posted here once it's found?

    Thank,
    Dan
  10. Andrew_G.

    Andrew_G. Staff Member

    Hello @ganodan ,

    Thanks for your report. I've re-checked this issue and finally fixed it.

    In order to fix it on your site you need to open ../packages/coupons/admin/categories.php file and replace the following code:
    Code (Text):
    if (in_array($action, array(iaCore::ACTION_EDIT, iaCore::ACTION_DELETE)))
    {
        $this->getHelper()->rebuildRelation();
    }
    with this code:
    Code (Text):
    $this->getHelper()->rebuildRelation();
    Please don't forget to save changes.

    Let me know the result.
    ganodan likes this.
  11. ganodan

    ganodan New Member

    Awesome,

    Thanks @Andrew_G. for your quick response.

    Works for me.

    Regards,
    Dan. :)
  12. Andrew_G.

    Andrew_G. Staff Member

    You are always welcome here, @ganodan .

Share This Page