Wunderbyte-GmbH / moodle-local_shopping_cart

Other
4 stars 5 forks source link

Tests - VAT nr Checker #71

Open georgmaisser opened 4 weeks ago

georgmaisser commented 4 weeks ago
eynimeni commented 3 weeks ago

TODO

update for @semteacher this works as intended as georg said. I didn't know yet in the video. so a valid vat will be used until checkbox unchecked or other valid vat entered

eynimeni commented 3 weeks ago

@semteacher I have made a screenrecording to show to you in detail this new feature. Please make sure you have checked out booking 401_DEV and shopping_cart feature_installment_subbooking branches. You can download the video here: https://we.tl/t-xVgcXS4wP8 Please let me know if anything was unclear!

eynimeni commented 3 weeks ago

An example for a valid VAT would be the one of wunderbyte: U74259768

semteacher commented 3 weeks ago

Potential issue: for the following setting image I would expect presence of "Verify VAT" on the checkout page. But it does not shown image It is necessary to fill all fields image to see "Verify VAT" on the checkout page. image Which is, it turn, demand from user to input country/VAT manually again. However the word "automatic" in settings told me that once I provide it - verification must be performed automatically - so price has to be altered automatically (as well as form on the "checkout" page - I would expect to see values from settings page in case of "automatically")...

semteacher commented 3 weeks ago

Cannot open dialog to edit addresses from checkout page due to error image

import Templates from "../../../../lib/amd/src/templates"; should be import Templates from 'core/templates'; fixed, pushed Another error appears

{
    "error": true,
    "exception": {
        "message": "Exception - Warning: Undefined array key \"name\" in [dirroot]/local/shopping_cart/classes/form/modal_new_address.php on line 55",
        "errorcode": "generalexceptionmessage",
        "backtrace": "* line 157 of /lib/behat/lib.php: Exception thrown\n* line 55 of /local/shopping_cart/classes/form/modal_new_address.php: call to behat_error_handler()\n* line 217 of /lib/formslib.php: call to local_shopping_cart\\form\\modal_new_address->definition()\n* line 73 of /lib/form/classes/dynamic_form.php: call to moodleform->__construct()\n* line 71 of /lib/form/classes/external/dynamic_form.php: call to core_form\\dynamic_form->__construct()\n* line ? of unknownfile: call to core_form\\external\\dynamic_form::execute()\n* line 253 of /lib/external/classes/external_api.php: call to call_user_func_array()\n* line 83 of /lib/ajax/service.php: call to core_external\\external_api::call_external_function()\n",
        "link": "http://webserver/local/shopping_cart/address.php",
        "moreinfourl": "https://docs.moodle.org/403/en/error/moodle/generalexceptionmessage",
        "debuginfo": "\nError code: generalexceptionmessage"
    }
}

fixed, pushed

UPD: "dev_testing" branch has been used now

semteacher commented 3 weeks ago

An issue: Area on the cehckout page wit horiginal price has been updated when installment on/off with page reload:

image

image (I would expect an original price in red rectangle)

image

definitely error - an original price should be in red rectangle.

georgmaisser commented 3 weeks ago

the price in the list is not correctly updated. If you reload the page completely, you should always see the correct prices.

We should include the list of items above in our Ajax update routine.

georgmaisser commented 3 weeks ago

Actually, to be more precise:

The reduction of the items price during isntallementpayments on reload is accepted. We know it's not perfect, but that's how it works now.

The second error should be fixed by automatically triggering the list of items when we toggle the installments checkbox. we make a ticket for it. For the moment, ignore these values in your test

semteacher commented 3 weeks ago

Additionally - VAT verification reloads page reset "Use installment.. " to OFF