Giter Club home page Giter Club logo

aimeos-laravel's Introduction

Aimeos logo

Aimeos Laravel ecommerce package

Total Downloads Build Status Coverage Status Scrutinizer Code Quality License

⭐ Star us on GitHub — it motivates us a lot! 😀

Aimeos is THE professional, full-featured and ultra fast Laravel ecommerce package! You can install it in your existing Laravel application within 5 minutes and can adapt, extend, overwrite and customize anything to your needs.

Aimeos Laravel demo

Features

Aimeos is a full-featured e-commerce package:

  • Multi vendor, multi channel and multi warehouse
  • From one to 1,000,000,000+ items
  • Extremly fast down to 20ms
  • For multi-tentant e-commerce SaaS solutions with unlimited vendors
  • Bundles, vouchers, virtual, configurable, custom and event products
  • Subscriptions with recurring payments
  • 100+ payment gateways
  • Full RTL support (frontend and backend)
  • Block/tier pricing out of the box
  • Extension for customer/group based prices
  • Discount and voucher support
  • Flexible basket rule system
  • Full-featured admin backend
  • Beautiful admin dashboard
  • Configurable product data sets
  • JSON REST API based on jsonapi.org
  • GraphQL API for administration
  • Completly modular structure
  • Extremely configurable and extensible
  • Extension for market places with millions of vendors
  • Fully SEO optimized including rich snippets
  • Translated to 30+ languages
  • AI-based text translation
  • Optimized for smart phones and tablets
  • Secure and reviewed implementation
  • High quality source code

... and more Aimeos features

Supported languages:

           

Check out the demos:

Alternatives

Full shop application

If you want to set up a new application or test Aimeos, we recommend the Aimeos shop distribution. It contains everything for a quick start and you will get a fully working online shop in less than 5 minutes:

Aimeos shop distribution

Headless distribution

If you want to build a single page application (SPA) respectively a progressive web application (PWA) yourself and don't need the Aimeos HTML frontend, then the Aimeos headless distribution is the right choice:

Aimeos headless distribution

Table of content

Supported versions

Currently, the Aimeos Laravel packages 2023.10 and later are fully supported:

  • Stable release: 2024.04+ (Laravel 10.x and 11.x)
  • LTS release: 2023.10 (Laravel 9.x, 10.x and 11.x)

If you want to upgrade between major versions, please have a look into the upgrade guide!

Requirements

The Aimeos shop distribution requires:

  • Linux/Unix, WAMP/XAMP or MacOS environment
  • PHP >= 8.1
  • MySQL >= 5.7.8, MariaDB >= 10.2.2, PostgreSQL 9.6+, SQL Server 2019+
  • Web server (Apache, Nginx or integrated PHP web server for testing)

If required PHP extensions are missing, composer will tell you about the missing dependencies.

If you want to upgrade between major versions, please have a look into the upgrade guide!

Database

Make sure that you've created the database in advance and added the configuration to the .env file in your application directory. Sometimes, using the .env file makes problems and you will get exceptions that the connection to the database failed. In that case, add the database credentials to the resource/db section of your ./config/shop.php file too!

If you don't have at least MySQL 5.7.8 or MariaDB 10.2.2 installed, you will probably get an error like

Specified key was too long; max key length is 767 bytes

To circumvent this problem, drop the new tables if there have been any created and change the charset/collation setting in ./config/database.php to these values before installing Aimeos again:

'connections' => [
    'mysql' => [
        // ...
        'charset' => 'utf8',
        'collation' => 'utf8_unicode_ci',
        // ...
    ]
]

Caution: Also make sure that your MySQL server creates InnoDB tables by default as MyISAM tables won't work and will result in an foreign key constraint error!

If you want to use a database server other than MySQL, please have a look into the article about supported database servers and their specific configuration. Supported are:

  • MySQL, MariaDB (fully)
  • PostgreSQL (fully)
  • SQL Server (fully)

Make sure, you use one of the supported database servers in your .env file, e.g.:

DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=aimeos
DB_USERNAME=root
DB_PASSWORD=

Caution: The SQLite database configured by default is NOT supported!

Installation

The Aimeos Laravel online shop package is a composer based library. It can be installed easiest by using Composer 2.1+ in the root directory of your existing Laravel application:

wget https://getcomposer.org/download/latest-stable/composer.phar -O composer

Then, add these lines to the composer.json of the Laravel skeleton application:

    "prefer-stable": true,
    "minimum-stability": "dev",
    "require": {
        "aimeos/aimeos-laravel": "~2024.04",
        ...
    },
    "scripts": {
        "post-update-cmd": [
            "@php artisan vendor:publish --tag=laravel-assets --ansi --force",
            "@php artisan vendor:publish --tag=public --ansi",
            "\\Aimeos\\Shop\\Composer::join"
        ],
        ...
    }

Afterwards, install the Aimeos shop package using

php composer update -W

In the last step you must now execute these artisan commands to get a working or updated Aimeos installation:

php artisan vendor:publish --tag=config --tag=public
php artisan migrate
php artisan aimeos:setup --option=setup/default/demo:1

In a production environment or if you don't want that the demo data gets installed, leave out the --option=setup/default/demo:1 option.

Authentication

You have to set up one of Laravel's authentication starter kits. Laravel Breeze is the easiest one but you can also use Jetstream.

composer require laravel/breeze
php artisan breeze:install
npm install && npm run build # if not executed automatically by the previous command

