Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when clicking on Cart button #997

Closed
zenweasel opened this issue May 3, 2016 · 0 comments
Closed

Error when clicking on Cart button #997

zenweasel opened this issue May 3, 2016 · 0 comments
Assignees
Milestone

Comments

@zenweasel
Copy link
Collaborator

Expected behavior

When you click on the Cart button you should see the cart detail

Actual Behavior

Receive an error in the console and never see the cart


meteor.js?hash=199010c…:913 Exception from Tracker recompute function:
meteor.js?hash=199010c…:913 TypeError: Cannot read property 'rate' of undefined
    at http://localhost:3000/packages/reactioncommerce_reaction-collections.js?hash=9a3deaa1a2196cd43406622aa34f1d8028743f26:107:70
    at Array.reduce (native)
    at getSummary (http://localhost:3000/packages/reactioncommerce_reaction-collections.js?hash=9a3deaa1a2196cd43406622aa34f1d8028743f26:101:18)
    at Object.cartShipping (http://localhost:3000/packages/reactioncommerce_reaction-collections.js?hash=9a3deaa1a2196cd43406622aa34f1d8028743f26:138:25)
    at http://localhost:3000/packages/spacebars.js?hash=6b2a9ade7533b27d695f0281f10c438e40b8e6f8:235:19
    at Spacebars.call (http://localhost:3000/packages/spacebars.js?hash=6b2a9ade7533b27d695f0281f10c438e40b8e6f8:159:51)
    at Spacebars.mustacheImpl (http://localhost:3000/packages/spacebars.js?hash=6b2a9ade7533b27d695f0281f10c438e40b8e6f8:96:25)
    at Object.Spacebars.mustache (http://localhost:3000/packages/spacebars.js?hash=6b2a9ade7533b27d695f0281f10c438e40b8e6f8:100:39)
    at ._render (http://localhost:3000/packages/reactioncommerce_reaction-checkout.js?hash=05d258a2898fcc0f59e55f963539ea45e6060cc0:1019:22)
    at doRender (http://localhost:3000/packages/blaze.js?hash=38069f4f7cfbd8898160bc97d37dd847cd5985fe:2017:25)

Steps to Reproduce the Behavior

  1. Add items to cart
  2. Don't click on the "Checkout Now" button
  3. Click on the cart icon
  4. Observe the error in the console
@zenweasel zenweasel added the bug label May 3, 2016
@aaronjudd aaronjudd added this to the v0.13.0 milestone May 3, 2016
aaronjudd pushed a commit that referenced this issue May 3, 2016
 -related to #999
- resolves #997
@aaronjudd aaronjudd self-assigned this May 3, 2016
aaronjudd pushed a commit that referenced this issue May 4, 2016
aaronjudd pushed a commit that referenced this issue May 27, 2016
* - fixed a bug in `variantList` template `variants` helper,
when we were trying to divide by zero which prevents to NaN;
- behaviour of this helper changed. Now it is shows 100% if
`inventoryQuantity` is zero and all variants w/o quantity;
- fixed bug in `getVariantPriceRange` common helper when it is
tried to get price of undefined variant. This bug happens when we
remove last top variant within product;

* - revert `for...of` changes;
- if `inventoryManagement` disabled, we now ignore
inventoryTotal logic;

* Update versions to v0.12.3

* - fixed bug when top variant price was not selected (#948)

variant children range price but all product range price;

* Fix Profile ru translation (#958)

* - added some translation for Profile;
- changed "Orders" to "Your Orders" in Profile;

* - added titles for `edit`, `remove` buttons in `addressBookGrid`;

* - added translation for `accounts/addressBookRemove` error;
- added translation for `accounts/addressBookAdd` error;
- added translation for `accounts/addressBookUpdate` error;

* Show no products, "no products found" on invalid tag (#962)

* Return no products rather than all products when a tag is invalid

* When no products, show "No products found" text

* fix indenting

* Meteor one three (#968) (#969)

* Index fix for MongoDB version < 3.2.0

Resolves #865

Formerly variants where children of products, and the id was manually
inserted. Now, ProductVariants is a top level schema, and is indexing
the automatically inserted id, so _id is not optional.

* Add "products/removeMetaFields" method

Add new method "products/removeMetaFields" and moves deleting from
client to server method. Add permissions check, and product schema
“type= simple” selector.

Resolves #932

* updated versions

- reaction-schemas @ 2.0.4
- reaction-catalog @ 0.2.2

* update README.md

-  release v.0.12.1

* v0.12.1

* updated product `metafields` placeholder ru translation;

updated `detailName` field ru translation;

* Implemented i18n namespaces support.
- added `ns` field to translations schema;
- `loadCoreTranslations` now lookup all packages
with assets for translation files;
- import now support namespaces;
i18next now receives correct objects with namespaces;
- added `ns` to all translation files;

* v0.12.2

- minor update
- includes i18n updates
- updated versions for v0.12.2
- updated readme.md

* Fixes issue 509

* Temporary fix for timing issues with createDefaultAdmin

* - updated translation for PDP elements;
- cover onDelete confirmation by translation;
- added several tooltips for variant fields;

* - fixed a bug in `products/cloneVariant`, which was
prevents to receive the results on the client side;

* - add translation for child variant remove process;

* - with the help of @zenweasel "Warn @" tooltip fixed;

* Make error message upon sending email a little more clear. Fix JSDOC and one linting change.

* - it should be `inventoryManagement`;

* - missed comma;

* - fixed bug when we could not have an ability to publish
product if he has children and has no price
 (we used price from children);

* - fixed bug in `productGrid` products load method
when we are tried to load variants too from the previous
`product + variants` subscription, after we back from PDP to
 grid;

* - selector changed;

* updated npm-shrinkwrap

* Remove callback since it doesn't help

* Correct which comments go with which statements

* Just put main.js back the way it was

* WIP - 1.3

* Update versions to v0.12.3

* RC v0.13.0 + Meteor v1.3.1

- refactor ReactionImport.flush to avoid `RangeError: Maximum call
stack size exceeded`
- add new ReactionImport.commit method
- updated to ongoworks:security@2.0.1
- update GeoCoder, import into geocoder lib
- WIP import NPM
- add imports for react, react-dom, bunyan
- rename reaction-logging to reaction-logger to be consistent with pkg
name
- refactor to explicitly commit shops before other data in sample-data

* updated package versions

- WIP jquery ui - autosize, sortable, need import
- updated package versions for 1.3 dependency

* undo accounts-base specific versioning

* update reaction-logger dependency versions

* reaction-logger package

* sortable, easing, autosize jquery imports

* upgrade to react 0.15.1

- downgrade dochead, pending 0.15.0 merge
- upgrade to react 0.15.1

* don't install npm devDeps in Docker build script

* add meteor npm install to `reaction pull`

run `reaction pull` before updating to 0.13.0

* swiper, accounting-js, money imports

- WIP import autonumeric
- switch from accounting to accounting-js
- move numericInput to reaction-ui

* imports cleanup, move jquery-ui dep into reaction-ui

* add checkNpmVersions to reaction-ui

* cleanup reaction-logger + checkNpmVersions

* updated autoNumeric

* updated versions

* added toggle highlight for edit-mode button

* updated shrinkwrap

* updated shrinkwrap

* updated versions

* updated versions

* - fixed few typos; (#965)

* Product editing UIX fixes (#971)

* Fixed non reactivity of size selector.

Added client and server main modules to reaction-collections.
Using ES2015 style modules from reaction-collections and meteor.
Removed weight dependency.

* Updated PDP tag component

PDP tag component now uses the reaction-ui tag component.
Upgraded ui tags to support passing functions for certain props.
Bumped versions of reaction-ui and reaction-product-variant

* UX tweaks and cleanup

Tag / Details headers now hidden for customers if there is no data.
Cleaned up toast alerts.
Cleaned up UI issues with tags in product detail and in main navigation.
Added shell for reaction UI item.

* Fixing eslint issues

* updated eslint rules for no-extra-parens

* proposed fix to assignRoles.js (#980)

* proposed fix to assignRoles.js

* codeclimate fixes

* flat rate changes issue fix (#975)

* flat rate changes issue fix

* fix issue #966

* disable jshint

* issue #975

* .meteor/versions

* fix func param re-assign issue

* fix reassign func param issue

* fix gratuitous parentheses issue

* change indent

* change indent style

* fix some style issue

* recover .eslintrc

* use let instead of var

* change .meteor/versions back

* sidebar autohide issue fixed

* original file

* modified file

* fix some style issue

* fix style issue

* Updated checkout ru translation (#981)

* - added `failedToPlaceOrder` translation;
- fix some Russian `cartCompleted` phrases;

* - updated `cartSubTotals` ru translations;
- updated some of checkout ru translations;

* - fixed missing `let`; (#982)

* - added `cart/resetShipmentMethod` to completely revert (#983)

shipment. Before that shipment was reverted in a half. Previously
selected shipping method event after revert still were in cart object.

* Fixed issue with address book and added addesses (#984)

* Fixed issue with address book and added addesses

Addresses issue where address book would always show the add address
form, even though a previous address was already added and saved.

* Removed extra set template call

* Added accounts subscription to template address book

* Update for `orders` translation (#988)

* - refactored orders translation;

* - fixed `orderShipping.shipmentEmpty` link;

* - added `applyRefundToThisOrder` translation;

* - fixed typo;

* - updated ru translation for `order.capturedTotal` and `order.adjustedTotal`;

* - added `orderShipping.itemsHaveBeenShipped` translation;
- modified ru `orderShipping.shipmentPacked` translation;

* - updated ru translation for `orderShipping.tracking`.
Translation taken from https://gdeposylka.ru/;

* - fixed `autoNumeric` syntax; (#989)

- added `accounting` import;

* adds easy globals for overriding layouts (#985)

- DEFAULT_LAYOUT
- DEFAULT_WORKFLOW
- INDEX_OPTIONS

* - should be `amount`; (#991)

* - slightly refactored `orders/shipmentPacked`. Changed operation order place (#993)

and MAIN - now method returns result;

* - refactored `orders/shipmentShipped` method. Now it has (#994)

tow args to make it consistent with `fulfillment` object (not only order.shipping[0]).
It returns results for all internally called methods.
`workflow/pushOrderWorkflow` method called in sync way, because
we need result to be returned.

* - renamed results in `orders/shipmentShipped`; (#995)

* - added checks for `this.shipping[0].shipmentMethod` (#999)

is defined to `cartTransform`;

* reaction ui npm shrink-wrap updated

* updated versions to METEOR@1.3.2.4

* additional check for shipping (#1002)

-related to #999
- resolves #997

* - fixed test which was broken by #983 (#1000)

* Update notFound.js (#1004)

*onCreated* is a callback function. (Formerly, *created* was function property)

* - added missed arg check for `orders/shipmentShipped`; (#1005)

- permission check to all orders methods;

* Fix issue with default payment method not auto-expanding (#1015)

* Look for variable `packageName` rather than `name`

* Added comment about appDetails

* Shipping translation and shipping methods modification (#1013)

* - all shipping methods now throw error of called without permission;
- added translations for shipping;
- `updateShippingMethods` refactored. Now it is accept method._id
instead of method object;

* - updated two phrases;

* When the overridden layout is not found, fall back to the default (#1012)

* When the overridden layout is not found, fall back to the default

* Correct linting error

* - added translations for orderList.js; (#1009)

* Product grid 987 (#1001)

* Update product grid loading

Avoiding using find().fetch() to get products as it seems to cause slow
loading behavior. Reduced unnecessary duplicate fetches / template
redraws which should help with performance.

* Updated product grid

Moved subscription and fetch to parent component.
Added a loading spinner.
Product now tries to wait for all products to load before showing the
grid. This works 80% of the time.

* Remove remnant from older version.. (#1016)

* FIX #1017 and #548 (#1018)

* - added new `title` field to `CartItem` schema; (#986)

- updated `cart/addToCart` to be compatible with new field;
- updated styles for cartDrawer item;
- updated item title spans;

* add slug prefix and absolute routes (#1024)

* add slug prefix and absolute routes

- issue #1022
-allow “absolute” url definition, registry routes without “/“ will be
treated as absolute
- resolves #955 with added getSlug

* if only one shop, don't use prefixes

- add tmeasday:publish-counts Shops
- publish `shopsCount`
-  if only one shop exists, don’t use prefixes
- resolves #1022
- updated versions for collections, routing

* Renamed i18n key of Simplified Chinese from cn to zh. (#1025)

* Add space outside of translated string (#1027)

* Fixed broken dashboard labels (#1033)

Added i18n missing translations for packages.
Wrapped in a span to avoid blaze / jQuery update conflicts.

* Dashboard totals 992 (#1023)

* Update numeric input component

Convert numeric input to a React component. Rely on the shops currency
instead of the currency of the current locale.

* Updated instances of price formatting in dashboard

Dashboard orders now uses the numeric input for all instances where
price must be formatted. This applies to both editable and non editable
instances.

* adjust price format for 0 decimal currencies

* Modernize and resolve console erros.

Resolves a 'node cannot` be removed error in console.
Modernized code to be inline with current practices.

* Fixed references to order object

* combine duplicate items in order item list

* fixing eslint issues

* Updated refund field

Refund field now uses the new react NumericInput component.

* remove unnecessary Npm.depends from logging package

* update Node version in Docker build

* suppress reset cli output (#1039)

suppress “No such file or directory” when removing bower and
node_modules directories when using `reaction reset`

* Velocity ci patches (#1046)

* add bin/ci.sh

wraps velocity test and watch for tests passed output.  ci will timeout
if this doesn’t exit in 10 minutes.

* add npm.depends for bunyan testing

kludge fix, add npm.depends specifically for testing

* clean up extra param

remove extra VELOCITY_TEST_PACKAGES=1

* add export

the cleanup that became dirty.. add export

* bump react versions to 15.1 (#1047)

* update to react, react-dom 15.1.0

update app packages for
#1047

* rm imports/index.js

- unused placeholder, will probably re-appear but in actual use

* updated README.md

- release 0.13.0 updates

* 0.13.0 beta ui updates (#1051)

* updated dashboard registry cards

- shipping (fix settings)
- catalog (remove enable, move to util)

* add example payment labels

Resolve #1049
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants