nystudio107 / instantanalytics

DEPRECATED Instant Analytics brings full Google Analytics support to your Twig templates and automatic Craft Commerce integration with Google Enhanced Ecommerce.
Other
101 stars 4 forks source link

Error on product detail view #15

Closed klick closed 6 years ago

klick commented 7 years ago

Hi.

With the latest update my product detail view is breaking with an error:

Craft\Commerce_VariantModel and its behaviors do not have a method or closure named "getType".

I’m trying to add a view like so:

{% do instantAnalytics.addCommerceProductDetailView(variantActive) %}

where variantActive is an object.

But also this does not work:

{% do instantAnalytics.addCommerceProductDetailView(product.defaultVariant.id) %}

What changed? What exactly is supposed to be passed on here?

Best, M

khalwat commented 6 years ago

Hmmm, I will have a look at the diff

klick commented 6 years ago

Thank you.

khalwat commented 6 years ago

Looks like a regression when I fixed things for Digital Product support. Try the build in the develop branch:

https://github.com/nystudio107/instantanalytics/tree/develop

...and let me know how that goes?

khalwat commented 6 years ago

@klick @Tam lmk if you have issues with the develop build in your environment.

klick commented 6 years ago

That seems to work better.

Tam commented 6 years ago

@khalwat No issues, that's working fine for me

khalwat commented 6 years ago

Great, thanks, I will release today.