Laravel Breeze will ask you a few questions, the most important one is the type of stack you want to use. Select "Blade" (it's the easiest way) and use the default values for the others.

It also adds a route for /profile to ./routes/web.php which may overwrite the aimeos_shop_account route. To avoid an exception about a missing aimeos_shop_account route, change the URL for these lines from ./routes/web.php file from /profile to /profile/me:

Route::middleware('auth')->group(function () {
    Route::get('/profile/me', [ProfileController::class, 'edit'])->name('profile.edit');
    Route::patch('/profile/me', [ProfileController::class, 'update'])->name('profile.update');
    Route::delete('/profile/me', [ProfileController::class, 'destroy'])->name('profile.destroy');
});

For more information, please follow the Laravel documentation:

Configure authentication

As a last step, you need to extend the boot() method of your App\Providers\AppServiceProvider class and add the lines to define how authorization for "admin" is checked in app/Providers/AppServiceProvider.php:

    public function boot()
    {
        // Keep the lines before

        \Illuminate\Support\Facades\Gate::define('admin', function($user, $class, $roles) {
            if( isset( $user->superuser ) && $user->superuser ) {
                return true;
            }
            return app( '\Aimeos\Shop\Base\Support' )->checkUserGroup( $user, $roles );
        });
    }

Create account

Test if your authentication setup works before you continue. Create an admin account for your Laravel application so you will be able to log into the Aimeos admin interface:

php artisan aimeos:account --super <email>

The e-mail address is the user name for login and the account will work for the frontend too. To protect the new account, the command will ask you for a password. The same command can create limited accounts by using --admin, --editor or --api instead of --super (access to everything).

Setup

To reference images correctly, you have to adapt your .env file and set the APP_URL to your real URL, e.g.

APP_URL=http://127.0.0.1:8000

Caution: Make sure, Laravel uses the file session driver in your .env file! Otherwise, the shopping basket content won't get stored correctly!

SESSION_DRIVER=file

If your ./public directory isn't writable by your web server, you have to create these directories:

mkdir public/aimeos public/vendor
chmod 777 public/aimeos public/vendor

In a production environment, you should be more specific about the granted permissions!

Test

Then, you should be able to call the catalog list page in your browser. For a quick start, you can use the integrated web server. Simply execute this command in the base directory of your application:

php artisan serve

Frontend

Point your browser to the list page of the shop using:

Note: Integrating the Aimeos package adds some routes like /shop or /admin to your Laravel installation but the home page stays untouched! If you want to add Aimeos to the home page as well, replace the route for "/" in ./routes/web.php by this line:

Route::group(['middleware' => ['web']], function () {
    Route::get('/', '\Aimeos\Shop\Controller\CatalogController@homeAction')->name('aimeos_home');
});

For multi-vendor setups, read the article about multiple shops.

This will display the Aimeos catalog home component on the home page you you get a nice looking shop home page which will look like this:

Aimeos frontend

Backend

If you've still started the internal PHP web server (php artisan serve) you should now open this URL in your browser:

http://127.0.0.1:8000/admin

Enter the e-mail address and the password of the newly created user and press "Login". If you don't get redirected to the admin interface (that depends on the authentication code you've created according to the Laravel documentation), point your browser to the /admin URL again.

Caution: Make sure that you aren't already logged in as a non-admin user! In this case, login won't work because Laravel requires you to log out first.

Aimeos backend

Hints

To simplify development, you should configure to use no content cache. You can do this in the config/shop.php file of your Laravel application by adding these lines at the bottom:

    'madmin' => [
        'cache' => [
            'manager' => [
                'name' => 'None',
            ],
        ],
    ],

License

The Aimeos Laravel package is licensed under the terms of the MIT license and is available for free.

Links

aimeos-laravel's People

Contributors

aimeos avatar bfiessinger avatar defive avatar dev7ch avatar hootlex avatar iamvar avatar imanghafoori1 avatar jbaron-mx avatar juterral avatar kopitar avatar krsriq avatar lukemadhanga avatar scrutinizer-auto-fixer avatar sebastien-vedrine avatar sixxnine avatar sunrise26 avatar tantacula avatar wlsupport avatar xerc avatar zherdev-artem avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

aimeos-laravel's Issues

Aimeos Attribute

Hello, I downloaded the aimeos demo and working on it,
I'm trying to add new products with new images ,colors, width and length but the colors , width and length are not showing on the frontend.
aimeos2
aimeos3

Register new Users and Admins

Hello, I've got once again a question ;)

I've looked in the documentation but didn't find anything about what is needed to register a new User or an Admin.

How is an Admin stored in the DB? Does he have an own Model?

Larvel default currency?

I cannot seem to find where you specify the default currency for the site, It appears to be using EUR even when I have it disabled and only have USD enabled...

Class App\Providers\GateContract does not exist

when i am doing the Laravel/Setup admin interface, the path shows the following error:

ReflectionException in Container.php line 572:
Class App\Providers\GateContract does not exist
in Container.php line 572
at ReflectionParameter->getClass() in Container.php line 572
at Container->addDependencyForCallParameter(object(ReflectionParameter), array(), array()) in Container.php line 533
at Container->getMethodDependencies(array(object(AppServiceProvider), 'boot'), array()) in Container.php line 505
at Container->call(array(object(AppServiceProvider), 'boot')) in Application.php line 757
at Application->bootProvider(object(AppServiceProvider)) in Application.php line 740
at Application->Illuminate\Foundation\{closure}(object(AppServiceProvider), '11')
at array_walk(array(object(EventServiceProvider), object(RoutingServiceProvider), object(AuthServiceProvider), object(CookieServiceProvider), object(DatabaseServiceProvider), object(EncryptionServiceProvider), object(FilesystemServiceProvider), object(FoundationServiceProvider), object(PaginationServiceProvider), object(SessionServiceProvider), object(ViewServiceProvider), object(AppServiceProvider), object(AuthServiceProvider), object(EventServiceProvider), object(RouteServiceProvider), object(ShopServiceProvider)), object(Closure)) in Application.php line 741
at Application->boot() in BootProviders.php line 17
at BootProviders->bootstrap(object(Application)) in Application.php line 203
at Application->bootstrapWith(array('Illuminate\Foundation\Bootstrap\DetectEnvironment', 'Illuminate\Foundation\Bootstrap\LoadConfiguration', 'Illuminate\Foundation\Bootstrap\ConfigureLogging', 'Illuminate\Foundation\Bootstrap\HandleExceptions', 'Illuminate\Foundation\Bootstrap\RegisterFacades', 'Illuminate\Foundation\Bootstrap\RegisterProviders', 'Illuminate\Foundation\Bootstrap\BootProviders')) in Kernel.php line 232
at Kernel->bootstrap() in Kernel.php line 127
at Kernel->sendRequestThroughRouter(object(Request)) in Kernel.php line 99
at Kernel->handle(object(Request)) in index.php line 53


