Page MenuHomeIn-Portal Phabricator

MINC-137 Shopping cart update via AJAX support
ClosedPublic

Authored by erik on Dec 16 2015, 4:25 AM.

Details

Summary

added ajax-events and permissions for these events

Test Plan

Part 1

  • in IDE:
    1. open /themes/advanced/in-commerce/elements/content_boxes/checkout/shipping_address.elm.tpl template for editing
    2. change OnUpdate to OnUpdateAjax in it and save changes
  • on Front-End:
    1. add a tangible product to the Shopping Cart
    2. press Proceed to Checkout button to go to the Shipping Information step
    3. fill all fields, except Zip Code
    4. press "Update Address" button
    5. confirm, that page after reload displays correct JSON data - {"status": "FAILED","uploader_info": [],"field_errors": {"ShippingZip": "Field is required"}}

Part 2

  • in IDE:
    1. revert changes made to /themes/advanced/in-commerce/elements/content_boxes/checkout/shipping_address.elm.tpl template
    2. open /themes/advanced/in-commerce/elements/content_boxes/checkout/billing_options.elm.tpl template for editing
    3. change OnProceedToPreview to OnProceedToPreviewAjax in it and save changes
  • on Front-End:
    1. fill the missing Zip Code Field
    2. select shipping type
    3. proceed to Billing Information step
    4. fill all fields, except Zip Code
    5. press "Proceed to preview" button
    6. confirm, that page after reload displays correct JSON data - {"status": "FAILED","uploader_info": [],"field_errors": {"BillingZip": "Field is required"}}

Diff Detail

Repository
rMINC Modules.In-Commerce
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

erik updated this revision to Diff 433.Dec 16 2015, 4:25 AM
erik retitled this revision from to MINC-137 Shopping cart update via AJAX support.
erik updated this object.
erik edited the test plan for this revision. (Show Details)
erik added a reviewer: alex.
erik added 1 JIRA issue(s): MINC-137.
alex requested changes to this revision.Jan 26 2016, 3:46 AM
alex edited edge metadata.
alex added inline comments.
modules/in-commerce/units/orders/orders_event_handler.php
68–72 ↗(On Diff #433)

Please remove this.


Use same pattern for order update events (the CheckPermission checks request regardless of the event used + mapPermissions allows any event).

133 ↗(On Diff #433)

Please:

  1. add same line, but for OnUpdate event
  2. confirm, that user still can update his/her order

Use same pattern for order update events (the CheckPermission checks request regardless of the event used + mapPermissions allows any event).

4051–4053 ↗(On Diff #433)

Please remove & symbols.


The & is no longer used in most places since In-Commerce 5.2.0 release.

4054 ↗(On Diff #433)

Please move this above variable declaration.

4066–4068 ↗(On Diff #433)

Please remove & symbols.


The & is no longer used in most places since In-Commerce 5.2.0 release.

4069 ↗(On Diff #433)

Please move this above variable declaration.

This revision now requires changes to proceed.Jan 26 2016, 3:46 AM
erik updated this revision to Diff 473.Jan 27 2016, 4:28 AM
erik edited edge metadata.

Changed permission checking, made requested code reformatting.

erik updated this revision to Diff 474.Jan 27 2016, 4:33 AM
erik edited edge metadata.

Changed permissions checking, made reqiested code reformatting.

alex requested changes to this revision.Jan 27 2016, 5:25 AM
alex edited edge metadata.

Previously I've requested & to be removed (=& and &$event), but only 50% of that (=&) was done.

This revision now requires changes to proceed.Jan 27 2016, 5:25 AM
erik updated this revision to Diff 475.Jan 28 2016, 3:59 AM
erik edited edge metadata.

Removed & before $event.

alex edited edge metadata.Mar 10 2016, 5:11 AM
alex added a project: Restricted Project.
alex requested changes to this revision.Jul 13 2016, 3:39 AM
alex edited edge metadata.

Please resubmit patch against 5.2.x. I've changed my mind against target version of this change.

This revision now requires changes to proceed.Jul 13 2016, 3:39 AM
erik updated this revision to Diff 568.Jul 13 2016, 5:09 AM
erik edited edge metadata.

Re-submitted patch from 5.3.x project

alex accepted this revision.Nov 19 2016, 8:54 AM
alex edited the test plan for this revision. (Show Details)
alex edited edge metadata.
alex edited edge metadata.
This revision is now accepted and ready to land.Nov 19 2016, 8:55 AM
This revision was automatically updated to reflect the committed changes.