vinsol / nectarcommerce Goto Github PK
View Code? Open in Web Editor NEWQuest for customizable E-commerce - the Elixir way
Quest for customizable E-commerce - the Elixir way
Hey maintainers,
I am searching for an Elixir framework to help me move a few shops from Ruby+Spree to Elixir+NectarFramework (or any other Elixir framework which qualifies, really).
One thing I couldn't help but notice in your demo is that your Zones are only Country-based. I believe you should add State (sub-zones) objects and then make them embeddable inside Countries and Zones alike. The Zones should then have a boolean switch -- probably called "based_on_countries" which, when off, means that the Zone can be comprised of States only, and when it's on, it would mean that the Zone can only be comprised of Countries.
I am not saying you should emulate Spree per se, by the way. I am just saying that this particular feature was pretty useful for me when I had to divide USA into several zones and have separate payment and shipping methods for these zones.
such as Product/setting/zone/...
if I was at the admin-home page, when I click the products menu
http://localhost:4000/admin
It just goto
http://localhost:4000/admin#
nothing happened.
BTW, thank you for providing the source code for learning. But, I found the demo site sometimes can not login. Maybe someone changes the password. Additionally, Docker image can not run after it syncs the newest version.
Is anyone working on this or using it still? Look's like you've been working on Spree instead.
are there other forks that have made more progress? looking to contribute.
Hey!
I was just wondering when you will be releasing the Worldly package on Hex? Even if its just v0.0.1
Cheers
Sam
Hello I am following the documentation but I am getting:
could not compile dependency :jose, "mix compile" failed. You can recompile this dependency with "mix deps.compile jose", update it with "mix deps.update jose" or clean it with "mix deps.clean jose"
** (Mix) Encountered compilation errors
Hi I'm from spree/solidus world.
And as an E-commerce, we need more power...
So, what about this project?
Will have a support team or something?
I think you should also include GuardianDB to prevent playback of login tokens.
The error messages is as following.
look like MapSet has duplicate keys.
Parameters: %{}
15:36:14.367 [info] Replied cart:1 :ok
15:36:17.178 request_id=prhal3stab9270g36cpl80v9ibjl97o4 [info] POST /checkout/next
15:36:17.187 request_id=prhal3stab9270g36cpl80v9ibjl97o4 [info] Sent 500 in 0็นs
15:36:17.188 [error] #PID<0.636.0> running Nectar.Endpoint terminated
Server: localhost:443 (https)
Request: POST /checkout/next
** (exit) an exception was raised:
** (ArgumentError) error when merging the following Ecto.Multi structs:
%Ecto.Multi{names: #MapSet<[:variant_acquire_stock]>, operations: [variant_acquire_stock: {:changeset, #Ecto.Changeset<action: :update, changes: %{bought_quantity: 1, buy_count: 1}, errors: [], data: #Nectar.Variant<>, valid?: true>, []}]}
%Ecto.Multi{names: #MapSet<[:variant_acquire_stock]>, operations: [variant_acquire_stock: {:changeset, #Ecto.Changeset<action: :update, changes: %{bought_quantity: 1, buy_count: 1}, errors: [], data: #Nectar.Variant<>, valid?: true>, []}]}
both declared operations: [:variant_acquire_stock]
(ecto) lib/ecto/multi.ex:171: Ecto.Multi.do_merge/3
(elixir) lib/enum.ex:1755: Enum."-reduce/3-lists^foldl/2-0-"/3
(nectar) web/workflows/checkout/payment.ex:39: Nectar.Workflow.Checkout.Payment.post_transition/3
(ecto) lib/ecto/multi.ex:386: Ecto.Multi.apply_operation/5
(elixir) lib/enum.ex:1755: Enum."-reduce/3-lists^foldl/2-0-"/3
(ecto) lib/ecto/multi.ex:376: anonymous fn/5 in Ecto.Multi.apply_operations/5
(ecto) lib/ecto/adapters/sql.ex:508: anonymous fn/3 in Ecto.Adapters.SQL.do_transaction/3
(db_connection) lib/db_connection.ex:1275: DBConnection.transaction_run/4
i have referenced this tutorial for heroku deployment Deploying Elixir with Heroku
but it gave me this error.any idea how to fix this?
remote: -----> Creating .profile.d with env vars
remote: -----> Writing export for multi-buildpack support
remote: -----> Phoenix app detected
remote:
remote: -----> Loading configuration and environment
remote: Loading config...
remote: Detecting assets directory
remote: WARNING: no package.json detected in root nor custom directory
remote: * assuming phoenix 1.3.x and later, please check config file
remote: Will use phoenix configuration:
remote: * assets path assets
remote: * mix tasks namespace phx
remote: Will use the following versions:
remote: * Node 5.3.0
remote: Will export the following config vars:
remote: APP_URL
remote: DATABASE_URL
remote: POOL_SIZE
remote: SECRET_KEY_BASE
remote: * MIX_ENV=prod
remote:
remote: -----> Installing binaries
remote: Downloading node 5.3.0...
remote: Installing Node 5.3.0...
remote: Using default npm version
remote:
remote: -----> Building dependencies
remote: Installing and caching node modules
remote: /app/tmp/buildpacks/abc8fb9e8be131ec2574c4ba9e31b81540d97b3bbce47d96e05959c4f81404ac71605dd35ebbcf7a1abe958c346d8ee266ff035de9254424eb54e8b9480059be/lib/build.sh: line 105: cd: /tmp/build_f26475149c0a158cb477053757c3ab1b/./assets: No such file or directory
remote: ! Push rejected, failed to compile Phoenix app.
remote:
remote: ! Push failed
remote: Verifying deploy...
Seed Database
mix run apps/nectar/priv/repo/seeds.exs
When I run above command. There are errors happened as following:
....
INSERT INTO "products" ("available_on","description","name","slug","inserted_at"
,"updated_at") VALUES ($1,$2,$3,$4,$5,$6) RETURNING "id" [{2017, 2, 9}, "Sample
Product for testing with 3 variants(One Master + 3 Other)", "Sample Product 2",
"sample-product-2", {{2017, 2, 9}, {1, 15, 30, 0}}, {{2017, 2, 9}, {1, 15, 30, 0
}}]
[debug] QUERY OK db=16.0ms
INSERT INTO "product_option_types" ("option_type_id","product_id","inserted_at",
"updated_at") VALUES ($1,$2,$3,$4) RETURNING "id" [1, 1, {{2017, 2, 9}, {1, 15,
30, 0}}, {{2017, 2, 9}, {1, 15, 30, 0}}]
[debug] QUERY OK db=0.0ms
INSERT INTO "variants" ("bought_quantity","cost_price","is_master","product_id",
"total_quantity","inserted_at","updated_at") VALUES ($1,$2,$3,$4,$5,$6,$7) RETUR
NING "id" [0, #Decimal<10.0>, true, 1, 10, {{2017, 2, 9}, {1, 15, 31, 0}}, {{201
7, 2, 9}, {1, 15, 31, 0}}]
[debug] QUERY OK db=0.0ms
commit []
** (KeyError) key :available_on not found in: %{cost_price: 20.0, discontinue_on
: #Ecto.Date<2017-03-01>, sku: "Variant 1", variant_option_values: [%{option_typ
e_id: 1, option_value_id: 1}]}
(nectar) web/models/variant.ex:178: Nectar.Variant.validate_discontinue_gt_a
vailable_on/2
(nectar) web/models/variant.ex:92: Nectar.Variant.create_variant_changeset/3
(nectar) lib/seed/load_products.ex:58: Seed.LoadProducts.seed_products_with_
variant/0
(elixir) lib/code.ex:370: Code.require_file/2
(mix) lib/mix/tasks/run.ex:82: Mix.Tasks.Run.run/1
(mix) lib/mix/task.ex:294: Mix.Task.run_task/3
(mix) lib/mix/cli.ex:58: Mix.CLI.run_task/2
(elixir) lib/code.ex:370: Code.require_file/2
It seems that the settings saved in admin/settings/general
are not actually used anywhere.
Right now in extension approach 1 and 2 we can only add to existing schema via
add_to_schema do
# schema declarations to add go here
end
and then we use it like this in models.
schema "source" do
original fields & relations
extensions
end
While this is simple, it does not allow us to remove/modify existing relations.
What we can try and do is use something like this in models:
extended_schema "source" do
original fields & relations
end
and then provide two methods:
add_to_schema do
end
remove_from_schema do
end
using this we can rewrite the schema call.
see initial implementation here and diff
This could allow us to add/remove fields to schema, however we want to be sure before implementing this whether we want to include this feature as it may cause things to break if used with abandon, i.e. compile time pattern matching fails or essential fields used throughout the system being removed.
As of Saturday 22 September 2018
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.