Skip to content

Commit

Permalink
Merge pull request #31 from bigcommerce/cartfix
Browse files Browse the repository at this point in the history
Removed Form Models and fixed Cart rendering
  • Loading branch information
hegrec committed Jun 18, 2015
2 parents 4ecbaef + 6624d65 commit 0827300
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 174 deletions.
20 changes: 8 additions & 12 deletions src/api/cart.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,24 +98,20 @@ export default class extends Remote
/**
* Get cart content
*
* @param {String|Array|Object} renderWith
* @param {Object} options
* @param {Function} callback
*/
getContent(renderWith, callback) {
let options = {};

if (typeof callback !== 'function') {
callback = renderWith;
renderWith = null;
}
getContent(options, callback) {
options = options || {};

if (renderWith) {
options.template = renderWith;
if (typeof callback !== 'function') {
callback = options;
options = {};
}

this.makeRequest('/cart/content', 'GET', options, callback);
}

/**
* Get cart shipping quote
*
Expand Down Expand Up @@ -155,7 +151,7 @@ export default class extends Remote

this.makeRequest('/shipping-quote', 'POST', options, callback);
}

/**
* Apply a coupon code or gift certificate to the cart
*
Expand Down
11 changes: 0 additions & 11 deletions src/forms.js

This file was deleted.

40 changes: 0 additions & 40 deletions src/forms/address.js

This file was deleted.

35 changes: 0 additions & 35 deletions src/forms/create_account.js

This file was deleted.

45 changes: 0 additions & 45 deletions src/forms/edit_account.js

This file was deleted.

27 changes: 0 additions & 27 deletions src/forms/login.js

This file was deleted.

6 changes: 2 additions & 4 deletions src/main.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
import hooks from './hooks';
import api from './api';
import forms from './forms';

export {hooks, api, forms};
export {hooks, api};
export default {
hooks: hooks,
api: api,
forms: forms
api: api
};

0 comments on commit 0827300

Please sign in to comment.