Error while setting up the package

After I run the setup command in he command line, this error appears:

[MW_DB_Exception]
Executing statement "CREATE TABLE "madmin_cache" (
-- Unique id of the cache entry
"id" VARCHAR(255) NOT NULL,
-- site id
"siteid" INTEGER NULL,
-- Expiration time stamp
"expire" DATETIME,
-- Cached value
"value" MEDIUMTEXT NOT NULL,
CONSTRAINT "pk_macac_id_siteid"
PRIMARY KEY ("id", "siteid")
) ENGINE=InnoDB CHARACTER SET = utf8;
" failed: SQLSTATE[42000]: Syntax error or access violation: 1171 All parts of a PRIMARY KEY must be N
OT NULL; if you need NULL in a key, use UNIQUE instead

Do you have an idea if is a problem with the migration itself or with my SQL version?

Problems with admin login

Hi guys I need help with this:

I have a multiple sites aimeos in laravel. It works fine if the admin user is set for all sites. When the admin user is only set for a site it does not allow it to login unless the site is default.

Any ideas are welcome

Thanks

Cesar

Issue running artisan setup command

Hello!

Just installed aimeos for laravel but the setup command fails. I have tried both on my production machine and on my local one, but they fail with the same error. Here is the error:

  [UnexpectedValueException]                                                                      
  DirectoryIterator::__construct(/home/forge/ext): failed to open dir: No such file or directory  



Script php artisan aimeos:setup --option=setup/default/demo:1 handling the post-install-cmd event returned with an error



  [RuntimeException]  
  Error Output:   

Thanks in advance

blank page after install and setup

Hello,

I run Laravel / Aimeos on a shared hoster with composer, after working trough all the installation steps provided in the documentation and adapting the welcome.blade.php file.

only the bootstrap files are loading, the @yields aimeos parts seems not to work, how can i solve this?

thank you!

Rewrite views

Hi,

As I can do to replace the view of list products? There is a method for get all products?

Thanks.

Information about the logger?

aimeos 2016.04.2 if i am not wrong

laravelinstall/vendor/aimeos/aimeos-core/controller/jobs/src/Controller/Jobs/Product/Import/Csv/Standard.php

line

542


            catch( \Exception $e )
            {
                $manager->rollback();

                $msg = sprintf( 'Unable to import product with code "%1$s": %2$s', $code, $e->getMessage() );
                $context->getLogger()->log( $msg );

                $errors++;
            }

i figured my way through the code... we are logging into the madmin_log table. i didn't know. I wish that would have been written down somewhere, or how i can change it as well to log to the logfile.

Number of binds (25) doesn't match the number of markers

I working on Laravel 5.1, I had folow installation after composer update, and fil service provider as suggest then I type command like this in console as below:
php artisan vendor:publish
php artisan migrate
php artisan aimeos:setup --option=setup/default/demo:1

Got Errors like this
Number of binds (25) doesn't match the number of markers in "mshop/customer/manager/address/laravel/item//insert"

Postgres sql installation, command fails `php artisan aimeos:setup --option=setup/default/demo:1`

i follow ur installation guide:
i have laravel 5.1
i use postgres

this is my env file:


APP_ENV=local
APP_DEBUG=true
APP_KEY=BiX2k39vbtTW4sio0ffeAAiuPeNy1t7h

DB_CONNECTION=pgsql
DB_HOST=127.0.0.1
DB_DATABASE=fixturefix
DB_USERNAME=postgres
DB_PASSWORD=postgres123

CACHE_DRIVER=file
SESSION_DRIVER=file
QUEUE_DRIVER=sync

REDIS_HOST=127.0.0.1
REDIS_PASSWORD=null
REDIS_PORT=6379

MAIL_DRIVER=smtp
MAIL_HOST=mailtrap.io
MAIL_PORT=2525
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ENCRYPTION=null

I perform:

php artisan aimeos:setup --option=setup/default/demo:1

i get:

[Aimeos\MW\DB\Exception] SQLSTATE[HY000] [2003] Can't connect to MySQL server on '127.0.0.1' (111)

now if u only support mysql thats fine, but please, tell me, is it because you only support mysql? does nothing of the demo work for postgresql?

Error Output: cp: cannot stat ‘ext

cp -r ext//client/extjs/deploy/ public/packages/aimeos/shop/client/extjs/deploy/
cp: cannot stat ‘ext//client/extjs/deploy/’: No such file or directory
Script cp -r ext//client/extjs/deploy/ public/packages/aimeos/shop/client/extjs/deploy/ handling the post-update-cmd event returned with an error

[RuntimeException]
Error Output: cp: cannot stat ‘ext//client/extjs/deploy/’: No such file or directory

can't access admin 5.2

after successfully login got error InvalidArgumentException in UrlGenerator.php line 307: Route [] not defined.

View [app] not found

Dear developers,

I have been following the steps to install aimeos till the point where i direct to http://127.0.0.1:8000/index.php/list
but the following error appears:

