Tweak Library

Quote Only Site

Removing the ability for customers to checkout, so that they're forced to create quotes instead.

Coding Instructions

Step 1. Ensure the quote config is turned on, and the quote approval config off.

1) In the cpanel, go to "Setup & tools > All settings & tools", and click on "Webstore Settings" under "Webstore". 2) Ensure that "Enable quotes at checkout" is ticked. 3) Go back to the "All settings & tools" page, and click on "Advanced Configuration" under "Other". 4) In the "name" field, type "allow_quote_approval" and hit enter. 5) Ensure that "allow_quote_approval" is set to zero.

Step 2. Turn off Paypal Express and Masterpass

1) In the cpanel, go to "Setup & tools > All settings & tools", and click on "Advanced Configuration" under "Other". 2) Search for "show_paypal_express_link" in the "name" field, and click on the result. 3) Change the value "yes", to "no", hit save, and then click "back to configuration manager". 4) Search for "allow_masterpass_checkout" in the "name" field, and click on the result. 3) Change the value "yes", to "no", and hit save.

Step 3. Update the cart page

Open cart/shopping_cart.template.html, and delete the two checkout buttons (below) and their surrounding div's.

<button class="btn btn-success btn-lg btn-block" type="button" onclick="window.location='[%url page:'checkout' fn:'payment'/%]';" title="Checkout Now"><i class="fa fa-shopping-cart icon-white"></i> Checkout Now</button>

Change btn-default to btn-success in the class attribute for the "create quote from cart" button. Also add btn-lg as a class.

Step 4. Hide the checkout buttons from the cart drop-down, and the add to cart popup

Open styles.css for the theme, and paste the below CSS:

.checkout {
    display: none;
}

.npopup-checkout {
    display: none;
}

Step 5. Remove the "pay" button from the customer account screen

Open customer/template.html, locate the below block of code, and delete.

[%if [@amount_owed@] > 0 and [@order_status@] ne 'Cancelled'%]
    <div class="col-xs-12 col-md-4">
        <button class="btn btn-block btn-success" onclick="location.href='[%url page:'account' type:'pay_order' qs:'action=paynow' id:'[@order_id@]'/%]'">
            <i class="fa fa-check icon-white"></i> Pay
        </button>
    </div>
[%/if%]

Step 6. Remove the "pay now" button from the order page

Open customer/nr_view_order/order.template.html, locate the below block of code, and delete.

[%show_order id:'[@order_id@]'%]
    [%param *body%]
        [%if [@amount_owed@] > 0%]
            <button class="btn btn-success pull-right" onclick="location.href='[%URL page:'account' type:'pay_order' qs:'action=paynow' id:'[@order_id@]'%][%END URL%]'"><i class="fa fa-check icon-white"></i> Pay Now</button>
        [%/if%]
    [%/param%]
[%/show_order%]