vinsol-spree-contrib / spree-admin-insights

This extension provides extensive and targeted reports for the Admin. Which products were viewed the most yesterday, which brand is most popular in a particular geography, which user is a consistent buyer and much more, all the reports a website owner could probably need are a click away!
http://vinsol.com/spreecommerce-admin-insights
BSD 3-Clause "New" or "Revised" License
20 stars 63 forks source link

PostgreSQL Support? #21

Open ronzalo opened 7 years ago

ronzalo commented 7 years ago

Installed in a store with spree 3-0 and postgresql throw this error PG::UndefinedFunction: ERROR: function monthname(timestamp without time zone) does not exist LINE 1: ...d_name", "payments"."amount" AS "payment_amount", MONTHNAME(... ^ HINT: No function matches the given name and argument types. You might need to add explicit type casts.

virajrch commented 7 years ago

Hi @ronzalo Did you get any solution for the Postgres support?

palpandiR commented 7 years ago

I am also having the similar issue here ...

PG::UndefinedFunction: ERROR: function year(timestamp without time zone) does not exist LINE 1: ...AS "new_sign_ups" FROM (SELECT "id" AS "user_id", YEAR("user... ^ HINT: No function matches the given name and argument types. You might need to add explicit type casts.

dsawa commented 7 years ago

@ronzalo @virajrch @railsfactory-palpandi I made a fork with PR for 3-1-stable that adds support for Postgresql.

https://github.com/vinsol-spree-contrib/spree-admin-insights/pull/32

phutai commented 7 years ago

@dsawa Thanks! They didn't merge yet...How can I get this update?

ezekg commented 7 years ago

@phutai you should be able to do something like this in your Gemfile,

gem 'spree_admin_insights', git: 'https://github.com/dsawa/spree-admin-insights', ref: 'c75c0dd916eb76c683fbc524130fa4f5152ba9dc'

The ref hash at the end locks to a specific commit so that you don't run into issues when running bundle update since it would always pull from master without it.

phutai commented 7 years ago

@ezekg It works, thank you very much!

bansalakhil commented 7 years ago

We have a major rewrite of the extension. Along with PostgreSQL support it also display hourly, daily, monthly reports (based on time interval selected). You can give it a try.