ErrorException in FileViewFinder.php line 137:
View [app] not found. (View: C:\xampp\htdocs\laravel\resources\views\vendor\shop\base.blade.php) (View: C:\xampp\htdocs\laravel\resources\views\vendor\shop\base.blade.php)

please help thanks!

Laravel/Add locale selector failed as "the page you are looking for could not be found"

Background:

versions:

  • ubuntu v14.04.1
  • Homestead 3.19.0-25
  • laravel 5.2
  • aimeos 2016-04
  • PHP 7.0.5-2+deb.sury.org~trusty+1 (cli) ( NTS )

What's done before this error appears

  1. a new laravel5.2 project was created by command "laravel new ..."
  2. aimeos was installed, demo data has been successfully setup
    url "/list" and "/extadm" works well.
  3. instructions on "/docs/User_Manual/Create_the_first_product" have been followed
    One new product has been added with name/category/price.
  4. 2 "name" texts, one with language Chinese and the other with language English.
  5. 2 prices, one is Chinese Yuan, another is US dollar
  6. from Locale panel, two combinations have been added:
  7. Chinese, Chinese Yuan Renminbi
  8. Chinese, US Dollar

So far, so good.
Now, I am trying to open another browser(eg, switch from Chrome to Firefox) to login as another user (not admin) then open ".../list", and I am expecting to see Chinese name and price with CNY or USD instead of default Europe.
I tried many ways but failed and then I read to the document https://aimeos.org/docs/Laravel/Add_locale_selector but strange errors happened. Please see below.

Error Description:

From
https://aimeos.org/docs/Laravel/Add_locale_selector
Changes have been applied to config/shop.php and** 4 templates** under directory resources/views/vendor/shop/... as instructed. Good, new component "locale/select" appeared at 4 pages as expected. Cool! But...

Error happened at section Routes,
After the prefix line was added as below (see bold line):

        'account' => array(
**_         'prefix' => '{locale}/{currency}',_**
            'middleware' => ['web', 'auth'],
            ),

then go to the page "/myaccount", error was reported as below:

Sorry, the page you are looking for could not be found.
1/1 NotFoundHttpException in RouteCollection.php line 161:

    in RouteCollection.php line 161
    at RouteCollection->match(object(Request)) in Router.php line 823
    at Router->findRoute(object(Request)) in Router.php line 691
    at Router->dispatchToRoute(object(Request)) in Router.php line 675
    at Router->dispatch(object(Request)) in Kernel.php line 246
    at Kernel->Illuminate\Foundation\Http\{closure}(object(Request))
    at call_user_func(object(Closure), object(Request)) in Pipeline.php line 52
    at Pipeline->Illuminate\Routing\{closure}(object(Request)) in CheckForMaintenanceMode.php line 44
    at CheckForMaintenanceMode->handle(object(Request), object(Closure))
    at call_user_func_array(array(object(CheckForMaintenanceMode), 'handle'), array(object(Request), object(Closure))) in Pipeline.php line 136
    at Pipeline->Illuminate\Pipeline\{closure}(object(Request))
    at call_user_func(object(Closure), object(Request)) in Pipeline.php line 32
    at Pipeline->Illuminate\Routing\{closure}(object(Request))
    at call_user_func(object(Closure), object(Request)) in Pipeline.php line 102
    at Pipeline->then(object(Closure)) in Kernel.php line 132
    at Kernel->sendRequestThroughRouter(object(Request)) in Kernel.php line 99
    at Kernel->handle(object(Request)) in index.php line 53

After the prefix line was commented out, the route "myaccount" could be visited once again.

But unexpected point still exists:

  • The new component _"locale/select" _ appeared and it could be operated against.
  • after the above component was clicked, "Chinese" and "CNY" selected, the URL line in browser changed to: .../myaccount?locale=zh&currency=CNY
  • the articles shown in the page is still in orignal language/currency(English/Europe) and the selection does not take effect.

Please have a check, thanks.

Problem with routes auth

Hi,

I have this error when I access routes authorization (auth/login, auth/register. etc.)

NotFoundHttpException in RouteCollection.php line 161:

Thanks!

php artisan vendor:publish not publishing any files

HI
I created a new laravel project and installed aimeos using steps from documentation. Post composer update no fioles are published to config folder.

here is my composer .json

{
    "name": "laravel/laravel",
    "description": "The Laravel Framework.",
    "keywords": ["framework", "laravel"],
    "license": "MIT",
    "type": "project",
    "prefer-stable": true,
    "minimum-stability": "dev",

    "require": {
        "php": ">=5.5.9",
         "aimeos/aimeos-laravel": "~2016.04",
        "laravel/framework": "5.2.*"
    },
    "require-dev": {
        "fzaninotto/faker": "~1.4",
        "mockery/mockery": "0.9.*",
        "phpunit/phpunit": "~4.0",
        "symfony/css-selector": "2.8.*|3.0.*",
        "symfony/dom-crawler": "2.8.*|3.0.*"
    },
    "autoload": {
        "classmap": [
            "database"
        ],
        "psr-4": {
            "App\\": "app/"
        }
    },
    "autoload-dev": {
        "classmap": [
            "tests/TestCase.php"
        ]
    },
    "scripts": {
        "post-root-package-install": [
            "php -r \"copy('.env.example', '.env');\""
        ],
        "post-create-project-cmd": [
            "php artisan key:generate"
        ],
        "post-install-cmd": [
            "Illuminate\\Foundation\\ComposerScripts::postInstall",
            "php artisan optimize"
        ],
        "post-update-cmd": [
        "php artisan vendor:publish --tag=public --force",
            "php artisan vendor:publish",
            "php artisan migrate",
            "Illuminate\\Foundation\\ComposerScripts::postUpdate",

            "php artisan optimize"
        ]
    },
    "config": {
        "preferred-install": "dist"
    }

}

Following is the output from composer update

