Calling Developers!
We are reenergizing our code contribution process! Learn More

Discount module spryker on saving gives error "forbidden"

Options
mohammed.shamim
mohammed.shamim Posts: 28 🧑🏻‍🚀 - Cadet

we customized the discount module and storing the condition in a column . everything working fine on local when we save form with condition (rule column) but on server while saving the form with condition gives "forbidden error". Just didn't get it why , I already spend considerable time on this. please help if someone familiar with this error or faced this in person.

Answers

  • Salmanali Agharia
    Salmanali Agharia Software Engineer Posts: 1 🧑🏻‍🚀 - Cadet
    Options

    Hi @mohammed.shamim ,

    As per the error message, it seems that server might be having some firewall settings which doesn't allow to save it. Please check the same.

    Thanks

  • mohammed.shamim
    mohammed.shamim Posts: 28 🧑🏻‍🚀 - Cadet
    Options

    Thanks, But I have other form also that working fine on server. what so special for this that need firwall setting to be changed!? why same thing not happen in other form. ? that what i m tried to get.

  • Salman Agharia
    Salman Agharia Posts: 3 🧑🏻‍🚀 - Cadet
    Options

    @mohammed.shamim Sometimes, it happens that all things work correctly locally but in server it doesn't work due to some issues. And firewall can also be one of the reason based on my experience . Is there any specific error getting logged while submitting the form ? If not, put the breakpoint in the code to debug it using XDebug. It might help you if the issue is in the code. You can also check the permissions of the backoffice user using which you're trying to save the form.

  • vinod.agarwal
    vinod.agarwal Spryker Solution Partner Posts: 8 🧑🏻‍🚀 - Cadet
    Options

    Hi,

    We are also using spryker paas, from the last 1 month we have been facing this kind of random issue. Whenever we save/update any discount, we are getting 403 issue intermittently. This is not replicable on local environment.

  • mohammed.shamim
    mohammed.shamim Posts: 28 🧑🏻‍🚀 - Cadet
    Options

    Yes, same issue but its sort of permanent . I attached two screen shot. When ever i tried to add a condition and a saved it , it throw error like '403 forbidden.' although without adding any condition it works fine . on local its work fine even with condition. This issue persist so long perm ant not intermittently at my end.

  • vikram.bishnoi
    vikram.bishnoi Spryker Solution Partner Posts: 14 🧑🏻‍🚀 - Cadet
    Options

    Did you try adding the currency in the condition tab with SKU? We faced similar issue with Grand Total condition.

  • mohammed.shamim
    mohammed.shamim Posts: 28 🧑🏻‍🚀 - Cadet
    Options

    At my end, we not have currency option. please see the screen shot for option detail.

  • vikram.bishnoi
    vikram.bishnoi Spryker Solution Partner Posts: 14 🧑🏻‍🚀 - Cadet
    Options

    Can you please post the screenshots of all the tabs?

  • mohammed.shamim
    mohammed.shamim Posts: 28 🧑🏻‍🚀 - Cadet
    Options
  • mohammed.shamim
    mohammed.shamim Posts: 28 🧑🏻‍🚀 - Cadet
    edited March 29
    Options

    above screen shot contain all tabs for discount module!

  • vikram.bishnoi
    vikram.bishnoi Spryker Solution Partner Posts: 14 🧑🏻‍🚀 - Cadet
    Options

    My observation so far is related to condition tab. Add conditions for example -

    currency

    Grandtotal

    and try to save it, it may fail, change the price try again. I got this error many times andalways changing the conditions solves the issue. Once it is saved, you can upadate the condition as desired.