lunarphp / lunar Goto Github PK
View Code? Open in Web Editor NEWAn open-source package that brings the power of modern headless e-commerce functionality to Laravel.
Home Page: https://lunarphp.io
License: MIT License
An open-source package that brings the power of modern headless e-commerce functionality to Laravel.
Home Page: https://lunarphp.io
License: MIT License
Illuminate\Database\QueryException
SQLSTATE[42703]: Undefined column: 7 ERROR: column "count" does not exist LINE 1: ...null group by "store_order_addresses"."id" having "count" <=... ^ (SQL: select count(*) as aggregate from (select COUNT(*) count, "store_order_addresses"."contact_email" from "store_order_addresses" left join store_order_addresses address_join on "address_join"."contact_email" = "store_order_addresses"."contact_email" where "store_order_addresses"."type" = billing and "store_order_addresses"."created_at" between 2021-12-20 00:00:00 and 2021-12-26 00:00:00 and "store_order_addresses"."contact_email" is not null group by "store_order_addresses"."id" having "count" <= 1) as "temp_table")
This issue only occurs when using PostgreSQL. The error from #9 is given when using MariaDB.
Suppose we create an attribute with two or more words for a name, i.e "product warranty" or "short description", then the handle generated will be "product-warranty" or "short-description" respectively.
When a product is created that has the attribute above, when retrieving the product and using javascript to render the product attributes, then if the attribute is parsed directly using javascript, then the key for product warranty will be product-warranty which will throw an error.
Change the delimiter from '-' to '_'
In candy docs you have this field types:
GetCandy\FieldTypes\Color
GetCandy\FieldTypes\Datetime
GetCandy\FieldTypes\File
GetCandy\FieldTypes\JSON
GetCandy\FieldTypes\Measurement
GetCandy\FieldTypes\Reference
GetCandy\FieldTypes\Select
GetCandy\FieldTypes\Toggle
GetCandy\FieldTypes\URL
I tried create cake store with you package.
Problem 1
Cake's has multiple decorations with separate multiple images and custom price for gm or kg
Problem 2
Each cake has own multiple fillings with images and custom price for gm or kg. This fillings can be multiselect. User can order cake with custom fillings. Also, they can be interconnected with each other so that the client cannot order the filling of the cake without other related fillings that the chosen filling needs.
How I can solve this problem with getcandy
?
Database path: "./meilifiles"
Server listening on: "http://127.0.0.1:7700"
Environment: "development"
Commit SHA: "c221277fd2125e29a13ef984278f8381849ec0c9"
Commit date: "2021-12-22T15:28:33+00:00"
Package version: "0.25.0"
"name": "getcandy/getcandy",
"version": "2.0-beta4",
Creating index for GetCandy\Models\ProductOption
ErrorException
Undefined array key "primaryKey"
at caddy\app\vendor\meilisearch\meilisearch-php\src\Endpoints\Indexes.php:59
55▕ {
56▕ return new self(
57▕ $this->http,
58▕ $attributes['uid'],
➜ 59▕ $attributes['primaryKey'],
60▕ $attributes['createdAt'],
61▕ $attributes['updatedAt'],
62▕ );
63▕ }
1 caddy\app\vendor\meilisearch\meilisearch-php\src\Endpoints\Indexes.php:59
Illuminate\Foundation\Bootstrap\HandleExceptions::handleError("Undefined array key "primaryKey"", "app\vendor\meilisearch\meilisearch-php\src\Endpoints\Indexes.php")
2 caddy\app\vendor\meilisearch\meilisearch-php\src\Endpoints\Indexes.php:89
MeiliSearch\Endpoints\Indexes::newInstance(["product_options_en", "enqueued", "indexCreation", "2021-12-30T08:33:45.056661800Z"])
When going to the customer tab i get an error on a wrong collumn name (wich makes sence as they are called first name and last name (not name)
System
Steps to reproduce
[2022-01-09 09:12:45] local.ERROR: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'getcandy_customers.name' in 'where clause' (SQL: select count(*) as aggregate from `getcandy_customers` where (`getcandy_customers`.`id` LIKE %% OR `getcandy_customers`.`name` LIKE %% OR `getcandy_customers`.`company_name` LIKE %% OR `getcandy_customers`.`vat_no` LIKE %% OR `getcandy_customers`.`account_no` LIKE %%)) (View: /Users/brianverschoore/Sites/getCandy/vendor/getcandy/admin/resources/views/livewire/components/customers/index.blade.php) {"view":{"view":"/Users/brianverschoore/Sites/getCandy/vendor/laravel/framework/src/Illuminate/Database/Connection.php","data":[]},"userId":1,"exception":"[object] (Facade\\Ignition\\Exceptions\\ViewException(code: 0): SQLSTATE[42S22]: Column not found: 1054 Unknown column 'getcandy_customers.name' in 'where clause' (SQL: select count(*) as aggregate from `getcandy_customers` where (`getcandy_customers`.`id` LIKE %% OR `getcandy_customers`.`name` LIKE %% OR `getcandy_customers`.`company_name` LIKE %% OR `getcandy_customers`.`vat_no` LIKE %% OR `getcandy_customers`.`account_no` LIKE %%)) (View: /Users/brianverschoore/Sites/getCandy/vendor/getcandy/admin/resources/views/livewire/components/customers/index.blade.php) at /Users/brianverschoore/Sites/getCandy/vendor/laravel/framework/src/Illuminate/Database/Connection.php:705)
[stacktrace]
#0 /Users/brianverschoore/Sites/getCandy/vendor/laravel/framework/src/Illuminate/Database/Connection.php(665): Illuminate\\Database\\Connection->runQueryCallback('select count(*)...', Array, Object(Closure))
#1 /Users/brianverschoore/Sites/getCandy/vendor/laravel/framework/src/Illuminate/Database/Connection.php(369): Illuminate\\Database\\Connection->run('select count(*)...', Array, Object(Closure))
#2 /Users/brianverschoore/Sites/getCandy/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php(2352): Illuminate\\Database\\Connection->select('select count(*)...', Array, true)
#3 /Users/brianverschoore/Sites/getCandy/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php(2340): Illuminate\\Database\\Query\\Builder->runSelect()
#4 /Users/brianverschoore/Sites/getCandy/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php(2874): Illuminate\\Database\\Query\\Builder->Illuminate\\Database\\Query\\{closure}()
#5 /Users/brianverschoore/Sites/getCandy/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php(2341): Illuminate\\Database\\Query\\Builder->onceWithColumns(Array, Object(Closure))
#6 /Users/brianverschoore/Sites/getCandy/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php(2801): Illuminate\\Database\\Query\\Builder->get(Array)
#7 /Users/brianverschoore/Sites/getCandy/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php(2729): Illuminate\\Database\\Query\\Builder->aggregate('count', Array)
#8 /Users/brianverschoore/Sites/getCandy/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php(1655): Illuminate\\Database\\Query\\Builder->count()
#9 /Users/brianverschoore/Sites/getCandy/vendor/yab/laravel-scout-mysql-driver/src/Engines/MySQLEngine.php(80): Illuminate\\Database\\Eloquent\\Builder->__call('count', Array)
#10 /Users/brianverschoore/Sites/getCandy/vendor/yab/laravel-scout-mysql-driver/src/Engines/MySQLEngine.php(115): Yab\\MySQLScout\\Engines\\MySQLEngine->search(Object(Laravel\\Scout\\Builder))
#11 /Users/brianverschoore/Sites/getCandy/vendor/laravel/scout/src/Builder.php(373): Yab\\MySQLScout\\Engines\\MySQLEngine->paginate(Object(Laravel\\Scout\\Builder), 50, 1)
#12 /Users/brianverschoore/Sites/getCandy/vendor/getcandy/admin/src/Http/Livewire/Components/Customers/CustomersIndex.php(39): Laravel\\Scout\\Builder->paginate(50)
#13 /Users/brianverschoore/Sites/getCandy/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(36): GetCandy\\Hub\\Http\\Livewire\\Components\\Customers\\CustomersIndex->getCustomersProperty()
#14 /Users/brianverschoore/Sites/getCandy/vendor/laravel/framework/src/Illuminate/Container/Util.php(40): Illuminate\\Container\\BoundMethod::Illuminate\\Container\\{closure}()
#15 /Users/brianverschoore/Sites/getCandy/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(93): Illuminate\\Container\\Util::unwrapIfClosure(Object(Closure))
#16 /Users/brianverschoore/Sites/getCandy/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(37): Illuminate\\Container\\BoundMethod::callBoundMethod(Object(Illuminate\\Foundation\\Application), Array, Object(Closure))
#17 /Users/brianverschoore/Sites/getCandy/vendor/laravel/framework/src/Illuminate/Container/Container.php(653): Illuminate\\Container\\BoundMethod::call(Object(Illuminate\\Foundation\\Application), Array, Array, NULL)
#18 /Users/brianverschoore/Sites/getCandy/vendor/livewire/livewire/src/Component.php(285): Illuminate\\Container\\Container->call(Array)
#19 /Users/brianverschoore/Sites/getCandy/vendor/getcandy/admin/src/../resources/views/livewire/components/customers/index.blade.php(113): Livewire\\Component->__get('customers')
#20 /Users/brianverschoore/Sites/getCandy/vendor/livewire/livewire/src/ComponentConcerns/RendersLivewireComponents.php(49): include('/Users/brianver...')
#21 /Users/brianverschoore/Sites/getCandy/vendor/livewire/livewire/src/ComponentConcerns/RendersLivewireComponents.php(50): GetCandy\\Hub\\Http\\Livewire\\Components\\Customers\\CustomersIndex->Livewire\\ComponentConcerns\\{closure}()
#22 /Users/brianverschoore/Sites/getCandy/vendor/laravel/framework/src/Illuminate/View/Engines/CompilerEngine.php(61): Livewire\\CompilerEngineForIgnition->evaluatePath('/Users/brianver...', Array)
#23 /Users/brianverschoore/Sites/getCandy/vendor/facade/ignition/src/Views/Engines/CompilerEngine.php(37): Illuminate\\View\\Engines\\CompilerEngine->get('/Users/brianver...', Array)
#24 /Users/brianverschoore/Sites/getCandy/vendor/laravel/framework/src/Illuminate/View/View.php(139): Facade\\Ignition\\Views\\Engines\\CompilerEngine->get('/Users/brianver...', Array)
#25 /Users/brianverschoore/Sites/getCandy/vendor/laravel/framework/src/Illuminate/View/View.php(122): Illuminate\\View\\View->getContents()
#26 /Users/brianverschoore/Sites/getCandy/vendor/laravel/framework/src/Illuminate/View/View.php(91): Illuminate\\View\\View->renderContents()
#27 /Users/brianverschoore/Sites/getCandy/vendor/livewire/livewire/src/Component.php(233): Illuminate\\View\\View->render()
#28 /Users/brianverschoore/Sites/getCandy/vendor/livewire/livewire/src/HydrationMiddleware/RenderView.php(14): Livewire\\Component->output()
#29 /Users/brianverschoore/Sites/getCandy/vendor/livewire/livewire/src/LifecycleManager.php(141): Livewire\\HydrationMiddleware\\RenderView::dehydrate(Object(GetCandy\\Hub\\Http\\Livewire\\Components\\Customers\\CustomersIndex), Object(Livewire\\Response))
#30 /Users/brianverschoore/Sites/getCandy/vendor/livewire/livewire/src/LivewireManager.php(106): Livewire\\LifecycleManager->initialDehydrate()
#31 /Users/brianverschoore/Sites/getCandy/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(261): Livewire\\LivewireManager->mount('hub.components....')
#32 /Users/brianverschoore/Sites/getCandy/vendor/getcandy/admin/src/../resources/views/livewire/pages/customers/index.blade.php(11): Illuminate\\Support\\Facades\\Facade::__callStatic('mount', Array)
#33 /Users/brianverschoore/Sites/getCandy/vendor/livewire/livewire/src/ComponentConcerns/RendersLivewireComponents.php(49): include('/Users/brianver...')
#34 /Users/brianverschoore/Sites/getCandy/vendor/livewire/livewire/src/ComponentConcerns/RendersLivewireComponents.php(50): GetCandy\\Hub\\Http\\Livewire\\Pages\\Customers\\CustomersIndex->Livewire\\ComponentConcerns\\{closure}()
#35 /Users/brianverschoore/Sites/getCandy/vendor/laravel/framework/src/Illuminate/View/Engines/CompilerEngine.php(61): Livewire\\CompilerEngineForIgnition->evaluatePath('/Users/brianver...', Array)
#36 /Users/brianverschoore/Sites/getCandy/vendor/facade/ignition/src/Views/Engines/CompilerEngine.php(37): Illuminate\\View\\Engines\\CompilerEngine->get('/Users/brianver...', Array)
#37 /Users/brianverschoore/Sites/getCandy/vendor/laravel/framework/src/Illuminate/View/View.php(139): Facade\\Ignition\\Views\\Engines\\CompilerEngine->get('/Users/brianver...', Array)
#38 /Users/brianverschoore/Sites/getCandy/vendor/laravel/framework/src/Illuminate/View/View.php(122): Illuminate\\View\\View->getContents()
#39 /Users/brianverschoore/Sites/getCandy/vendor/laravel/framework/src/Illuminate/View/View.php(91): Illuminate\\View\\View->renderContents()
#40 /Users/brianverschoore/Sites/getCandy/vendor/livewire/livewire/src/Component.php(233): Illuminate\\View\\View->render()
#41 /Users/brianverschoore/Sites/getCandy/vendor/livewire/livewire/src/HydrationMiddleware/RenderView.php(14): Livewire\\Component->output()
#42 /Users/brianverschoore/Sites/getCandy/vendor/livewire/livewire/src/LifecycleManager.php(141): Livewire\\HydrationMiddleware\\RenderView::dehydrate(Object(GetCandy\\Hub\\Http\\Livewire\\Pages\\Customers\\CustomersIndex), Object(Livewire\\Response))
#43 /Users/brianverschoore/Sites/getCandy/vendor/livewire/livewire/src/Macros/livewire-view-component.blade.php(3): Livewire\\LifecycleManager->initialDehydrate()
#44 /Users/brianverschoore/Sites/getCandy/vendor/laravel/framework/src/Illuminate/Filesystem/Filesystem.php(107): require('/Users/brianver...')
#45 /Users/brianverschoore/Sites/getCandy/vendor/laravel/framework/src/Illuminate/Filesystem/Filesystem.php(108): Illuminate\\Filesystem\\Filesystem::Illuminate\\Filesystem\\{closure}()
#46 /Users/brianverschoore/Sites/getCandy/vendor/laravel/framework/src/Illuminate/View/Engines/PhpEngine.php(58): Illuminate\\Filesystem\\Filesystem->getRequire('/Users/brianver...', Array)
#47 /Users/brianverschoore/Sites/getCandy/vendor/livewire/livewire/src/ComponentConcerns/RendersLivewireComponents.php(35): Illuminate\\View\\Engines\\PhpEngine->evaluatePath('/Users/brianver...', Array)
#48 /Users/brianverschoore/Sites/getCandy/vendor/laravel/framework/src/Illuminate/View/Engines/CompilerEngine.php(61): Livewire\\CompilerEngineForIgnition->evaluatePath('/Users/brianver...', Array)
#49 /Users/brianverschoore/Sites/getCandy/vendor/facade/ignition/src/Views/Engines/CompilerEngine.php(37): Illuminate\\View\\Engines\\CompilerEngine->get('/Users/brianver...', Array)
#50 /Users/brianverschoore/Sites/getCandy/vendor/laravel/framework/src/Illuminate/View/View.php(139): Facade\\Ignition\\Views\\Engines\\CompilerEngine->get('/Users/brianver...', Array)
#51 /Users/brianverschoore/Sites/getCandy/vendor/laravel/framework/src/Illuminate/View/View.php(122): Illuminate\\View\\View->getContents()
#52 /Users/brianverschoore/Sites/getCandy/vendor/laravel/framework/src/Illuminate/View/View.php(91): Illuminate\\View\\View->renderContents()
#53 /Users/brianverschoore/Sites/getCandy/vendor/laravel/framework/src/Illuminate/Http/Response.php(69): Illuminate\\View\\View->render()
#54 /Users/brianverschoore/Sites/getCandy/vendor/laravel/framework/src/Illuminate/Http/Response.php(35): Illuminate\\Http\\Response->setContent(Object(Illuminate\\View\\View))
#55 /Users/brianverschoore/Sites/getCandy/vendor/laravel/framework/src/Illuminate/Routing/Router.php(794): Illuminate\\Http\\Response->__construct(Object(Illuminate\\View\\View), 200, Array)
#56 /Users/brianverschoore/Sites/getCandy/vendor/laravel/framework/src/Illuminate/Routing/Router.php(763): Illuminate\\Routing\\Router::toResponse(Object(Illuminate\\Http\\Request), Object(Illuminate\\View\\View))
#57 /Users/brianverschoore/Sites/getCandy/vendor/laravel/framework/src/Illuminate/Routing/Router.php(695): Illuminate\\Routing\\Router->prepareResponse(Object(Illuminate\\Http\\Request), Object(Illuminate\\View\\View))
#58 /Users/brianverschoore/Sites/getCandy/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(128): Illuminate\\Routing\\Router->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))
#59 /Users/brianverschoore/Sites/getCandy/vendor/laravel/framework/src/Illuminate/Auth/Middleware/Authorize.php(45): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#60 /Users/brianverschoore/Sites/getCandy/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\\Auth\\Middleware\\Authorize->handle(Object(Illuminate\\Http\\Request), Object(Closure), 'catalogue:manag...')
#61 /Users/brianverschoore/Sites/getCandy/vendor/laravel/framework/src/Illuminate/Routing/Middleware/SubstituteBindings.php(50): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#62 /Users/brianverschoore/Sites/getCandy/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\\Routing\\Middleware\\SubstituteBindings->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#63 /Users/brianverschoore/Sites/getCandy/vendor/laravel/framework/src/Illuminate/Auth/Middleware/Authenticate.php(44): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#64 /Users/brianverschoore/Sites/getCandy/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\\Auth\\Middleware\\Authenticate->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#65 /Users/brianverschoore/Sites/getCandy/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/VerifyCsrfToken.php(78): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#66 /Users/brianverschoore/Sites/getCandy/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\\Foundation\\Http\\Middleware\\VerifyCsrfToken->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#67 /Users/brianverschoore/Sites/getCandy/vendor/laravel/framework/src/Illuminate/View/Middleware/ShareErrorsFromSession.php(49): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#68 /Users/brianverschoore/Sites/getCandy/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\\View\\Middleware\\ShareErrorsFromSession->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#69 /Users/brianverschoore/Sites/getCandy/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php(121): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#70 /Users/brianverschoore/Sites/getCandy/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php(64): Illuminate\\Session\\Middleware\\StartSession->handleStatefulRequest(Object(Illuminate\\Http\\Request), Object(Illuminate\\Session\\Store), Object(Closure))
#71 /Users/brianverschoore/Sites/getCandy/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\\Session\\Middleware\\StartSession->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#72 /Users/brianverschoore/Sites/getCandy/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/AddQueuedCookiesToResponse.php(37): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#73 /Users/brianverschoore/Sites/getCandy/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\\Cookie\\Middleware\\AddQueuedCookiesToResponse->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#74 /Users/brianverschoore/Sites/getCandy/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/EncryptCookies.php(67): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#75 /Users/brianverschoore/Sites/getCandy/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\\Cookie\\Middleware\\EncryptCookies->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#76 /Users/brianverschoore/Sites/getCandy/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(103): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#77 /Users/brianverschoore/Sites/getCandy/vendor/laravel/framework/src/Illuminate/Routing/Router.php(697): Illuminate\\Pipeline\\Pipeline->then(Object(Closure))
#78 /Users/brianverschoore/Sites/getCandy/vendor/laravel/framework/src/Illuminate/Routing/Router.php(672): Illuminate\\Routing\\Router->runRouteWithinStack(Object(Illuminate\\Routing\\Route), Object(Illuminate\\Http\\Request))
#79 /Users/brianverschoore/Sites/getCandy/vendor/laravel/framework/src/Illuminate/Routing/Router.php(636): Illuminate\\Routing\\Router->runRoute(Object(Illuminate\\Http\\Request), Object(Illuminate\\Routing\\Route))
#80 /Users/brianverschoore/Sites/getCandy/vendor/laravel/framework/src/Illuminate/Routing/Router.php(625): Illuminate\\Routing\\Router->dispatchToRoute(Object(Illuminate\\Http\\Request))
#81 /Users/brianverschoore/Sites/getCandy/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(167): Illuminate\\Routing\\Router->dispatch(Object(Illuminate\\Http\\Request))
#82 /Users/brianverschoore/Sites/getCandy/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(128): Illuminate\\Foundation\\Http\\Kernel->Illuminate\\Foundation\\Http\\{closure}(Object(Illuminate\\Http\\Request))
#83 /Users/brianverschoore/Sites/getCandy/vendor/livewire/livewire/src/DisableBrowserCache.php(19): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#84 /Users/brianverschoore/Sites/getCandy/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Livewire\\DisableBrowserCache->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#85 /Users/brianverschoore/Sites/getCandy/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php(21): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#86 /Users/brianverschoore/Sites/getCandy/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ConvertEmptyStringsToNull.php(31): Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#87 /Users/brianverschoore/Sites/getCandy/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\\Foundation\\Http\\Middleware\\ConvertEmptyStringsToNull->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#88 /Users/brianverschoore/Sites/getCandy/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php(21): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#89 /Users/brianverschoore/Sites/getCandy/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TrimStrings.php(40): Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#90 /Users/brianverschoore/Sites/getCandy/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\\Foundation\\Http\\Middleware\\TrimStrings->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#91 /Users/brianverschoore/Sites/getCandy/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ValidatePostSize.php(27): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#92 /Users/brianverschoore/Sites/getCandy/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\\Foundation\\Http\\Middleware\\ValidatePostSize->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#93 /Users/brianverschoore/Sites/getCandy/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/PreventRequestsDuringMaintenance.php(86): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#94 /Users/brianverschoore/Sites/getCandy/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\\Foundation\\Http\\Middleware\\PreventRequestsDuringMaintenance->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#95 /Users/brianverschoore/Sites/getCandy/vendor/fruitcake/laravel-cors/src/HandleCors.php(38): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#96 /Users/brianverschoore/Sites/getCandy/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Fruitcake\\Cors\\HandleCors->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#97 /Users/brianverschoore/Sites/getCandy/vendor/laravel/framework/src/Illuminate/Http/Middleware/TrustProxies.php(39): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#98 /Users/brianverschoore/Sites/getCandy/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\\Http\\Middleware\\TrustProxies->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#99 /Users/brianverschoore/Sites/getCandy/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(103): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#100 /Users/brianverschoore/Sites/getCandy/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(142): Illuminate\\Pipeline\\Pipeline->then(Object(Closure))
#101 /Users/brianverschoore/Sites/getCandy/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(111): Illuminate\\Foundation\\Http\\Kernel->sendRequestThroughRouter(Object(Illuminate\\Http\\Request))
#102 /Users/brianverschoore/Sites/getCandy/public/index.php(52): Illuminate\\Foundation\\Http\\Kernel->handle(Object(Illuminate\\Http\\Request))
#103 /Users/brianverschoore/.composer/vendor/laravel/valet/server.php(234): require('/Users/brianver...')
#104 {main}
When outputting an Eloquent model as JSON, a model with attributes is unable to display the attribute data as the field types do not provide a __toString()
method.
Get this warning on install.
Package livewire-ui/modal is abandoned, you should avoid using it. Use wire-elements/modal instead
I'm not able to get products from the URL slug, I believe that this line
https://github.com/getcandy/core/blob/5f11411655869cc9fb5e78b9b42f755f4b814ae6/src/Models/Url.php#L45
would need to be element
instead of elements
// With public function elements()
$url->element // returns null
$url->elements // returns null
// With public function element()
$url->element // returns Product or Collection
We wish to add order notifications, specifically for emails. But of course, other channels might be required down the line, such as push notifications, SMS, etc.
This thread is to discuss the requirements.
Orders can have (custom) statuses applied to them, and we want to have email notification templates that you can choose from when updating an order's status. E.g. change the status to "Dispatched" and optionally send a suitable email notification to the customer.
Each status can have multiple templates associated, and templates can be associated with more than one order status.
It should be possible to add custom text to an email notification before sending it.
All notifications should be added to the Activity Log which acts as the history for the order. Ideally, we would somehow keep a copy of the email so it can be viewed at a later date.
Ideally, before sending the user should see a preview of what the email will look like.
It should be noted that I work in a Laravel Sail Env
on Windows 10
using Windows Subsystem Linux (WSL2)
.
Running the command sail composer update getcandy/admin
seems to only update getcandy/admin
and not its required dependency tree. This has happened to me twice now and after some discussion in discord it was agreed that an issue should be raised here. Ref: https://discord.com/channels/497326121441034240/497332761049300992/936245140874489976
Running sail composer update getcandy/admin --with-dependencies
is the work-around to this issue, however the issue needs resolved.
Still undetermined if this issue is directly related to GetCandy or not.
We wish to add order notifications, specifically for emails. But of course, other channels might be required down the line, such as push notifications, SMS, etc.
This thread is to discuss the requirements.
## Requirements
Orders can have (custom) statuses applied to them, and we want to have email notification templates that you can choose from when updating an order's status. E.g. change the status to "Dispatched" and optionally send a suitable email notification to the customer.
Each status can have multiple templates associated, and templates can be associated with more than one order status.
It should be possible to add custom text to an email notification before sending it.
All notifications should be added to the Activity Log which acts as the history for the order. Ideally, we would somehow keep a copy of the email so it can be viewed at a later date.
Hi, I love this project specially the v2. I am using the 2.0-beta6 version.
I have a problem though, I've made 2 products just to try things out and when I get all products to my frontend with the the call below:
Route::get('/products', function (Request $request) { return \GetCandy\Models\Product::where('status', 'published')->with('productType', 'variants', 'associations')->get(); });
The response is this one:
[
{
"id": 1,
"product_type_id": 1,
"status": "published",
"attribute_data": {
"name": {},
"description": {}
},
"brand": "The freaky store",
"created_at": "2021-12-25T16:07:28.000000Z",
"updated_at": "2022-01-10T17:28:10.000000Z",
"deleted_at": null,
"product_type": {
"id": 1,
"name": "Stock",
"created_at": "2021-12-25T16:00:59.000000Z",
"updated_at": "2021-12-25T16:00:59.000000Z"
},
"variants": [
{
"id": 1,
"product_id": 1,
"tax_class_id": 1,
"tax_ref": null,
"unit_quantity": 10,
"sku": "900800700",
"gtin": "900800700",
"mpn": "900800700",
"ean": "900800700",
"length_value": null,
"length_unit": null,
"width_value": null,
"width_unit": null,
"height_value": null,
"height_unit": null,
"weight_value": null,
"weight_unit": null,
"volume_value": null,
"volume_unit": null,
"shippable": 1,
"stock": 2,
"backorder": 0,
"purchasable": "in_stock",
"created_at": "2021-12-25T16:07:28.000000Z",
"updated_at": "2022-01-10T16:34:55.000000Z",
"deleted_at": null
}
],
"associations": []
},
{
"id": 2,
"product_type_id": 1,
"status": "published",
"attribute_data": {
"name": {},
"description": {}
},
"brand": "The freaky store",
"created_at": "2022-01-10T17:46:58.000000Z",
"updated_at": "2022-01-10T17:46:58.000000Z",
"deleted_at": null,
"product_type": {
"id": 1,
"name": "Stock",
"created_at": "2021-12-25T16:00:59.000000Z",
"updated_at": "2021-12-25T16:00:59.000000Z"
},
"variants": [
{
"id": 2,
"product_id": 2,
"tax_class_id": 1,
"tax_ref": null,
"unit_quantity": 1,
"sku": "34455668",
"gtin": "34455668",
"mpn": "34455668",
"ean": "34455668",
"length_value": null,
"length_unit": null,
"width_value": null,
"width_unit": null,
"height_value": null,
"height_unit": null,
"weight_value": null,
"weight_unit": null,
"volume_value": null,
"volume_unit": null,
"shippable": 1,
"stock": 3,
"backorder": 0,
"purchasable": "in_stock",
"created_at": "2022-01-10T17:46:58.000000Z",
"updated_at": "2022-01-10T17:46:58.000000Z",
"deleted_at": null
}
],
"associations": []
}
]
So in "attribute_data" there are no product names or description in any languages. I've set up two languages.
Please help me.
Thank you!
Laravel 9 is releasing very soon so we need to make sure GetCandy is up to date and can support both 8 and 9.
Admin Hub should not be aware of search engines, it just expects an interface to be implemented.
GetCandy will provide engines for Database, Meilisearch and Algolia.
The interface should allow for optional filters to be passed, to allow for customisations. But standard filters should be set in the interface.
Config sets the engine for each admin hub search requirement, as example below...
admin/search.php
'engines' => [
'products' => GetCandy\Algolia\ProductsEngine::class,
'orders' => GetCandy\Hub\Search\Database\OrdersEngine::class,
//.. etc
],
If a developer decides to use the database for Orders engine they probably don't want to be indexing order and customer information into the Algolia or Meilisearch engine. So we should make the indexing configurable.
Meilisearch and Algolia should be optional addons, e.g.
composer require getcandy/algolia
composer require getcandy/meilisearch
Database search engines are in the admin hub by default.
The Algolia package will likely want to take advantage of https://www.algolia.com/doc/framework-integration/laravel/getting-started/introduction-to-scout-extended/?client=php
Meilisearch has something similar planned, but it's not been implemented yet, see meilisearch/integration-guides#123
When documenting, Algolia and Meilisearch can have their own installation and configuration pages.
And for product retrieval documentation etc. we can have a single page showing examples for the QueryBuilder, Meilisearch and Algolia, using a tabbed system or similar.
How I can use getcandy if I use UUIDs or GUIDs in my User model?
My products SKU starts from 3361
in my store like this:
When I enter search query 3361
from SKU don't get all products.
To test you can see my demo store here:
E-mail: [email protected]
Password: 00000000
Scout driver: mysql
We're aware of a problem when trying to change between product types, causing an Alpinejs console error to occur.
This is being looked at as we try and upgrade to a later version of Alpine.
Output:
vagrant@homestead:~/projects/karve$ php artisan getcandy:meilisearch:setup
MeiliSearch\Exceptions\ApiException
Index `getcandy_orders` not found.
at vendor/meilisearch/meilisearch-php/src/Http/Client.php:211
207▕
208▕ if ($response->getStatusCode() >= 300) {
209▕ $body = $this->jsonDecode($response->getBody()->getContents()) ?? $response->getReasonPhrase();
210▕
➜ 211▕ throw new ApiException($response, $body);
212▕ }
213▕
214▕ return $this->jsonDecode($response->getBody()->getContents());
215▕ }
+21 vendor frames
22 artisan:37
Illuminate\Foundation\Console\Kernel::handle()
Meilisearch is running and configured correctly:
A Master Key has been set. Requests to MeiliSearch won't be authorized unless you provide an authentication key.
Documentation: https://docs.meilisearch.com
Source code: https://github.com/meilisearch/meilisearch
Contact: https://docs.meilisearch.com/resources/contact.html or [email protected]
[2021-12-23T16:38:30Z INFO actix_server::builder] Starting 1 workers
[2021-12-23T16:38:30Z INFO actix_server::builder] Starting "actix-web-service-127.0.0.1:7700" service on 127.0.0.1:7700
[2021-12-23T16:38:46Z INFO actix_web::middleware::logger] 127.0.0.1:60732 "GET /indexes HTTP/1.1" 200 2 "-" "GuzzleHttp/7" 0.000120
[2021-12-23T16:38:46Z INFO actix_web::middleware::logger] 127.0.0.1:60732 "GET /indexes/getcandy_orders HTTP/1.1" 404 159 "-" "GuzzleHttp/7" 0.000089
We have a tax_ref
column against variants, but currently it's not available in the hub so users won't know it exists or be able to change it. This should be added to the variant edit screen and also the product screen when only one variant exists.
When i try to login - i get error:
Symfony\Component\HttpKernel\Exception\MethodNotAllowedHttpException
The POST method is not supported for this route. Supported methods: GET, HEAD.
http://example.com/hub/login
There are no post routes for login
Illuminate\Database\QueryException
SQLSTATE[42000]: Syntax error or access violation: 1055 'karve.getcandy_order_addresses.contact_email' isn't in GROUP BY
(SQL: select COUNT(*) count, `getcandy_order_addresses`.`contact_email` from `getcandy_order_addresses` left join
getcandy_order_addresses address_join on `address_join`.`contact_email` = `getcandy_order_addresses`.`contact_email` where
`getcandy_order_addresses`.`type` = billing and `getcandy_order_addresses`.`created_at` between 2021-12-20 00:00:00 and
2021-12-26 00:00:00 and `getcandy_order_addresses`.`contact_email` is not null group by `getcandy_order_addresses`.`id`)
(View: /home/vagrant/projects/karve/vendor/getcandy/getcandy/resources/views/livewire/dashboard.blade.php)
Orders relate to Users currently. However, there is a slight concern that if a User was unassociated from a Customer, the Order would then not have a suitable relationship to the Customer record.
Do we want to consider storing both user_id
and customer_id
on Orders?
The same could be said about Carts. However, as they're dynamic in their nature, I see little concern with them not having a customer_id
.
This error was occurring when i change product-type in create product page:
Uncaught (in promise) TypeError: Cannot read properties of null (reading 'en')
at livewire.js:13
at Array.reduce ()
at Component.value (livewire.js:13)
at Component.value (livewire.js:13)
at livewire.js:13
at alpine.min.js:7
at Array.forEach ()
at alpine.min.js:7
at valueMutated (alpine.min.js:7)
at ae.set (alpine.min.js:7)
Hello. I wanted to share ideas. Could you also add such a feature in which the connection between products for the sale of products with additional dependent products will be implemented. For example, there is a cake and the cake may have different decorations. These decorations will be added as a complementary product to the main cake product.
You can also add it as addon to your repository.
If you have any questions about the idea, write I will be glad to answer. Thanks!
Getting this error after clicking on Products
via the Hub.
MeiliSearch\Exceptions\ApiException
Index `products_en` not found. (View: /home/vagrant/projects/karve/vendor/getcandy/getcandy/resources/views/livewire/pages/products/index.blade.php)
For some reason, we have a Basket.php
model hanging about. This is completely redundant.
Hi,
I have been added getCandy to my Laravel Project. I can add products. When I fetch the products from my frond end HomeController its not working.
I have set en is the default language and both admin and code.
public function home(){ $products = Product::get(); return view('welcome',compact('products')); }
welcome.blade.php
{!! $item->attribute_data['name']->getValue()[App::currentLocale()] !!}
This is the only way now to get the product name. I feel there is something more easy way to get the product name. Please suggest the way to get the name of product...
I'm using the wireui/wireui
package and it contains a custom blade directive called notify
Blade::directive('notify', fn (string $expression) => WireUiDirectives::notify($expression));
This causes an exception error in vendor/getcandy/admin/resources/views/components/notification.blade.php
because blade is trying to parse the alpinejs shorthand syntax @notify..
as if it was a blade directive.
I would recommend using the full alpinejs syntax as shown below.
// Before
@notify.window="let message = $event.detail.message; level = $event.detail.level; messages.push(message); setTimeout(() => { remove(message) }, 2500)"
//after
x-on:notify.window="let message = $event.detail.message; level = $event.detail.level; messages.push(message); setTimeout(() => { remove(message) }, 2500)"
I created a pull request that addresses this issue: #42
php artisan tinker
or sail tinker
>>> GetCandy\Models\Product::first()->attribute_data;
PHP Deprecated: Return type of GetCandy\FieldTypes\TranslatedText::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should
be used to temporarily suppress the notice in /var/www/html/vendor/getcandy/core/src/FieldTypes/TranslatedText.php on line 36
PHP Deprecated: Return type of GetCandy\FieldTypes\Text::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used t
o temporarily suppress the notice in /var/www/html/vendor/getcandy/core/src/FieldTypes/Text.php on line 21
=> Illuminate\Support\Collection {#4908
all: [
"name" => GetCandy\FieldTypes\TranslatedText {#4924},
"description" => GetCandy\FieldTypes\TranslatedText {#4911},
],
}
When Running
php artisan getcandy:install
I Get
cURL error 60: SSL certificate problem: certificate has expired (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for https://cdn.getcandy.io/data/countries+states.json
On: https://docs.getcandy.io/getcandy/carts.html#adding-shipping-billing-address
The shipping address formats are wrong:
[
'line_one' => null,
'line_two' => null,
'line_three' => null,
'city' => null,
'state' => null,
'postcode' => null,
'country' => null,
]
should be:
[
'first_name' => null,
'last_name' => null,
'line_one' => null,
'line_two' => null,
'line_three' => null,
'city' => null,
'state' => null,
'postcode' => null,
'country_id' => null,
]
Also the validation error here: https://github.com/getcandy/getcandy/blob/86d39477af3b4de1feaf9653ff94c912cb4a5625/packages/core/src/Actions/Carts/ValidateCartForOrder.php#L63
Should really pass the errors back so they can be output?
The activity log at the bottom of a product shows 'Alec Ritson' as the staff member who made the changes, rather than the actual staff member.
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.