D:\trainings\aimeos-demo>composer update
Loading composer repositories with package information
Updating dependencies (including require-dev)
Nothing to install or update
Writing lock file
Generating autoload files
> php artisan vendor:publish --tag=public --force
Nothing to publish for tag [public].
> php artisan vendor:publish
Nothing to publish for tag [].
> php artisan migrate
Nothing to migrate.
> Illuminate\Foundation\ComposerScripts::postUpdate
> php artisan optimize
Generating optimized class loader

Error when trying to create admin user

I'm using Laravel 5.2, "aimeos/aimeos-laravel": "~2016.01", when trying to run the below command to create admin user.

php artisan aimeos:account [email protected] --admin

I get the below error:

** [Aimeos\MW\DB\Exception]
Executing statement "
INSERT INTO "mshop_customer" (
"siteid", "label", "code", "company", "vatid", "salutation", "title",
"firstname", "lastname", "address1", "address2", "address3",
"postal", "city", "state", "countryid", "langid", "telephone",
"email", "telefax", "website", "birthday", "status", "vdate",
"password", "mtime", "editor", "ctime"
) VALUES (
NULL,'','[email protected]','','','','','','','','','','','','',NULL,
NULL,'','[email protected]','','',NULL,0,NULL,'$2y$1dsdfdfsdfsfadfdfadfadsfxxxxxxxxUa','2016-04-25 07:40:51','aimeos:account',
'2016-04-25 07:40:51'
) " failed: SQLSTATE[23000]: Integrity constraint violation: 1048 Column 's
iteid' cannot be null **

Import of csv fails `Invalid product lines`

I was following this guide:

https://aimeos.org/docs/Developers/Controller/Import_products_from_CSV

so i downloaded their csv

my setup:
/home/myuser/IdeaProjects/myapp/ff-laravel/database/csvimport/products-import-example.csv

shop.php


  'controller' => array(
    'jobs' => array(
      'product' => array(
        'import' => array(
          'csv' => array(
            'location' => '/home/myuser/IdeaProjects/myapp/ff-laravel/database/csvimport/'

          )
        )
      )
    )
  ),

command:

php artisan aimeos:jobs "product/import/csv" -vvv

error:


Executing the Aimeos jobs for "default"


  [Aimeos\Controller\Jobs\Exception]                                                                    
  Invalid product lines in "/home/myuser/IdeaProjects/myapp/ff-laravel/database/csvimport/": 1/3  


Exception trace:
 () at /home/myuser/IdeaProjects/myapp/ff-laravel/vendor/aimeos/aimeos-core/controller/jobs/src/Controller/Jobs/Product/Import/Csv/Standard.php:369
 Aimeos\Controller\Jobs\Product\Import\Csv\Standard->run() at /home/myuser/IdeaProjects/myapp/ff-laravel/vendor/aimeos/aimeos-laravel/src/Aimeos/Shop/Command/JobsCommand.php:60
 Aimeos\Shop\Command\JobsCommand->fire() at n/a:n/a
 call_user_func_array() at /home/myuser/IdeaProjects/myapp/ff-laravel/vendor/laravel/framework/src/Illuminate/Container/Container.php:507
 Illuminate\Container\Container->call() at /home/myuser/IdeaProjects/myapp/ff-laravel/vendor/laravel/framework/src/Illuminate/Console/Command.php:150
 Illuminate\Console\Command->execute() at /home/myuser/IdeaProjects/myapp/ff-laravel/vendor/symfony/console/Command/Command.php:256
 Symfony\Component\Console\Command\Command->run() at /home/myuser/IdeaProjects/myapp/ff-laravel/vendor/laravel/framework/src/Illuminate/Console/Command.php:136
 Illuminate\Console\Command->run() at /home/myuser/IdeaProjects/myapp/ff-laravel/vendor/symfony/console/Application.php:841
 Symfony\Component\Console\Application->doRunCommand() at /home/myuser/IdeaProjects/myapp/ff-laravel/vendor/symfony/console/Application.php:189
 Symfony\Component\Console\Application->doRun() at /home/myuser/IdeaProjects/myapp/ff-laravel/vendor/symfony/console/Application.php:120
 Symfony\Component\Console\Application->run() at /home/myuser/IdeaProjects/myapp/ff-laravel/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php:107
 Illuminate\Foundation\Console\Kernel->handle() at /home/myuser/IdeaProjects/myapp/ff-laravel/artisan:36


can it be that the example file is not working for us? or is it a different problem, say i set up things wrong or misunderstood the doc?

Error while saving new item

ErrorException in UploadedFile.php line 48: 

