Skip to main content

Modification Template

Summary of change

Brief description of the change made.

Jira Link: SDT-XXX

Impact of Change

Does this affect the UI?

Does this affect the checkout process?

Will this be affected when updating PS Wire plugin

Details of change

Purpose of the change...

Files Impacted:

  1. wp-content/plugins/wp-pharmacywire-v3-mar/JsonApi/templates/js/json_checkout.js

  2. XXXXXXxx

Code Changes (Code, Screenshot)

1. 

Code Example

function updateForwardPrescriptionOptions() {
        const pwireComponents = window.pwire.pwire_components;
        const fwdRxOptions = pwireComponents.prescription.forward_prescription_options;
        const rxSubmissionMethod = $('.checkout_form').find('.rxSubmission_method');
        rxSubmissionMethod.html('');
        $.each(fwdRxOptions, (key, option) => {
            const method = option.value.toLowerCase();
            rxSubmissionMethod.append(`<input type="radio" id="rx_submission_${method}" name="rx_forwarding" value="${method}" required><label for="rx_submission_${method}" data-sort-order="${option.sort_order}">${option.label}</label>`);
        });
        //Custom code
        rxSubmissionMethod.append(`<input type="radio" id="rx_submission_need_rx" name="rx_forwarding" value="doctor" required><label for="rx_submission_need_rx" >Need Rx?</label>`);
    }

Image exampleScreenshot 2024-06-26 at 3.39.04 PM.png

Screenshots of before and after UI changes were made
Before
After
Approvals
UI Approval
Product Manager(Major Dev for the project)