Question

I have developed custom theme on the top of local installation of https://github.com/magento/magento2 version and it works fine. I installed magento production version (2.0.2) https://www.magentocommerce.com/download on my server and installed my theme. But the issue is minicart is not collapsing in browser console there is an error which responsible for this

Uncaught ReferenceError: Unable to process binding "css: function (){return { empty:!!getCartParam('summary_count') == false} }"
Message: getCartParam is not defined

due to this error other knockoutjs scripts also not working which are below to above line . could you please help me to resolve this

Was it helpful?

Solution

I found the issue , git version of magento has a different knockoutjs scripts than production version.In git version it use getCartParam() function to retrieve/bind data but in magento 2.0.2 production version is using cart() function instead of getCartParam so I just copied minicart files from production version core and edited it . So it worked. I'm posting this if this is help to some one else

OTHER TIPS

Try this:

  • Remove pub/static/frontend/{theme_vendor} folder
  • Remove var/cache and var/view_preprocessed folders

Go to root (by SSH) and execute:

  • php bin/magento deploy:mode:set production
  • php bin/magento setup:static-content:deploy

This should be enough if not, you should take a look at your theme code.

Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top