Argument 1 passed to Illuminate\Http\UploadedFile::createFromBase() must be an instance of Symfony\Component\HttpFoundation\File\UploadedFile, null given, called in -XAMPP-PATH-\vendor\laravel\framework\src\Illuminate\Http\Request.php on line 415 and defined

    in UploadedFile.php line 48
    at HandleExceptions->handleError('4096', 'Argument 1 passed to Illuminate\Http\UploadedFile::createFromBase() must be an instance of Symfony\Component\HttpFoundation\File\UploadedFile, null given, called in -XAMPP-PATH-\vendor\laravel\framework\src\Illuminate\Http\Request.php on line 415 and defined', '-XAMPP-PATH-\vendor\laravel\framework\src\Illuminate\Http\UploadedFile.php', '48', array()) in UploadedFile.php line 48
    at UploadedFile::createFromBase(null) in Request.php line 415
    at Request->Illuminate\Http\{closure}(null)
    at array_map(object(Closure), array(null)) in Request.php line 416
    at Request->convertUploadedFiles(array(null)) in Request.php line 414
    at Request->Illuminate\Http\{closure}(array(null))
    at array_map(object(Closure), array('files' => array(null))) in Request.php line 416
    at Request->convertUploadedFiles(array('files' => array(null))) in Request.php line 414
    at Request->Illuminate\Http\{closure}(array('files' => array(null)))
    at array_map(object(Closure), array('image' => array('files' => array(null)), 'download' => array('files' => array(null)))) in Request.php line 416
    at Request->convertUploadedFiles(array('image' => array('files' => array(null)), 'download' => array('files' => array(null)))) in Request.php line 401
    at Request->allFiles() in Request.php line 304
    at Request->all() in Facade.php line 215
    at Facade::__callStatic('all', array()) in View.php line 40
    at Input::all() in View.php line 40
    at View->create(object(PHPArray), array('-XAMPP-PATH-\vendor\aimeos\aimeos-core' => array('admin/jqadm/templates')), 'id') in JqadmController.php line 143
    at JqadmController->createClient() in JqadmController.php line 105
    at JqadmController->saveAction('product')
    at call_user_func_array(array(object(JqadmController), 'saveAction'), array('resource' => 'product')) in Controller.php line 76
    at Controller->callAction('saveAction', array('resource' => 'product')) in ControllerDispatcher.php line 146
    at ControllerDispatcher->call(object(JqadmController), object(Route), 'saveAction') in ControllerDispatcher.php line 94
    at ControllerDispatcher->Illuminate\Routing\{closure}(object(Request))
    at call_user_func(object(Closure), object(Request)) in Pipeline.php line 52
    at Pipeline->Illuminate\Routing\{closure}(object(Request))
    at call_user_func(object(Closure), object(Request)) in Pipeline.php line 103
    at Pipeline->then(object(Closure)) in ControllerDispatcher.php line 96
    at ControllerDispatcher->callWithinStack(object(JqadmController), object(Route), object(Request), 'saveAction') in ControllerDispatcher.php line 54
    at ControllerDispatcher->dispatch(object(Route), object(Request), 'Aimeos\Shop\Controller\JqadmController', 'saveAction') in Route.php line 174
    at Route->runController(object(Request)) in Route.php line 140
    at Route->run(object(Request)) in Router.php line 703
    at Router->Illuminate\Routing\{closure}(object(Request))
    at call_user_func(object(Closure), object(Request)) in Pipeline.php line 52
    at Pipeline->Illuminate\Routing\{closure}(object(Request)) in Authenticate.php line 28
    at Authenticate->handle(object(Request), object(Closure))
    at call_user_func_array(array(object(Authenticate), 'handle'), array(object(Request), object(Closure))) in Pipeline.php line 124
    at Pipeline->Illuminate\Pipeline\{closure}(object(Request))
    at call_user_func(object(Closure), object(Request)) in Pipeline.php line 32
    at Pipeline->Illuminate\Routing\{closure}(object(Request)) in VerifyCsrfToken.php line 64
    at VerifyCsrfToken->handle(object(Request), object(Closure))
    at call_user_func_array(array(object(VerifyCsrfToken), 'handle'), array(object(Request), object(Closure))) in Pipeline.php line 124
    at Pipeline->Illuminate\Pipeline\{closure}(object(Request))
    at call_user_func(object(Closure), object(Request)) in Pipeline.php line 32
    at Pipeline->Illuminate\Routing\{closure}(object(Request)) in ShareErrorsFromSession.php line 49
    at ShareErrorsFromSession->handle(object(Request), object(Closure))
    at call_user_func_array(array(object(ShareErrorsFromSession), 'handle'), array(object(Request), object(Closure))) in Pipeline.php line 124
    at Pipeline->Illuminate\Pipeline\{closure}(object(Request))
    at call_user_func(object(Closure), object(Request)) in Pipeline.php line 32
    at Pipeline->Illuminate\Routing\{closure}(object(Request)) in StartSession.php line 62
    at StartSession->handle(object(Request), object(Closure))
    at call_user_func_array(array(object(StartSession), 'handle'), array(object(Request), object(Closure))) in Pipeline.php line 124
    at Pipeline->Illuminate\Pipeline\{closure}(object(Request))
    at call_user_func(object(Closure), object(Request)) in Pipeline.php line 32
    at Pipeline->Illuminate\Routing\{closure}(object(Request)) in AddQueuedCookiesToResponse.php line 37
    at AddQueuedCookiesToResponse->handle(object(Request), object(Closure))
    at call_user_func_array(array(object(AddQueuedCookiesToResponse), 'handle'), array(object(Request), object(Closure))) in Pipeline.php line 124
    at Pipeline->Illuminate\Pipeline\{closure}(object(Request))
    at call_user_func(object(Closure), object(Request)) in Pipeline.php line 32
    at Pipeline->Illuminate\Routing\{closure}(object(Request)) in EncryptCookies.php line 59
    at EncryptCookies->handle(object(Request), object(Closure))
    at call_user_func_array(array(object(EncryptCookies), 'handle'), array(object(Request), object(Closure))) in Pipeline.php line 124
    at Pipeline->Illuminate\Pipeline\{closure}(object(Request))
    at call_user_func(object(Closure), object(Request)) in Pipeline.php line 32
    at Pipeline->Illuminate\Routing\{closure}(object(Request))
    at call_user_func(object(Closure), object(Request)) in Pipeline.php line 103
    at Pipeline->then(object(Closure)) in Router.php line 705
    at Router->runRouteWithinStack(object(Route), object(Request)) in Router.php line 678
    at Router->dispatchToRoute(object(Request)) in Router.php line 654
    at Router->dispatch(object(Request)) in Kernel.php line 246
    at Kernel->Illuminate\Foundation\Http\{closure}(object(Request))
    at call_user_func(object(Closure), object(Request)) in Pipeline.php line 52
    at Pipeline->Illuminate\Routing\{closure}(object(Request)) in CheckForMaintenanceMode.php line 44
    at CheckForMaintenanceMode->handle(object(Request), object(Closure))
    at call_user_func_array(array(object(CheckForMaintenanceMode), 'handle'), array(object(Request), object(Closure))) in Pipeline.php line 124
    at Pipeline->Illuminate\Pipeline\{closure}(object(Request))
    at call_user_func(object(Closure), object(Request)) in Pipeline.php line 32
    at Pipeline->Illuminate\Routing\{closure}(object(Request))
    at call_user_func(object(Closure), object(Request)) in Pipeline.php line 103
    at Pipeline->then(object(Closure)) in Kernel.php line 132
    at Kernel->sendRequestThroughRouter(object(Request)) in Kernel.php line 99
    at Kernel->handle(object(Request)) in index.php line 54

