mivaecommerce / readytheme-shadows

Shadows is the development framework and methodology used for creating our ReadyThemes as well as custom websites.
https://shadows.mivareadythemes.com/
MIT License
4 stars 3 forks source link

Global Account: Product not found after logging in on PROD screen #121

Closed influxweb closed 2 years ago

influxweb commented 2 years ago

Current Behavior

Using Long URLs, if you log in from the PROD screen you get a product not found screen. This is because the Product_Code is included in the Long URL and in global_account.mvt as a hidden input field for the login form. This causes a comma separated list of <product code>,<product_code> to be loaded on the PROD screen which does not exist.

Correcting the Issue

To make the update, without applying the latest release, you will need to update the code in User Interface -> Theme Components -> Content Sections -> global_account:

<mvt:if expr="g.Basket:cust_id EQ 0">
    <div id="global-account" class="u-over-everything x-collapsible-content__item t-global-account">
        <form class="t-global-account__form" method="post" action="&mvte:urls:_self:secure_noparams;" autocomplete="off">
            <fieldset>
                <legend>Global Account Log In</legend>
                <input type="hidden" name="Action" value="LOGN" />
                <mvt:item name="urls" param="hidden_params:_self:auto" />
                <input type="hidden" name="Per_Page" value="&mvte:global:Per_Page;" />
                <input type="hidden" name="Sort_By" value="&mvte:global:Sort_By;" />
                <div class="c-form-list">
                    <div class="c-form-list__item c-form-list__item--full">
                        <label class="u-hide-visually" for="global-Customer_LoginEmail">Email Address</label>
                        <input id="global-Customer_LoginEmail" class="c-form-input c-form-input--large" type="text" inputmode="email" name="Customer_LoginEmail" value="&mvte:global:Customer_LoginEmail;" autocomplete="email" placeholder="Email" required>
                    </div>
                    <div class="c-form-list__item c-form-list__item--full">
                        <label class="u-hide-visually" for="global-Customer_Password">Password</label>
                        <input id="global-Customer_Password" class="c-form-input c-form-input--large" type="password" name="Customer_Password" autocomplete="current-password" placeholder="Password">
                    </div>
                    <div class="c-form-list__item c-form-list__item--full">
                        <input class="c-button c-button--full c-button--huge u-bg-gray-50 u-color-white u-text-bold u-text-uppercase" type="submit" value="Sign In">
                    </div>
                    <div class="c-form-list__item c-form-list__item--full">
                        <a class="c-button c-button--full c-button--hollow c-button--huge u-bg-white u-color-gray-50 u-text-bold u-text-uppercase" href="&mvte:urls:LOGN:secure;">Register</a>
                    </div>
                    <div class="c-form-list__item c-form-list__item--full u-text-center">
                        <a class="u-color-gray-40 u-text-bold u-font-small u-text-uppercase" href="&mvte:urls:FPWD:secure;">Forgot Password?</a>
                    </div>
                </div>
            </fieldset>
        </form>
    </div>
</mvt:if>