mivaecommerce / levels-readytheme

Repo for Levels ReadyTheme
1 stars 0 forks source link

Creating a Customer Bug #28

Closed tessguefen closed 8 years ago

tessguefen commented 8 years ago

Scripts: OCST: line 1163 url: ‘/mm5/merchant.mvc’, mm5 is hard coded.

This needs to be changed

tessguefen commented 8 years ago

$form.append('<input type="hidden" namme="Customer_Created" value="yes">'); in jsOCST namme is typoed (should be name)

tessguefen commented 8 years ago

FIX: on OCST > Customer Fields find this <div id="js-create-customer-fields" style="display: none;"> add this right below it: <input type="hidden" name="customer_create_url" value="&mvt:global:domain:mm_surl;" id="customer_create_url" />

Scripts.js: jsOCST Find this:

$.ajax({
    url: '/mm5/merchant.mvc',
    type: 'POST',
    dataType: 'json',
    data: data + '&api=1',
})

replace with:

var cust_create_url = $('#customer_create_url').val();

$.ajax({
        url: cust_create_url,
        type: 'POST',
        dataType: 'json',
        data: data + '&api=1',
})