Filled basic and price, then save.
L5.2, Aimeos 2016-01-03

Error running migration

essaporranaofunciona
Hi, I tried to install aimeos from a Laravel fresh install.

I followed all the steps in the instructions but when I ran php artisan migrate of the last step I got the following error

[Illuminate\Database\QueryException]                                                                                                                        
  SQLSTATE[HY000]: General error: 1 Cannot add a NOT NULL column with default value NULL (SQL: alter table "users" add column "salutation" varchar not null) 

Is that a bug on the installation?

Getting sub-item for multiple item at the same time

public function getItem( array $ids, array $ref = array() )
  {
    return $this->getItemBase( 'product.id', $ids, $ref );
  }
 //
  protected function getItemBase($key, array $ids, array $ref = array()) {
    $criteria = $this->createSearch();

    $array = NULL;
    foreach ($ids as $id) {
      $array[] = $criteria->compare('==', $key, $id);
    }

    $criteria->setConditions($criteria->combine('||', $array));
    $items = $this->searchItems($criteria, $ref);

    if (( $item = reset($items) ) === false) {
      throw new \Aimeos\MShop\Exception(sprintf('Item with ID "%2$s" in "%1$s" not found', $key, $id));
    }

    return $item;
  }

Maybe better way if we have IN as condition for query.

array_merge(): Argument #2 is not an array

Hi, i have installed aimeos from composer update and clear. but i get an error to run command php artisan vendor:publish after add providers in .config/app.php

here my error:

screenshot_64

Broken installation in fresh Laravel 5.2

Hi guys,
I just did a fresh install of Laravel 5.2 and added the Aimeos Laravel package on top.
All went well, I also installed the demo package and did not get any errors along the way.

Now, when I go to the "list" route, I get the menu on top and an error in the content section saying "Catalog node for ID "" not available". Not sure if that is how it should be, my guess was that it should show something since the demo data was installed.
Screenshot: http://i.imgur.com/hBcEdjw.jpg

Then I logged in and went into the admin panel, the only thing I see here is this:
http://i.imgur.com/Gh5stiW.jpg
I don't see any Category management or anything else (I kinda expected to see something more).

I then clicked on the "+" icon to add a product, but noticed that none of the links actually work, they point to "http://localhost/jqadm/create/product?site=default&lang=en" although my project is actually installed under "http://localhost/aimeos/public/".

I then went and did some searches regarding these issues and tried to run this command:
php artisan aimeos:jobs catalog/index/rebuild

But it only came back to me with this:
Executing the Aimeos jobs for "default"
[Aimeos\Controller\Jobs\Exception]
Invalid controller "catalog\index\rebuild" in "catalog\index\rebuild"

So probably something is broken there too?

Could you help me figure out what's wrong with my installation?

Thank you!

Admin login error

I am getting following error while login with admin user

eshop

My shop.php file

<?php

return array(

    'routes' => array(
        'routes' => array(
            'login' => array('middleware' => ['web']),
            'admin' => array('middleware' => ['web', 'auth']),
            'account' => array('middleware' => ['web', 'auth']),
            'default' => array('middleware' => ['web']),
            'confirm' => array('middleware' => ['web']),
        ),
    ),

    'page' => array(
        'account-index' => array( 'account/history','account/favorite','account/watch','basket/mini','catalog/session' ),
        'basket-index' => array( 'basket/standard','basket/related' ),
        'catalog-count' => array( 'catalog/count' ),
        'catalog-detail' => array( 'basket/mini','catalog/stage','catalog/detail','catalog/session' ),
        'catalog-list' => array( 'basket/mini','catalog/filter','catalog/stage','catalog/lists' ),
        'catalog-stock' => array( 'catalog/stock' ),
        'catalog-suggest' => array( 'catalog/suggest' ),
        'checkout-confirm' => array( 'checkout/confirm' ),
        'checkout-index' => array( 'checkout/standard' ),
        'checkout-update' => array( 'checkout/update'),
    ),

    'resource' => array(
        'db' => array(
            # 'adapter' => 'mysql',
            # 'host' => env('DB_HOST', 'localhost'),
            # 'port' => env('DB_PORT', ''),
            # 'database' => env('DB_DATABASE', 'laravel'),
            # 'username' => env('DB_USERNAME', 'root'),
            # 'password' => env('DB_PASSWORD', ''),
        ),
    ),

    'client' => array(
        'html' => array(
            'common' => array(
                'content' => array(
                    'baseurl' => '/',
                ),
                'template' => array(
                    # 'baseurl' => 'packages/aimeos/shop/elegance',
                ),
            ),
        ),
    ),

    'controller' => array(
    ),

    'i18n' => array(
    ),

    'madmin' => array(
    ),

    'mshop' => array(
    ),

);

Please help me on this.

Thanks

error php:artisan vendor:publish

sorry, i have an issue about installing the aiemos, i placed the folder Aimeos/Shop/ to App/Providers and modified the providers in the app.php. but when I run the command php artisan vendor:publish it throws me an error

C:\xampp\htdocs\laravel>php artisan vendor:publish

