Skip to main content

Quote Address

Quote Address is used for both Single-Ship and Multi-Ship

In Frans, most business logic are stored in quote_address



Custom feature 1: Multiple users editing the same QA:

In Frans, there's a custom code to track admin user's sessions. 
Extension: Frans/OrderProcessing

## Warning if multiple users open a same QA:
11/3/24: This plugin adds new columns in table `admin_user_session`
to track QA edit activity

<table name="admin_user_session" resource="default" engine="innodb">
        <column xsi:type="varchar" length="30" name="ent_type" nullable="true" comment="Entity type eg QA Order Ship"/>
        <column xsi:type="int" name="entity_id" nullable="true" unsigned="false"/>
        <column xsi:type="varchar" length="255" name="action_url" nullable="true" comment="Action url eg multiship/quoteaddress/edit"/>
        <column xsi:type="timestamp" name="terminated_at" nullable="true" comment="Session terminated at"/>
    </table>


When admin user enters the edit QA page;  in app/code/Frans/MultiShip/Controller/Adminhtml/QuoteAddress/AbstractQuoteAddress.php
in _afterLoadObject , we call addAdminUserSession to add a new admin_user_session to the db.

image.png

 

When the admin user clicks the `Back` button; javascript at app/code/Frans/MultiShip/view/adminhtml/web/js/frans-quote-address.js
makes an Ajax call to /orderProcessing/adminsession/update?terminated=1&qa_id=currentQaId
so that all sessions for that user and that QA are terminated.