GetCandy - A headless E-Commerce API built on top of Laravel.

Overview

GetCandy

A headless E-Commerce API built on top of Laravel.


Build amazing online stores with full control over functionality and user experience using headless e-commerce. The GetCandy E-Commerce API provides all the features you need to get a storefront up and running using your favourite technology.

πŸ“– Documentation

For installation instructions and usage details, please take a look at the official guides.

πŸ“„ License

GetCandy API is open-sourced software licensed under the Apache License 2.0

Comments
  • Unable to login to hub, API responds with

    Unable to login to hub, API responds with "Call to a member function encodedId() on null""

    Hello, when logging in to the HUB I encounter the following error:

    on endpoint: /api/v1/users/current?includes=roles.permissions,details

    {message: "Call to a member function encodedId() on null", exception: "Error",…}
    exception: "Error"
    file: "/var/www/candy/foodui/vendor/getcandy/candy-api/src/Http/Controllers/Users/UserController.php"
    line: 77
    message: "Call to a member function encodedId() on null"
    trace: [,…]
    

    image

    Expected Behavior

    I should be able to login, I followed this guide: https://guides.getcandy.io/getting-started/hub/authentication/#laravel-sanctum

    Possible Solution

    Investigating still.

    Steps to Reproduce

    1. Setup GetCandy (Clean install), create user, migrate, seed, etc
    2. Follow the this guide https://guides.getcandy.io/getting-started/hub/authentication/#laravel-sanctum
    3. Setup the hub, configure your .env
    4. try to login.
    opened by daniel-farina 15
  • Error While Installing 0.9-beta version

    Error While Installing 0.9-beta version

    Hello I'm installing candy-api on fresh laravel installation

    laravel new getCandyApi
    cd getCandyApi
    composer require getcandy/candy-api:^0.9-beta
    

    I get this error "Cannot redeclare GetCandy\Api\Core\Orders\Models\Order::scopePlaced()" note: I linked it to an existing mysql database full command log:

    C:\Users\User\Desktop>laravel new getCandyApi
    Crafting application...
    Loading composer repositories with package information
    Installing dependencies (including require-dev) from lock file
    Package operations: 97 installs, 0 updates, 0 removals
      - Installing doctrine/inflector (2.0.3): Loading from cache
      - Installing doctrine/lexer (1.2.1): Loading from cache
      - Installing dragonmantank/cron-expression (v2.3.0): Loading from cache
      - Installing voku/portable-ascii (1.5.2): Loading from cache
      - Installing symfony/polyfill-ctype (v1.17.1): Loading from cache
      - Installing phpoption/phpoption (1.7.4): Loading from cache
      - Installing vlucas/phpdotenv (v4.1.7): Loading from cache
      - Installing symfony/css-selector (v5.1.2): Loading from cache
      - Installing tijsverkoyen/css-to-inline-styles (2.2.2): Loading from cache
      - Installing symfony/polyfill-php80 (v1.17.1): Loading from cache
      - Installing symfony/polyfill-mbstring (v1.17.1): Loading from cache
      - Installing symfony/var-dumper (v5.1.2): Loading from cache
      - Installing symfony/deprecation-contracts (v2.1.2): Loading from cache
      - Installing symfony/routing (v5.1.2): Loading from cache
      - Installing symfony/process (v5.1.2): Loading from cache
      - Installing symfony/polyfill-php73 (v1.17.1): Loading from cache
      - Installing symfony/polyfill-php72 (v1.17.0): Loading from cache
      - Installing symfony/polyfill-intl-idn (v1.17.1): Loading from cache
      - Installing symfony/mime (v5.1.2): Loading from cache
      - Installing symfony/http-foundation (v5.1.2): Loading from cache
      - Installing psr/event-dispatcher (1.0.0): Loading from cache
      - Installing symfony/event-dispatcher-contracts (v2.1.2): Loading from cache
      - Installing symfony/event-dispatcher (v5.1.2): Loading from cache
      - Installing psr/log (1.1.3): Loading from cache
      - Installing symfony/error-handler (v5.1.2): Loading from cache
      - Installing symfony/http-kernel (v5.1.2): Loading from cache
      - Installing symfony/finder (v5.1.2): Loading from cache
      - Installing symfony/polyfill-intl-normalizer (v1.17.1): Loading from cache
      - Installing symfony/polyfill-intl-grapheme (v1.17.1): Loading from cache
      - Installing symfony/string (v5.1.2): Loading from cache
      - Installing psr/container (1.0.0): Loading from cache
      - Installing symfony/service-contracts (v2.1.2): Loading from cache
      - Installing symfony/console (v5.1.2): Loading from cache
      - Installing symfony/polyfill-iconv (v1.17.1): Loading from cache
      - Installing egulias/email-validator (2.1.18): Loading from cache
      - Installing swiftmailer/swiftmailer (v6.2.3): Loading from cache
      - Installing ramsey/collection (1.0.1): Loading from cache
      - Installing brick/math (0.8.15): Loading from cache
      - Installing ramsey/uuid (4.0.1): Loading from cache
      - Installing psr/simple-cache (1.0.1): Loading from cache
      - Installing opis/closure (3.5.5): Loading from cache
      - Installing symfony/translation-contracts (v2.1.2): Loading from cache
      - Installing symfony/translation (v5.1.2): Loading from cache
      - Installing nesbot/carbon (2.36.1): Loading from cache
      - Installing monolog/monolog (2.1.0): Loading from cache
      - Installing league/flysystem (1.0.69): Loading from cache
      - Installing league/commonmark (1.5.1): Loading from cache
      - Installing laravel/framework (v7.18.0): Loading from cache
      - Installing fideloper/proxy (4.4.0): Loading from cache
      - Installing asm89/stack-cors (v2.0.1): Loading from cache
      - Installing fruitcake/laravel-cors (v2.0.1): Loading from cache
      - Installing ralouphie/getallheaders (3.0.3): Loading from cache
      - Installing psr/http-message (1.0.1): Loading from cache
      - Installing guzzlehttp/psr7 (1.6.1): Loading from cache
      - Installing guzzlehttp/promises (v1.3.1): Loading from cache
      - Installing guzzlehttp/guzzle (6.5.5): Loading from cache
      - Installing nikic/php-parser (v4.6.0): Loading from cache
      - Installing dnoegel/php-xdg-base-dir (v0.1.1): Loading from cache
      - Installing psy/psysh (v0.10.4): Loading from cache
      - Installing laravel/tinker (v2.4.0): Loading from cache
      - Installing scrivo/highlight.php (v9.18.1.1): Loading from cache
      - Installing filp/whoops (2.7.3): Loading from cache
      - Installing facade/ignition-contracts (1.0.0): Loading from cache
      - Installing facade/flare-client-php (1.3.2): Loading from cache
      - Installing facade/ignition (2.0.7): Loading from cache
      - Installing fzaninotto/faker (v1.9.1): Loading from cache
      - Installing hamcrest/hamcrest-php (v2.0.0): Loading from cache
      - Installing mockery/mockery (1.4.0): Loading from cache
      - Installing nunomaduro/collision (v4.2.0): Loading from cache
      - Installing webmozart/assert (1.9.0): Loading from cache
      - Installing phpdocumentor/reflection-common (2.2.0): Loading from cache
      - Installing phpdocumentor/type-resolver (1.3.0): Loading from cache
      - Installing phpdocumentor/reflection-docblock (5.1.0): Loading from cache
      - Installing phpunit/php-token-stream (3.1.1): Loading from cache
      - Installing sebastian/version (2.0.1): Loading from cache
      - Installing sebastian/type (1.1.3): Loading from cache
      - Installing sebastian/resource-operations (2.0.1): Loading from cache
      - Installing sebastian/recursion-context (3.0.0): Loading from cache
      - Installing sebastian/object-reflector (1.1.1): Loading from cache
      - Installing sebastian/object-enumerator (3.0.3): Loading from cache
      - Installing sebastian/global-state (3.0.0): Loading from cache
      - Installing sebastian/exporter (3.1.2): Loading from cache
      - Installing sebastian/environment (4.2.3): Loading from cache
      - Installing sebastian/diff (3.0.2): Loading from cache
      - Installing sebastian/comparator (3.0.2): Loading from cache
      - Installing phpunit/php-timer (2.1.2): Loading from cache
      - Installing phpunit/php-text-template (1.2.1): Loading from cache
      - Installing phpunit/php-file-iterator (2.0.2): Loading from cache
      - Installing theseer/tokenizer (1.1.3): Loading from cache
      - Installing sebastian/code-unit-reverse-lookup (1.0.1): Loading from cache
      - Installing phpunit/php-code-coverage (7.0.10): Loading from cache
      - Installing doctrine/instantiator (1.3.1): Loading from cache
      - Installing phpspec/prophecy (v1.10.3): Loading from cache
      - Installing phar-io/version (2.0.1): Loading from cache
      - Installing phar-io/manifest (1.0.3): Loading from cache
      - Installing myclabs/deep-copy (1.10.1): Loading from cache
      - Installing phpunit/phpunit (8.5.8): Loading from cache
    voku/portable-ascii suggests installing ext-intl (Use Intl for transliterator_transliterate() support)
    symfony/var-dumper suggests installing ext-intl (To show region name in time zone dump)
    symfony/routing suggests installing doctrine/annotations (For using the annotation loader)
    symfony/routing suggests installing symfony/config (For using the all-in-one router or any loader)
    symfony/routing suggests installing symfony/expression-language (For using expression matching)
    symfony/routing suggests installing symfony/yaml (For using the YAML loader)
    symfony/polyfill-intl-idn suggests installing ext-intl (For best performance)
    symfony/event-dispatcher suggests installing symfony/dependency-injection
    symfony/http-kernel suggests installing symfony/browser-kit
    symfony/http-kernel suggests installing symfony/config
    symfony/http-kernel suggests installing symfony/dependency-injection
    symfony/polyfill-intl-normalizer suggests installing ext-intl (For best performance)
    symfony/polyfill-intl-grapheme suggests installing ext-intl (For best performance)
    symfony/service-contracts suggests installing symfony/service-implementation
    symfony/console suggests installing symfony/lock
    egulias/email-validator suggests installing ext-intl (PHP Internationalization Libraries are required to use the SpoofChecking validation)
    swiftmailer/swiftmailer suggests installing ext-intl (Needed to support internationalized email addresses)
    swiftmailer/swiftmailer suggests installing true/punycode (Needed to support internationalized email addresses, if ext-intl is not installed)
    ramsey/uuid suggests installing ext-gmp (Enables faster math with arbitrary-precision integers using GMP.)
    ramsey/uuid suggests installing ext-uuid (Enables the use of PeclUuidTimeGenerator and PeclUuidRandomGenerator.)
    ramsey/uuid suggests installing paragonie/random-lib (Provides RandomLib for use with the RandomLibAdapter)
    ramsey/uuid suggests installing ramsey/uuid-doctrine (Allows the use of Ramsey\Uuid\Uuid as Doctrine field type.)
    symfony/translation suggests installing symfony/config
    symfony/translation suggests installing symfony/yaml
    monolog/monolog suggests installing aws/aws-sdk-php (Allow sending log messages to AWS services like DynamoDB)
    monolog/monolog suggests installing doctrine/couchdb (Allow sending log messages to a CouchDB server)
    monolog/monolog suggests installing elasticsearch/elasticsearch (Allow sending log messages to an Elasticsearch server via official client)
    monolog/monolog suggests installing ext-amqp (Allow sending log messages to an AMQP server (1.0+ required))
    monolog/monolog suggests installing ext-mongodb (Allow sending log messages to a MongoDB server (via driver))
    monolog/monolog suggests installing graylog2/gelf-php (Allow sending log messages to a GrayLog2 server)
    monolog/monolog suggests installing mongodb/mongodb (Allow sending log messages to a MongoDB server (via library))
    monolog/monolog suggests installing php-amqplib/php-amqplib (Allow sending log messages to an AMQP server using php-amqplib)
    monolog/monolog suggests installing php-console/php-console (Allow sending log messages to Google Chrome)
    monolog/monolog suggests installing rollbar/rollbar (Allow sending log messages to Rollbar)
    monolog/monolog suggests installing ruflin/elastica (Allow sending log messages to an Elastic Search server)
    league/flysystem suggests installing league/flysystem-aws-s3-v2 (Allows you to use S3 storage with AWS SDK v2)
    league/flysystem suggests installing league/flysystem-aws-s3-v3 (Allows you to use S3 storage with AWS SDK v3)
    league/flysystem suggests installing league/flysystem-azure (Allows you to use Windows Azure Blob storage)
    league/flysystem suggests installing league/flysystem-cached-adapter (Flysystem adapter decorator for metadata caching)
    league/flysystem suggests installing league/flysystem-eventable-filesystem (Allows you to use EventableFilesystem)
    league/flysystem suggests installing league/flysystem-rackspace (Allows you to use Rackspace Cloud Files)
    league/flysystem suggests installing league/flysystem-sftp (Allows you to use SFTP server storage via phpseclib)
    league/flysystem suggests installing league/flysystem-webdav (Allows you to use WebDAV storage)
    league/flysystem suggests installing league/flysystem-ziparchive (Allows you to use ZipArchive adapter)
    league/flysystem suggests installing spatie/flysystem-dropbox (Allows you to use Dropbox storage)
    league/flysystem suggests installing srmklive/flysystem-dropbox-v2 (Allows you to use Dropbox storage for PHP 5 applications)
    laravel/framework suggests installing aws/aws-sdk-php (Required to use the SQS queue driver, DynamoDb failed job storage and SES mail driver (^3.0).)
    laravel/framework suggests installing doctrine/dbal (Required to rename columns and drop SQLite columns (^2.6).)
    laravel/framework suggests installing ext-memcached (Required to use the memcache cache driver.)
    laravel/framework suggests installing ext-pcntl (Required to use all features of the queue worker.)
    laravel/framework suggests installing ext-posix (Required to use all features of the queue worker.)
    laravel/framework suggests installing ext-redis (Required to use the Redis cache and queue drivers (^4.0|^5.0).)
    laravel/framework suggests installing league/flysystem-aws-s3-v3 (Required to use the Flysystem S3 driver (^1.0).)
    laravel/framework suggests installing league/flysystem-cached-adapter (Required to use the Flysystem cache (^1.0).)
    laravel/framework suggests installing league/flysystem-sftp (Required to use the Flysystem SFTP driver (^1.0).)
    laravel/framework suggests installing moontoast/math (Required to use ordered UUIDs (^1.1).)
    laravel/framework suggests installing nyholm/psr7 (Required to use PSR-7 bridging features (^1.2).)
    laravel/framework suggests installing pda/pheanstalk (Required to use the beanstalk queue driver (^4.0).)
    laravel/framework suggests installing pusher/pusher-php-server (Required to use the Pusher broadcast driver (^4.0).)
    laravel/framework suggests installing symfony/cache (Required to PSR-6 cache bridge (^5.0).)
    laravel/framework suggests installing symfony/filesystem (Required to create relative storage directory symbolic links (^5.0).)
    laravel/framework suggests installing symfony/psr-http-message-bridge (Required to use PSR-7 bridging features (^2.0).)
    laravel/framework suggests installing wildbit/swiftmailer-postmark (Required to use Postmark mail driver (^3.0).)
    guzzlehttp/psr7 suggests installing zendframework/zend-httphandlerrunner (Emit PSR-7 responses)
    psy/psysh suggests installing ext-pcntl (Enabling the PCNTL extension makes PsySH a lot happier :))
    psy/psysh suggests installing ext-pdo-sqlite (The doc command requires SQLite to work.)
    psy/psysh suggests installing ext-posix (If you have PCNTL, you'll want the POSIX extension as well.)
    psy/psysh suggests installing hoa/console (A pure PHP readline implementation. You'll want this if your PHP install doesn't already support readline or libedit.)
    filp/whoops suggests installing whoops/soap (Formats errors as SOAP responses)
    facade/ignition suggests installing laravel/telescope (^3.1)
    sebastian/global-state suggests installing ext-uopz (*)
    sebastian/environment suggests installing ext-posix (*)
    phpunit/php-code-coverage suggests installing ext-xdebug (^2.7.2)
    phpunit/phpunit suggests installing ext-soap (*)
    phpunit/phpunit suggests installing ext-xdebug (*)
    phpunit/phpunit suggests installing phpunit/php-invoker (^2.0.0)
    Generating optimized autoload files
    > @php -r "file_exists('.env') || copy('.env.example', '.env');"
    > @php artisan key:generate --ansi
    Application key set successfully.
    > Illuminate\Foundation\ComposerScripts::postAutoloadDump
    > @php artisan package:discover --ansi
    Discovered Package: facade/ignition
    Discovered Package: fideloper/proxy
    Discovered Package: fruitcake/laravel-cors
    Discovered Package: laravel/tinker
    Discovered Package: nesbot/carbon
    Discovered Package: nunomaduro/collision
    Package manifest generated successfully.
    Application ready! Build something amazing.
    
    C:\Users\User\Desktop>cd getCandyApi
    
    C:\Users\User\Desktop\getCandyApi>composer require getcandy/candy-api:^0.9-beta
    ./composer.json has been updated
    Loading composer repositories with package information
    Updating dependencies (including require-dev)
    Nothing to install or update
    Package guzzlehttp/ringphp is abandoned, you should avoid using it. No replacement was suggested.
    Package guzzlehttp/streams is abandoned, you should avoid using it. No replacement was suggested.
    Package paypal/rest-api-sdk-php is abandoned, you should avoid using it. No replacement was suggested.
    Generating optimized autoload files
    > Illuminate\Foundation\ComposerScripts::postAutoloadDump
    > @php artisan package:discover --ansi
    
       Symfony\Component\ErrorHandler\Error\FatalError
    
      Cannot redeclare GetCandy\Api\Core\Orders\Models\Order::scopePlaced()
    
      at C:\Users\User\Desktop\getCandyApi\vendor\getcandy\candy-api\src\Core\Orders\Models\Order.php:81
        77|      *
        78|      * @param Builder $qb
        79|      * @return Builder
        80|      */
      > 81|     public function scopePlaced($qb)
        82|     {
        83|         return $qb->whereNotNull('placed_at');
        84|     }
        85|
    
    
       Whoops\Exception\ErrorException
    
      Cannot redeclare GetCandy\Api\Core\Orders\Models\Order::scopePlaced()
    
      at C:\Users\User\Desktop\getCandyApi\vendor\getcandy\candy-api\src\Core\Orders\Models\Order.php:81
        77|      *
        78|      * @param Builder $qb
        79|      * @return Builder
        80|      */
      > 81|     public function scopePlaced($qb)
        82|     {
        83|         return $qb->whereNotNull('placed_at');
        84|     }
        85|
    
      1   C:\Users\User\Desktop\getCandyApi\vendor\filp\whoops\src\Whoops\Run.php:408
          Whoops\Run::handleError("Cannot redeclare GetCandy\Api\Core\Orders\Models\Order::scopePlaced()", "C:\Users\User\Desktop\getCandyApi\vendor\getcandy\candy-api\src\Core\Orders\Models\Order.php")
    
      2   [internal]:0
          Whoops\Run::handleShutdown()
    PHP Fatal error:  Cannot redeclare GetCandy\Api\Core\Orders\Models\Order::scopePlaced() in C:\Users\User\Desktop\getCandyApi\vendor\getcandy\candy-api\src\Core\Orders\Models\Order.php on line 81
    Script @php artisan package:discover --ansi handling the post-autoload-dump event returned with error code 255
    
    Installation failed, reverting ./composer.json to its original content.
    
    
    opened by zaher-code-07 13
  • 401 Unauthorized

    401 Unauthorized

    Expected Behavior

    Api endpoint calls via hub interface should not return errors

    Current Behavior

    Getting '401 Unauthorized' when accessing api endpoint

    Possible Solution

    ??

    Steps to Reproduce

    Did a fresh install from github

    1. git clone https://github.com/getcandy/candy-store.git
    2. composer install
    3. php artisan vendor:publish --provider="GetCandy\Api\Providers\ApiServiceProvider"
    4. php artisan vendor:publish --tag="public"
    5. Renamed the .env.example to .env and set database vars
    6. php artisan candy:install
    7. set .env CANDY_API vars CANDY_API_URL=http://candy-store.test CANDY_API_VERIFY=true CANDY_API_ID=1 CANDY_API_SECRET=ekiUgjvrC4KuxrGfdZLo1WMr6R5Vz0cCCqpqLi6X

    Context (Environment)

    Trying to login to http://candy-store.test/hub and I'm successful except for all http://candy-store.test/api calls are being rejected with a 401 error and the interface features are not useable. Example of api calls generating 401 errors from browser console

    http://candy-store.test/api/v1/channels http://candy-store.test/api/v1/taxes http://candy-store.test/api/v1/languages

    opened by bauersfeld 13
  • category endpoint not working

    category endpoint not working

    get request to http://localhost:8000/api/v1/categories should give categories

    Current Behavior

    it results in a sql error: Integrity constraint violation: 1052 Column 'drafted_at' in where clause is ambiguous (SQL: selectcategories.*, (select count(*) fromproductsinner joinproduct_categoriesonproducts.id=product_categories.product_idinner joincustomer_group_productonproducts.id=customer_group_product.product_idand .....

    opened by sadektouati 12
  • API client not initiliazed?

    API client not initiliazed?

    Following the examples in the candy-store, I'm attempting to create a user using the API client. Using the new facade name (CandyClient) instead of the old one (GetCandyClient), the client is failing when trying to requestToken:

    private function requestToken($params)
        {
            try {
                $response = $this->client->post('oauth/token', [    // <---- HERE
                    'form_params' => array_merge(
                        [
                            'client_id' => $this->getClientId(),
                            'client_secret' => $this->getClientSecret()
                        ],
                        $params
                    ),
                    'verify' => config('services.ecommerce_api.verify'),
                ]);
            } catch (ClientException $e) {
                return new ApiResponse($e->getResponse());
            }
            return new ApiResponse($response);
        }
    

    ...complaining that $this->client isn't set. I saw an init() in the client's Candy class that created the client, but I can't see where this method is called in the store (or anywhere else).

    Steps to Reproduce

    1. Create a controller/action
    2. Try calling CandyClient::Customers()->create($customer); (or anything else)
    opened by tooshay 11
  • Multiple dropColumns in one migration

    Multiple dropColumns in one migration

    I'm trying to write a couple of tests for some added functionality to the API and using SQLite for the tests, as CandyAPI seems to be. In the 2018_01_15_120102_add_fields_to_transactions migration there are multiple dropColumns in the same transaction - how did you get that to pass, with SQLite not supporting this behaviour?

    opened by tooshay 10
  • Get empty data with the API

    Get empty data with the API

    Expected Behavior

    I have data inside the categories and products table.

    Current Behavior

    But when I call any of the APIs I receive empty array of data

    Possible Solution

    Steps to Reproduce

    Context (Environment)

    Detailed Description

    Possible Implementation

    opened by sandraseifunplugged 8
  • Elastic indexing

    Elastic indexing

    I'm experiencing some difficulty with the backend interface for managing categories and collections..effectively, when you start typing the search results reveal nothing and the site just sort of times out....

    How do you configure the indexes in config/elasticquent.php so this doesn't occur?

    opened by steveadamsfixedit 8
  • Validation error but product still saved

    Validation error but product still saved

    Hi, I've experienced a bug when trying to add a product.

    I've made a fresh install of the api+hub and went ahead to add a product. However it displays a validation error, although every field was specified. Strange thing is, it still saves the product to the database.

    See the screenshot below for reference screenshot_bug_product_add

    opened by floreich 8
  • Addresses v1

    Addresses v1

    • [ ] Does the endpoint make sense in its context? i.e. assets/... not images/... or asset/...
    • [ ] Code design
    • [ ] Are the necessary user restrictions in place? i.e. Should this be locked to users with a certain role
    • [ ] Anything fundamentally wrong with the approach?
    • [ ] Is there anything that could cause a bottleneck or otherwise have a significant impact on performance when scaled?
    • [ ] Are we using Eloquent resources on returned data when available?
    • [ ] Validation
    • [ ] Automated testing
    enhancement 
    opened by glennjacobs 7
  • Elasticsearch indexing

    Elasticsearch indexing

    Each time I run php artisan candy:search:index I'm running elasticsearch 7.3.2

    I get the error below Indexing GetCandy\Api\Core\Products\Models\Product

    Elastica\Exception\ResponseException : Types cannot be provided in put mapping requests, unless the include_type_name parameter is set to true.

    at C:\xampp\htdocs\laravel\personal\dooing360\vendor\ruflin\elastica\lib\Elastica\Transport\Http.php:182 178| $response->setJsonBigintConversion($connection->getConfig('bigintConversion')); 179| } 180| 181| if ($response->hasError()) {

    182| throw new ResponseException($request, $response); 183| } 184| 185| if ($response->hasFailedShards()) { 186| throw new PartialShardFailureException($request, $response);

    Exception trace:

    1 Elastica\Transport\Http::exec(Object(Elastica\Request), []) C:\xampp\htdocs\laravel\personal\vendor\ruflin\elastica\lib\Elastica\Request.php:194

    2 Elastica\Request::send() C:\xampp\htdocs\laravel\personal\vendor\ruflin\elastica\lib\Elastica\Client.php:689

    Please use the argument -v to see more details.

    opened by bekee 7
  • Ci tests

    Ci tests

    Updated the tests workflow

    • Run on both ubuntu and windows
    • Run on 7.4 and 7.3
    • Run on prefer-stable ~~and prefer-lowest~~ (prefer-lowest fails, so disabled it again)
    • Run on all pushes & pull requests (makes it possible for contributors to run tests)

    I hope this makes it a bit more stable & easier to support PHP 8 in the near future

    opened by Nielsvanpach 2
  • ProductRouteController does not exist

    ProductRouteController does not exist

    Describe the bug ProductRouteController does not exist

    To Reproduce Write command php artisan route:list

    Expected behavior Show route list of laravel application

    Screenshots

    Target class [GetCandy\Api\Http\Controllers\Products\ProductRouteController] does not exist.

    at vendor/laravel/framework/src/Illuminate/Container/Container.php:875 871β–• 872β–• try { 873β–• $reflector = new ReflectionClass($concrete); 874β–• } catch (ReflectionException $e) { ➜ 875β–• throw new BindingResolutionException("Target class [$concrete] does not exist.", 0, $e); 876β–• } 877β–• 878β–• // If the type is not instantiable, the developer is attempting to resolve 879β–• // an abstract type such as an Interface or Abstract Class and there is

    1 [internal]:0 Illuminate\Foundation\Console\RouteListCommand::Illuminate\Foundation\Console{closure}()

      +13 vendor frames 
    

    15 [internal]:0 Illuminate\Foundation\Console\RouteListCommand::Illuminate\Foundation\Console{closure}() ERROR: 1

    opened by Ifnir 5
  • Error 500 when updating discount

    Error 500 when updating discount

    Describe the bug When updating a discount through an API, it throws an error related to SQL:

    "SQLSTATE[23000]: Integrity constraint violation: 1451 Cannot delete or update a parent row: a foreign key constraint fails (`homestead`.`discount_reward_products`, CONSTRAINT `discount_reward_products_discount_reward_id_foreign` FOREIGN KEY (`discount_reward_id`) REFERENCES `discount_rewards` (`id`)) (SQL: delete from `discount_rewards` where `discount_rewards`.`discount_id` = 5 and `discount_rewards`.`discount_id` is not null)"
    

    To Reproduce

    1. Create a discount, fx:
    this.$getcandy.on('discounts', 'postDiscounts',
       {
         name: {
           en: 'Buy one get none free',
           da: 'Buy one get none free'
         },
         start_at: '2019-06-04T14:27:02.000Z',
         end_at: '2019-06-04T14:27:02.000Z'
       })
    
    1. Get status 201
    2. Get the discount ID from server response (fx. wz6d39dj).
    3. Update discount, fx:
    this.$getcandy.on('discounts', 'putDiscountsDiscountId', 'wz6d39dj', {
        start_at: '2019-08-24T14:15:22Z',
        end_at: '2022-08-24T14:15:22Z',
        priority: 0,
        stop_rules: true,
        status: true,
        attribute_data: {
          name: {
            webstore: {
              da: 'Buy one get none free',
              en: 'Buy one get none free'
            }
          }
        },
        channels: {
          data: {
            id: 1,
            published_at: '2021-06-14T14:15:22Z'
          }
        },
        rewards: {
          data: {
            products: [
              {
                product_id: 24202,
                quantity: 1
              }
            ]
          }
        },
        sets: {
          data: [
            {
              scope: 'string',
              outcome: true,
              items: {
                data: [
                  {
                    eligibles: [
                      'string'
                    ],
                    type: 'string'
                  }
                ]
              }
            }
          ]
        }
      })
    
    1. See error in the server response.

    Expected behavior Server returns a response with status 200.

    opened by geantas 1
  • Open api/0.12 spec

    Open api/0.12 spec

    This PR has various updates to the spec to get ready for 0.12

    Notably I've added some initial include descriptions for resources, update some examples and update query params for some important routes.

    opened by alecritson 3
Releases(0.12.16)
  • 0.12.16(Sep 22, 2021)

    🐞 Fixes

    Fixes an issue where dimension values and their units were not mass assignable, meaning in the hub a user would not be able to change them.

    Source code(tar.gz)
    Source code(zip)
  • 0.12.15(Aug 16, 2021)

    🐞 Fixes

    This fixes an issue where the UserService was unbound to the container and causing some edge case bugs. This adds it back in to fix these errors happening.

    Source code(tar.gz)
    Source code(zip)
  • 0.12.14(Jul 28, 2021)

    🐞 Fixes This fixes an issue with assets where the assetable_type was not being considered when deleting, potentially causing other model types to lose their assets.

    Source code(tar.gz)
    Source code(zip)
  • 0.12.13(Jun 23, 2021)

  • 0.12.12(Jun 9, 2021)

    Update the GetCandy API package.

    composer update getcandy/candy-api
    

    Run any migrations

    php artisan migrate
    

    🐞 Fixes

    • Added missing trait to FetchImpersonationToken action
    • Fix reference to users service which has been removed.

    ⭐ Improvements

    • Updating an address is a lot more forgiving when it comes to what fields should be passed through.
    Source code(tar.gz)
    Source code(zip)
  • 0.12.11(Jun 3, 2021)

  • 0.12.10(Jun 2, 2021)

  • 0.12.9(Jun 2, 2021)

  • 0.12.8(May 27, 2021)

    Upgrading

    Update the GetCandy API package.

    composer update getcandy/candy-api
    

    Run any migrations

    php artisan migrate
    

    🐞 Fixes

    • Fixed an issue where drafted routes weren't being considered when updating a route and setting others to not be default
    • Various fixes to discount saving

    ⭐ Improvements

    • Elasticsearch pagination is now limited to 1000 results due to Elasticsearch restrictions with offsets

    πŸ—οΈ Additions

    • Added product and attribute counts to product family resources
    • Added PayPal refunds
    Source code(tar.gz)
    Source code(zip)
  • 0.12.7(May 17, 2021)

  • 0.12.6(May 12, 2021)

    Upgrading

    Update the GetCandy API package.

    composer update getcandy/candy-api
    

    πŸ—οΈ Additions

    • Added location and filename to AssetResource
    Source code(tar.gz)
    Source code(zip)
  • 0.12.5(May 7, 2021)

    Upgrading

    Update the GetCandy API package.

    composer update getcandy/candy-api
    

    Run any migrations

    php artisan migrate
    

    🐞 Fixes

    • Fixed an issue that caused an un hydrated basket being returned when fetching shipping methods for an order.
    • Fixed an issue when publishing/drafting customer groups that was causing purchasable to not get populated correctly.
    • Fixed an issue on the indexer which caused disabled languages to be indexed and if they didn't have a value it would error.
    • Fixed an issue where order shipping or billing details were an empty array on create.

    ⭐ Improvements

    • Publishing variant tiers from a draft has been simplified.
    • In the recycle bin, entries are now ordered by the date they were added descending.
    • When uploading an asset via the simple upload endpoint, you can now specify the filesystem disk to use. e.g. disk=public
    • When uploading an asset via the simple upload endpoint, you can now specify a path, if blank uploads will be the default.
    • When fetching a product you can now specify an SKU in the action.
    • Improved the way product variant tiers were fetched, this now relys on the underlying scope rather than passing through customer group ids.

    πŸ—οΈ Additions

    • Added manual flag to transactions
    • Added an GetCandy\Api\Core\Orders\Events\OrderStatusUpdatedEvent for when an order status is updated.
    • Added order_status key to the order response, this will return an array of details if the status has been matched from the getcandy.php config.
    Source code(tar.gz)
    Source code(zip)
  • 0.12.4(Mar 31, 2021)

  • 0.12.3(Mar 29, 2021)

    Upgrading

    Update the GetCandy package.

    composer update @getcandy/candy-api
    

    Run migrations

    php artisan migrate
    

    🐞 Improvements

    • Added missing settings for categories via a migration
    Source code(tar.gz)
    Source code(zip)
  • 0.12.2(Mar 25, 2021)

    Upgrading

    Update the GetCandy package.

    composer update @getcandy/candy-api
    

    🐞 Fixes

    • Fixed an issue where the correct language wasn't being set when publishing routes from a draft
    • Fixed an issue with routes where if you where not on a draft and clicked delete route, it would remove it from the live version and not the draft. Meaning if you then published the draft the route would reappear.
    Source code(tar.gz)
    Source code(zip)
  • 0.12.1(Mar 23, 2021)

    Hotfix to route migration which would cause an error in an edge case where the old locale column on routes would not map to a code in the languages table. Now if we can't find the language we fall back to the default as we need to have one.

    Source code(tar.gz)
    Source code(zip)
  • 0.12.0(Mar 23, 2021)

    Upgrading

    For a full guide on how to upgrade, see the full documentation.

    🐞 Fixes

    • Fixed an issue that was causing a indefinite wildcard search on products
    • Allow certain fields to be nullable on a customer address (company_name, address_two, address_three)
    • Fixed some issues on route creation
    • Fixed issue where shipping method relationships were not having their timestamps updated
    • Fixes to some migrations
    • Fixed an issue where the recycle bin item wasn't returned on the relationship
    • Fixed and issue where the indexable event wasn't being triggered when publishing a resource
    • Fixes to drafting and publishing of resources
    • Fixed an issue where path wasn't updating when updating a route
    • Fixed an issue where the customer was not attached to the initial user on install

    ⭐ Improvements

    • Slight optimisation for Elasticsearch and the fields it returns
    • Drafting and Publishing of a draft will now run in a transaction, you can also extend the drafting functionality in your plugins.
    • SKU uses trim when being saved
    • Languages have been refactored and simplified so now we only rely on code. The lang column has been replaced by code and the iso column has been removed.
    • When detecting the language to use for API responses, we now parse the accept-language header properly.

    πŸ—οΈ Additions

    • Added endpoint to get a payment provider via it's given ID
    • Added Stripe Payment Intents provider
    • Added a RebuildTree action and command for categories, so if your category tree is messed up you can run candy:categories:rebuild
    • Added user/addresses endpoint to get the current users saved addresses
    • Added initial report exporting logic, this will now run and exporter in the background and email you when ready to download.
    • Add some additional reports
      • Average spending across customer groups
      • Total spending across customer groups
    Source code(tar.gz)
    Source code(zip)
  • 0.11.5(Jan 22, 2021)

    Upgrading

    You must reindex your categories and products by running

    php artisan candy:products:reindex php artisan candy:categories:reindex

    You should also run migrations

    php artisan migrate

    🐞 Fixes

    • Fixed a missing class on the SyncWithBasketListener
    • Fixed an issue where the wrong Eloquent resource was being returned when fetching shipping estimates.
    • Fixed an issue where the incorrect published_at date was being set when editing a discount
    • Fixed an issue when passing the search type as a singular string i.e. productwould break the searching. Now you can pass both the singular and plural versions.
    • General fixes to Discount editing and creation.
    • Tweaked offset calculation when searching on Elasticsearch.
    • Fixed aggregations not returning on search results.
    • Fixed invalid relationship call when returning activity log records.
    • Fixed default depth setting when getting a category tree.
    • The SavedBasketResource now includes the related BasketResource correctly.
    • Fixed an issue which prevented assets being added by YouTube or URL.
    • Fixed an issue which caused an error if you tried to add the same YouTube video more than once to a product. Thumbnail naming was clashing, now we will get a unique name.
    • Fixed an issue which, when publishing a category draft, would cause child nodes to disappear.
    • Fixed namespace issue on PluginResource and PluginCollection.
    • Fixed an issue where a product or category wasn’t being removed from the search index when it was hard deleted.
    • Fixed an issue where not sending path when searching for a route gave a validation error. This should allow null.

    πŸ”€ Changes

    • High Impact Changed POST method on basket-lines/{id}/remove to a PUT request. This is so it matches the spec.
    • High Impact When filtering on multiple values, a pipe | should be used instead of a hyphen -
    • High Impact The way products/categories channel and customer group data gets indexed has changed.
      • Channels: Previously if a channel wasn’t published it wouldn’t get added into the document, this has been changed so that the published_at field is now indexed as a date. This will allow us to filter on these documents more accurately in the future.
      • Customer groups: Previously if the visible and purchasable fields weren’t set the customer group wouldn’t be added to the document, now these fields have been added as boolean types to again allow better filtering in the future.
    • Added count to the pagination response on search results.
    • Added draft filter on FetchProduct action.
    • Channel and Customer Group scopes will check if we are on the command line before resolving.

    ⭐ Improvements

    • Used eager loading when indexing instead of the query builder to boost performance.
    • Category filter has been added back.
    • Removed using the query builder to count products and children and use Laravel’s with_count instead to boost performance.

    πŸ—οΈ Additions

    • Added provider_users table for association with payment providers.
    • BasketResource now includes the basket currency

    πŸ’– Thanks to

    @ven7ura @Repox

    Source code(tar.gz)
    Source code(zip)
  • 0.11.4(Jan 22, 2021)

  • 0.11.3(Jan 18, 2021)

    This update does not require any migrations to be run.

    🐞 Fixes

    • Fixed an issue where not having products assigned to a category prevented it from being published from a draft.
    Source code(tar.gz)
    Source code(zip)
  • 0.11.2(Jan 12, 2021)

    This update does not require any migrations to be run.

    🐞 Fixes

    • Reverted two global scopes as these were conflicting with the nested set package. Once we can remove the package causing the issue this will be revised.
    • Fixed category filtering on search.

    ⭐ Additions

    • Added an inGroup helper for customers
    • Added sort field to CategoryResource
    Source code(tar.gz)
    Source code(zip)
  • 0.11.1(Nov 16, 2020)

    🏑 Chore

    • Remove full OpenAPI spec file from source control and generate in GitHub Actions
    • Sort OpenAPI spec endpoints alphabetically
    • Apply StyleCI fixes

    πŸ’– Thanks to

    • @glennjacobs
    Source code(tar.gz)
    Source code(zip)
  • 0.11.0(Nov 16, 2020)

  • 0.10.2-beta(Nov 5, 2020)

  • 0.10.1-beta(Oct 2, 2020)

  • 0.10.0-beta(Sep 24, 2020)

    This is a big merge from the develop branch into a new beta release. All v1 updates to date have been merged in.

    This includes added support for Laravel 8

    Source code(tar.gz)
    Source code(zip)
  • 0.2.121(Aug 5, 2020)

  • 0.9.12-beta(Jun 24, 2020)

Owner
GetCandy
Laravel Headless E-Commerce
GetCandy
GetCandy is a package that brings functionality akin to Shopify and other e-commerce platforms to Laravel.

GetCandy is a set of Laravel packages that bring functionality akin to Shopify and other e-commerce platforms to Laravel. You have complete freedom to

GetCandy 7 Oct 27, 2022
Laravel eCommerce headless APIs allow you to experience seamless and easily scalable storefront performance.

Bagisto GraphQL API Laravel eCommerce headless APIs allow you to experience seamless and easily scalable storefront performance. An open-source and Gr

Bagisto 30 Dec 29, 2022
My Shop E-commerce Backend API Service

About Laravel Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable and creative experie

Dzulfikar Sauki Akmal 7 Dec 30, 2022
A small module allow user to add a real top banner in PrestaShop

Lk Top banner A simple module that allow you to add a real Top banner message in PrestaShop Options module Add any long or tiny text and eventually yo

Azralth 2 Sep 25, 2021
Sylius is an Open Source eCommerce platform on top of Symfony.

Sylius is an Open Source eCommerce platform on top of Symfony. The highest quality of code, strong testing culture, built-in Agile (BDD) workflow and

Sylius eCommerce 7.2k Jan 5, 2023
Commerce GrappQL Package for Laravel

Sailwork Commerce Package for Laravel Document Please read document in here: Document Installation You can install the package via composer: composer

Sail Work 6 May 10, 2021
Laravel FREE E-Commerce Software

Laravel FREE E-Commerce Software

Jeff Simons Decena 1.7k Dec 24, 2022
A free open source e-commerce platform for online merchants based on customised version of Laravel.

A free open source e-commerce platform for online merchants based on customised version of Laravel.

Ace Vinayak 58 Oct 19, 2022
Integrated online shop based on Laravel LTS and the Aimeos e-commerce framework

⭐ Star us on GitHub β€” it motivates us a lot! ?? Aimeos Laravel ecommerce platform Aimeos is THE professional, full-featured and high performance e-com

Aimeos 3k Jan 5, 2023
E-Commerce Laravel Project

About Laravel Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable and creative experie

Mohamed Fadl 2 Dec 10, 2022
A e-commerce website with Laravel, Vue

A eCommerce using Laravel Version: 1.0 Release of the Laravel eCommerce. Technologies and libraries Laravel 7+, PHP 7+. JavaScript & VueJS Framework.

Jackson Zhang 1 Nov 4, 2021
An E-Commerce package for Laravel with Grafite CMS. Take control of your content and how you sell it! Products, subscriptions, shipping, downloading and more!

Grafite Commerce Grafite has archived this project and no longer supports or develops its code. We recommend using only as a source of ideas for your

Grafite Inc 45 Jun 8, 2021
A developer-friendly e-commerce foundation for your Laravel app

laravel-shopr A developer-friendly e-commerce foundation for your Laravel app. All the features you need for your webshop but without sacrificing you

Happy Pixels AB 208 Nov 2, 2022
Laravel FREE E-Commerce Software

Get discount on Digital Ocean Sign-up with Digital Ocean and get $10 discount! Laravel FREE E-Commerce Software Features Provided Products Cart Checko

Jeff Simons Decena 1.7k Jan 4, 2023
The truly Laravel E-commerce Framework

Vanilo The Truly Laravel E-commerce Framework Vanilo's aim is that Laravel developers can rapidly create E-commerce applications with pleasure. Curren

Vanilo E-commerce 650 Dec 28, 2022
Aimeos is THE professional, full-featured and high performance e-commerce package for Laravel

Aimeos Slim package ⭐ Star us on GitHub β€” it helps! Aimeos is THE professional, full-featured and high performance e-commerce package for Laravel! You

Aimeos 101 Sep 14, 2022
Miolica: an e-commerce application that uses React.js as the frontend and Laravel as the backend

Miolica: an e-commerce application that uses React.js as the frontend and Laravel as the backend

Valll 5 Apr 20, 2022
Drag and Drop Website Builder and CMS with E-commerce

Microweber: Drag-and-Drop CMS Current version: 1.2 running on Laravel 8! Download | What is Microweber? | Core features of Microweber | Requirements |

Microweber 2.6k Dec 28, 2022
PrestaShop is a fully scalable open source e-commerce solution.

PrestaShop is an Open Source e-commerce web application, committed to providing the best shopping cart experience for both merchants and customers.

PrestaShop 6.9k Jan 9, 2023