[Symfony\Component\Debug\Exception\FatalErrorException]
Class 'Aimeos\Shop\ShopServiceProvider' not found

I'm a newbie in laravel 5. please help me to install this.. thanks..

categories and product are not showing up on frontend

I have installed this package and all goes well.
but when i add categories and products from backend ,products got added but they are not showing up in frontend.

and one more problem when i run this application on local apache server index.php/list page is showing but when i click on any link it leads to object not found error.

php artisan aimeos:setup --option=setup/default/demo:1

hecking "text/list/type" type data OK
Processing product demo data removed
Processing catalog demo data removed
Processing coupon demo data removed
Processing customer demo data

[MW_DB_Exception]
Executing statement "
SELECT DISTINCT lvu."id", lvu."name" as "label", lvu."name" as "code",
lvu."company", lvu."vatid", lvu."salutation", lvu."title",
lvu."firstname", lvu."lastname", lvu."address1",
lvu."address2", lvu."address3", lvu."postal", lvu."city",
lvu."state", lvu."countryid", lvu."langid",
lvu."telephone", lvu."email", lvu."telefax", lvu."website",
lvu."birthday", lvu."status", lvu."vdate", lvu."password",
lvu."created_at" AS "ctime", lvu."updated_at" AS "mtime", lvu."editor"
FROM "users" AS lvu

        WHERE ( lvu."name" LIKE 'demo-%' )

        LIMIT 100 OFFSET 0
    " failed: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'lvu.company' in 'field list'

Route prefix not working

Hi,

I am using Laravel 5.2.12 and "aimeos/aimeos-laravel": "~2016.01"

I set up everything according to the installation documentation, and was rewarded with a functioning aimeos-laravel application. Thank you!

Now, I am trying to customize my deployment by adding the prefix /store in front of my aimeos routes. Following the aimeos-laravel documentation on the "Custom Routes" page, as per the code example under "Routes for multiple site, languages and currencies", I have updated my config/shop.php to:
'routes' => array(
'login' => array('prefix' => 'store', 'middleware' => ['web']),
'admin' => array('prefix' => 'store', 'middleware' => ['web', 'auth']),
'account' => array('prefix' => 'store', 'middleware' => ['web', 'auth']),
'default' => array('prefix' => 'store', 'middleware' => ['web']),
'confirm' => array('prefix' => 'store', 'middleware' => ['web']),
'update' => array('prefix' => 'store'),
),

When I go to http://mysite.com/store/admin hoping for the login page, I get:
Sorry, the page you are looking for could not be found.
1/1 NotFoundHttpException in RouteCollection.php line 161:

I did see the note: ! You can't add the "site", "locale" and "currency" placeholders to the "admin" routes of the Aimeos package. Does that also apply to a "fixed prefix string"?

Interestingly, even after the config/shop.php prefix update above, http://mysite.com/admin gives me the login page. This implies that the config/shop.php settings aren't being loaded by the config helper function in the aimeos/src/routes.php file.

Btw, before trying this config based approach, I was putting 'prefix' => 'store' directly in the Route::group arrays (with 'middleware' => ['web']) in aimeos/src/routes.php. When I did that, I got a "Session Token not being stored" error. I got lost trying to troubleshoot that one, so instead tried the above config approach. Sadly neither works for me.

Which is broken, me or the code?

Cannot get this to work

After installation, I try to run the frontend and Admin's but get the following errors respectively:

FatalErrorException in View.php line 35: Class 'Input' not found

FatalErrorException in AdminController.php line 31: Class 'Input' not found

What could be the issue?

Error while artian clear compiled

Hey guys,

I have a new problem/question:

I'm trying to run the shop on a shared hosting server and after I run composer update, I get an error relating to the php artisan clear-compiled command:

' file_input_contents(/.../bootstrap/cache/services.json): failed to open stream: No such file or directory'

Do you have any idea why this error appears/why the file is not existing? Have I maybe done something wrong or forgotten something during the setup ?

Kind regards,

ZengineAlex

Aimeos Demo

Hello if i had installed aimeos Laravel Demo could i disable the color and length option if i don't want to use clothes like the demo and keep the demo working correctly with adding to cart and checkout?

FatalErrorException in Base.php line 251

I am using Laravel 5.2 with PHP 5.6.16, wamp server.
Everything works fine until I tried to add an item into basket.
error
Anyone has the same problem as I do? And how to solve this?

Routing from shop views

It's distinctly possible I've missed something, but why are the links in the shop views themselves seemingly hardcoded to (eg) /shop/list instead of the result of url('shop/list') - directly off the webserver root versus off the base url of the laravel install?

For example, from the rendered view source for shop/list,
`



Filter


`

This breaks on my install, which is not directly installed into the web server root, and 404s with "The requested URL /shop/list was not found on this server."

The following didn't work:

  • php artisan aimeos:cache
  • Setting a baseurl manually in config/app.php, then composer dump-autoload, then php artisan aimeos:cache
  • Nuking website install dir from orbit, re-cloning from project repo, reinstalling laravel, reinstalling packages, re-doing aimeos install from scratch

Modifying core html layouts

I am trying to modify the core html layouts. I created an extenion and saved it in laravel ext folder.
Copied the files in vedndor/arcavias-core/client/html/layouts to the new extension folder. How do I make the changes in the ext folder overwrite the ones in the core

installation issue

after following steps for installing and trying to open :
http://127.0.0.1:8000/index.php/list
laravel 5.2

i got this error:
ErrorException in FileViewFinder.php line 137:
View [app] not found. (View: D:\xampp\htdocs\laravel\aimeos-shop\resources\views\vendor\shop\base.blade.php) (View: D:\xampp\htdocs\laravel\aimeos-shop\resources\views\vendor\shop\base.blade.php)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.