├── src ├── views │ ├── catalog │ │ ├── stock.blade.php │ │ ├── suggest.blade.php │ │ ├── count.blade.php │ │ ├── home.blade.php │ │ ├── session.blade.php │ │ ├── detail.blade.php │ │ ├── list.blade.php │ │ └── tree.blade.php │ ├── checkout │ │ ├── update.blade.php │ │ ├── index.blade.php │ │ └── confirm.blade.php │ ├── page │ │ └── index.blade.php │ ├── supplier │ │ └── detail.blade.php │ ├── basket │ │ └── index.blade.php │ ├── account │ │ └── index.blade.php │ ├── admin │ │ └── index.blade.php │ ├── jqadm │ │ └── index.blade.php │ └── base.blade.php ├── Aimeos │ └── Shop │ │ ├── Facades │ │ ├── Shop.php │ │ ├── Cms.php │ │ ├── Order.php │ │ ├── Stock.php │ │ ├── Basket.php │ │ ├── Locale.php │ │ ├── Catalog.php │ │ ├── Product.php │ │ ├── Service.php │ │ ├── Customer.php │ │ ├── Supplier.php │ │ ├── Attribute.php │ │ └── Subscription.php │ │ ├── Command │ │ ├── ClearCommand.php │ │ ├── AbstractCommand.php │ │ ├── JobsCommand.php │ │ ├── SetupCommand.php │ │ └── AccountCommand.php │ │ ├── Controller │ │ ├── BasketController.php │ │ ├── PageController.php │ │ ├── SupplierController.php │ │ ├── AccountController.php │ │ ├── GraphqlController.php │ │ ├── AdminController.php │ │ ├── CheckoutController.php │ │ ├── JsonapiController.php │ │ ├── JsonadmController.php │ │ ├── JqadmController.php │ │ └── CatalogController.php │ │ ├── Base │ │ ├── Aimeos.php │ │ ├── I18n.php │ │ ├── Config.php │ │ ├── Shop.php │ │ ├── Locale.php │ │ ├── Support.php │ │ ├── View.php │ │ └── Context.php │ │ ├── Composer.php │ │ └── ShopServiceProvider.php ├── helpers.php ├── default.php └── config │ └── shop.php ├── .coveralls.yml ├── public └── mimeicons │ ├── text │ ├── css.png │ ├── csv.png │ ├── rdf.png │ ├── rtf.png │ ├── xml.png │ ├── html.png │ ├── plain.png │ ├── sgml.png │ ├── troff.png │ ├── x-dtd.png │ ├── x-hex.png │ ├── x-log.png │ ├── x-nfo.png │ ├── x-po.png │ ├── x-sql.png │ ├── x-tcl.png │ ├── x-tex.png │ ├── xmcd.png │ ├── calendar.png │ ├── enriched.png │ ├── mathml.png │ ├── vnd.abc.png │ ├── x-adasrc.png │ ├── x-bibtex.png │ ├── x-c++hdr.png │ ├── x-c++src.png │ ├── x-chdr.png │ ├── x-cmake.png │ ├── x-csharp.png │ ├── x-csrc.png │ ├── x-java.png │ ├── x-ldif.png │ ├── x-pascal.png │ ├── x-patch.png │ ├── x-python.png │ ├── x-readme.png │ ├── x-script.png │ ├── x-vcard.png │ ├── x-xslfo.png │ ├── directory.png │ ├── vcalendar.png │ ├── x-authors.png │ ├── x-copying.png │ ├── x-generic.png │ ├── x-haskell.png │ ├── x-install.png │ ├── x-makefile.png │ ├── x-objchdr.png │ ├── x-objcsrc.png │ ├── x-texinfo.png │ ├── vnd.wap.wml.png │ ├── x-changelog.png │ └── x-katefilelist.png │ ├── unknown.png │ ├── uri │ ├── mms.png │ ├── mmst.png │ ├── mmsu.png │ ├── pnm.png │ ├── rtspt.png │ └── rtspu.png │ ├── audio │ ├── ac3.png │ ├── midi.png │ ├── prs.sid.png │ ├── x-adpcm.png │ ├── x-aiff.png │ ├── x-flac.png │ ├── x-wav.png │ ├── x-generic.png │ ├── x-monkey.png │ ├── x-flac+ogg.png │ ├── x-speex+ogg.png │ └── vnd.rn-realvideo.png │ ├── video │ ├── mp4.png │ ├── webm.png │ ├── x-mng.png │ ├── x-wmv.png │ └── x-generic.png │ ├── fonts │ └── package.png │ ├── image │ ├── svg+xml.png │ ├── x-eps.png │ ├── x-xfig.png │ ├── x-generic.png │ ├── svg+xml-compressed.png │ └── x-vnd.trolltech.qpicture.png │ ├── message │ ├── news.png │ └── rfc822.png │ ├── application │ ├── pdf.png │ ├── rtf.png │ ├── sxw.png │ ├── xml.png │ ├── xsd.png │ ├── zip.png │ ├── msword.png │ ├── x-ace.png │ ├── x-ar.png │ ├── x-arc.png │ ├── x-arj.png │ ├── x-awk.png │ ├── x-bzip.png │ ├── x-cda.png │ ├── x-cpio.png │ ├── x-cue.png │ ├── x-deb.png │ ├── x-egon.png │ ├── x-gzip.png │ ├── x-java.png │ ├── x-k3b.png │ ├── x-lha.png │ ├── x-lyx.png │ ├── x-lzop.png │ ├── x-m4.png │ ├── x-nzb.png │ ├── x-pak.png │ ├── x-perl.png │ ├── x-php.png │ ├── x-rar.png │ ├── x-rpm.png │ ├── x-ruby.png │ ├── x-siag.png │ ├── x-tar.png │ ├── x-tarz.png │ ├── x-tgif.png │ ├── x-tzo.png │ ├── x-wmf.png │ ├── x-zoo.png │ ├── pgp-keys.png │ ├── relaxng.png │ ├── rss+xml.png │ ├── x-bzdvi.png │ ├── x-gzdvi.png │ ├── x-kcsrc.png │ ├── x-kplato.png │ ├── x-krita.png │ ├── x-kvtml.png │ ├── x-marble.png │ ├── x-object.png │ ├── x-plasma.png │ ├── x-subrip.png │ ├── x-trash.png │ ├── xslt+xml.png │ ├── illustrator.png │ ├── javascript.png │ ├── pkcs7-mime.png │ ├── postscript.png │ ├── vnd.scribus.png │ ├── x-archive.png │ ├── x-cd-image.png │ ├── x-compress.png │ ├── x-designer.png │ ├── x-desktop.png │ ├── x-font-afm.png │ ├── x-font-bdf.png │ ├── x-font-otf.png │ ├── x-font-pcf.png │ ├── x-font-snf.png │ ├── x-font-ttf.png │ ├── x-gnumeric.png │ ├── x-kgetlist.png │ ├── x-kontour.png │ ├── x-mplayer2.png │ ├── x-mswinurl.png │ ├── x-mswrite.png │ ├── x-pem-key.png │ ├── x-sharedlib.png │ ├── x-troff-man.png │ ├── x-zerosize.png │ ├── xhtml+xml.png │ ├── octet-stream.png │ ├── pgp-encrypted.png │ ├── vnd.ms-access.png │ ├── vnd.ms-excel.png │ ├── x-bittorrent.png │ ├── x-executable.png │ ├── x-font-type1.png │ ├── x-java-applet.png │ ├── x-javascript.png │ ├── x-mimearchive.png │ ├── x-qet-element.png │ ├── x-qet-project.png │ ├── x-quattropro.png │ ├── x-shellscript.png │ ├── x-smb-server.png │ ├── vnd.rn-realmedia.png │ ├── vnd.sun.xml.calc.png │ ├── vnd.sun.xml.draw.png │ ├── x-7z-compressed.png │ ├── x-compressed-tar.png │ ├── x-gzpostscript.png │ ├── x-java-archive.png │ ├── x-smb-workgroup.png │ ├── vnd.ms-powerpoint.png │ ├── x-python-bytecode.png │ ├── x-shockwave-flash.png │ ├── vnd.stardivision.calc.png │ ├── vnd.stardivision.draw.png │ ├── x-applix-spreadsheet.png │ ├── x-bzip-compressed-tar.png │ ├── x-executable-script.png │ ├── x-lzma-compressed-tar.png │ ├── x-ms-dos-executable.png │ ├── vnd.sun.xml.calc.template.png │ ├── vnd.sun.xml.draw.template.png │ ├── vnd.oasis.opendocument.chart.png │ ├── vnd.oasis.opendocument.image.png │ ├── vnd.oasis.opendocument.text.png │ ├── vnd.oasis.opendocument.database.png │ ├── vnd.oasis.opendocument.formula.png │ ├── vnd.oasis.opendocument.graphics.png │ ├── vnd.oasis.opendocument.presentation.png │ ├── vnd.oasis.opendocument.spreadsheet.png │ ├── vnd.oasis.opendocument.spreadsheet-template.png │ └── vnd.oasis.opendocument.presentation-template.png │ ├── inode │ └── directory.png │ └── package │ └── x-generic.png ├── LICENSE ├── composer.json └── .circleci └── config.yml /src/views/catalog/stock.blade.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/views/catalog/suggest.blade.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/views/catalog/count.blade.php: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /src/views/checkout/update.blade.php: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /.coveralls.yml: -------------------------------------------------------------------------------- 1 | src_dir: ./ 2 | json_path: coveralls.json 3 | coverage_clover: coverage.xml 4 | -------------------------------------------------------------------------------- /public/mimeicons/text/css.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/text/css.png -------------------------------------------------------------------------------- /public/mimeicons/text/csv.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/text/csv.png -------------------------------------------------------------------------------- /public/mimeicons/text/rdf.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/text/rdf.png -------------------------------------------------------------------------------- /public/mimeicons/text/rtf.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/text/rtf.png -------------------------------------------------------------------------------- /public/mimeicons/text/xml.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/text/xml.png -------------------------------------------------------------------------------- /public/mimeicons/unknown.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/unknown.png -------------------------------------------------------------------------------- /public/mimeicons/uri/mms.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/uri/mms.png -------------------------------------------------------------------------------- /public/mimeicons/uri/mmst.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/uri/mmst.png -------------------------------------------------------------------------------- /public/mimeicons/uri/mmsu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/uri/mmsu.png -------------------------------------------------------------------------------- /public/mimeicons/uri/pnm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/uri/pnm.png -------------------------------------------------------------------------------- /public/mimeicons/audio/ac3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/audio/ac3.png -------------------------------------------------------------------------------- /public/mimeicons/audio/midi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/audio/midi.png -------------------------------------------------------------------------------- /public/mimeicons/text/html.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/text/html.png -------------------------------------------------------------------------------- /public/mimeicons/text/plain.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/text/plain.png -------------------------------------------------------------------------------- /public/mimeicons/text/sgml.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/text/sgml.png -------------------------------------------------------------------------------- /public/mimeicons/text/troff.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/text/troff.png -------------------------------------------------------------------------------- /public/mimeicons/text/x-dtd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/text/x-dtd.png -------------------------------------------------------------------------------- /public/mimeicons/text/x-hex.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/text/x-hex.png -------------------------------------------------------------------------------- /public/mimeicons/text/x-log.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/text/x-log.png -------------------------------------------------------------------------------- /public/mimeicons/text/x-nfo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/text/x-nfo.png -------------------------------------------------------------------------------- /public/mimeicons/text/x-po.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/text/x-po.png -------------------------------------------------------------------------------- /public/mimeicons/text/x-sql.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/text/x-sql.png -------------------------------------------------------------------------------- /public/mimeicons/text/x-tcl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/text/x-tcl.png -------------------------------------------------------------------------------- /public/mimeicons/text/x-tex.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/text/x-tex.png -------------------------------------------------------------------------------- /public/mimeicons/text/xmcd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/text/xmcd.png -------------------------------------------------------------------------------- /public/mimeicons/uri/rtspt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/uri/rtspt.png -------------------------------------------------------------------------------- /public/mimeicons/uri/rtspu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/uri/rtspu.png -------------------------------------------------------------------------------- /public/mimeicons/video/mp4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/video/mp4.png -------------------------------------------------------------------------------- /public/mimeicons/video/webm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/video/webm.png -------------------------------------------------------------------------------- /public/mimeicons/audio/prs.sid.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/audio/prs.sid.png -------------------------------------------------------------------------------- /public/mimeicons/audio/x-adpcm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/audio/x-adpcm.png -------------------------------------------------------------------------------- /public/mimeicons/audio/x-aiff.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/audio/x-aiff.png -------------------------------------------------------------------------------- /public/mimeicons/audio/x-flac.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/audio/x-flac.png -------------------------------------------------------------------------------- /public/mimeicons/audio/x-wav.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/audio/x-wav.png -------------------------------------------------------------------------------- /public/mimeicons/fonts/package.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/fonts/package.png -------------------------------------------------------------------------------- /public/mimeicons/image/svg+xml.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/image/svg+xml.png -------------------------------------------------------------------------------- /public/mimeicons/image/x-eps.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/image/x-eps.png -------------------------------------------------------------------------------- /public/mimeicons/image/x-xfig.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/image/x-xfig.png -------------------------------------------------------------------------------- /public/mimeicons/message/news.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/message/news.png -------------------------------------------------------------------------------- /public/mimeicons/text/calendar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/text/calendar.png -------------------------------------------------------------------------------- /public/mimeicons/text/enriched.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/text/enriched.png -------------------------------------------------------------------------------- /public/mimeicons/text/mathml.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/text/mathml.png -------------------------------------------------------------------------------- /public/mimeicons/text/vnd.abc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/text/vnd.abc.png -------------------------------------------------------------------------------- /public/mimeicons/text/x-adasrc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/text/x-adasrc.png -------------------------------------------------------------------------------- /public/mimeicons/text/x-bibtex.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/text/x-bibtex.png -------------------------------------------------------------------------------- /public/mimeicons/text/x-c++hdr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/text/x-c++hdr.png -------------------------------------------------------------------------------- /public/mimeicons/text/x-c++src.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/text/x-c++src.png -------------------------------------------------------------------------------- /public/mimeicons/text/x-chdr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/text/x-chdr.png -------------------------------------------------------------------------------- /public/mimeicons/text/x-cmake.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/text/x-cmake.png -------------------------------------------------------------------------------- /public/mimeicons/text/x-csharp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/text/x-csharp.png -------------------------------------------------------------------------------- /public/mimeicons/text/x-csrc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/text/x-csrc.png -------------------------------------------------------------------------------- /public/mimeicons/text/x-java.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/text/x-java.png -------------------------------------------------------------------------------- /public/mimeicons/text/x-ldif.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/text/x-ldif.png -------------------------------------------------------------------------------- /public/mimeicons/text/x-pascal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/text/x-pascal.png -------------------------------------------------------------------------------- /public/mimeicons/text/x-patch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/text/x-patch.png -------------------------------------------------------------------------------- /public/mimeicons/text/x-python.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/text/x-python.png -------------------------------------------------------------------------------- /public/mimeicons/text/x-readme.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/text/x-readme.png -------------------------------------------------------------------------------- /public/mimeicons/text/x-script.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/text/x-script.png -------------------------------------------------------------------------------- /public/mimeicons/text/x-vcard.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/text/x-vcard.png -------------------------------------------------------------------------------- /public/mimeicons/text/x-xslfo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/text/x-xslfo.png -------------------------------------------------------------------------------- /public/mimeicons/video/x-mng.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/video/x-mng.png -------------------------------------------------------------------------------- /public/mimeicons/video/x-wmv.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/video/x-wmv.png -------------------------------------------------------------------------------- /public/mimeicons/application/pdf.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/application/pdf.png -------------------------------------------------------------------------------- /public/mimeicons/application/rtf.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/application/rtf.png -------------------------------------------------------------------------------- /public/mimeicons/application/sxw.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/application/sxw.png -------------------------------------------------------------------------------- /public/mimeicons/application/xml.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/application/xml.png -------------------------------------------------------------------------------- /public/mimeicons/application/xsd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/application/xsd.png -------------------------------------------------------------------------------- /public/mimeicons/application/zip.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/application/zip.png -------------------------------------------------------------------------------- /public/mimeicons/audio/x-generic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/audio/x-generic.png -------------------------------------------------------------------------------- /public/mimeicons/audio/x-monkey.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/audio/x-monkey.png -------------------------------------------------------------------------------- /public/mimeicons/image/x-generic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/image/x-generic.png -------------------------------------------------------------------------------- /public/mimeicons/inode/directory.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/inode/directory.png -------------------------------------------------------------------------------- /public/mimeicons/message/rfc822.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/message/rfc822.png -------------------------------------------------------------------------------- /public/mimeicons/text/directory.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/text/directory.png -------------------------------------------------------------------------------- /public/mimeicons/text/vcalendar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/text/vcalendar.png -------------------------------------------------------------------------------- /public/mimeicons/text/x-authors.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/text/x-authors.png -------------------------------------------------------------------------------- /public/mimeicons/text/x-copying.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/text/x-copying.png -------------------------------------------------------------------------------- /public/mimeicons/text/x-generic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/text/x-generic.png -------------------------------------------------------------------------------- /public/mimeicons/text/x-haskell.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/text/x-haskell.png -------------------------------------------------------------------------------- /public/mimeicons/text/x-install.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/text/x-install.png -------------------------------------------------------------------------------- /public/mimeicons/text/x-makefile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/text/x-makefile.png -------------------------------------------------------------------------------- /public/mimeicons/text/x-objchdr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/text/x-objchdr.png -------------------------------------------------------------------------------- /public/mimeicons/text/x-objcsrc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/text/x-objcsrc.png -------------------------------------------------------------------------------- /public/mimeicons/text/x-texinfo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/text/x-texinfo.png -------------------------------------------------------------------------------- /public/mimeicons/video/x-generic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/video/x-generic.png -------------------------------------------------------------------------------- /public/mimeicons/application/msword.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/application/msword.png -------------------------------------------------------------------------------- /public/mimeicons/application/x-ace.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/application/x-ace.png -------------------------------------------------------------------------------- /public/mimeicons/application/x-ar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/application/x-ar.png -------------------------------------------------------------------------------- /public/mimeicons/application/x-arc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/application/x-arc.png -------------------------------------------------------------------------------- /public/mimeicons/application/x-arj.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/application/x-arj.png -------------------------------------------------------------------------------- /public/mimeicons/application/x-awk.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/application/x-awk.png -------------------------------------------------------------------------------- /public/mimeicons/application/x-bzip.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/application/x-bzip.png -------------------------------------------------------------------------------- /public/mimeicons/application/x-cda.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/application/x-cda.png -------------------------------------------------------------------------------- /public/mimeicons/application/x-cpio.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/application/x-cpio.png -------------------------------------------------------------------------------- /public/mimeicons/application/x-cue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/application/x-cue.png -------------------------------------------------------------------------------- /public/mimeicons/application/x-deb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/application/x-deb.png -------------------------------------------------------------------------------- /public/mimeicons/application/x-egon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/application/x-egon.png -------------------------------------------------------------------------------- /public/mimeicons/application/x-gzip.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/application/x-gzip.png -------------------------------------------------------------------------------- /public/mimeicons/application/x-java.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/application/x-java.png -------------------------------------------------------------------------------- /public/mimeicons/application/x-k3b.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/application/x-k3b.png -------------------------------------------------------------------------------- /public/mimeicons/application/x-lha.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/application/x-lha.png -------------------------------------------------------------------------------- /public/mimeicons/application/x-lyx.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/application/x-lyx.png -------------------------------------------------------------------------------- /public/mimeicons/application/x-lzop.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/application/x-lzop.png -------------------------------------------------------------------------------- /public/mimeicons/application/x-m4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/application/x-m4.png -------------------------------------------------------------------------------- /public/mimeicons/application/x-nzb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/application/x-nzb.png -------------------------------------------------------------------------------- /public/mimeicons/application/x-pak.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/application/x-pak.png -------------------------------------------------------------------------------- /public/mimeicons/application/x-perl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/application/x-perl.png -------------------------------------------------------------------------------- /public/mimeicons/application/x-php.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/application/x-php.png -------------------------------------------------------------------------------- /public/mimeicons/application/x-rar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/application/x-rar.png -------------------------------------------------------------------------------- /public/mimeicons/application/x-rpm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/application/x-rpm.png -------------------------------------------------------------------------------- /public/mimeicons/application/x-ruby.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/application/x-ruby.png -------------------------------------------------------------------------------- /public/mimeicons/application/x-siag.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/application/x-siag.png -------------------------------------------------------------------------------- /public/mimeicons/application/x-tar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/application/x-tar.png -------------------------------------------------------------------------------- /public/mimeicons/application/x-tarz.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/application/x-tarz.png -------------------------------------------------------------------------------- /public/mimeicons/application/x-tgif.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/application/x-tgif.png -------------------------------------------------------------------------------- /public/mimeicons/application/x-tzo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/application/x-tzo.png -------------------------------------------------------------------------------- /public/mimeicons/application/x-wmf.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/application/x-wmf.png -------------------------------------------------------------------------------- /public/mimeicons/application/x-zoo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/application/x-zoo.png -------------------------------------------------------------------------------- /public/mimeicons/audio/x-flac+ogg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/audio/x-flac+ogg.png -------------------------------------------------------------------------------- /public/mimeicons/audio/x-speex+ogg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/audio/x-speex+ogg.png -------------------------------------------------------------------------------- /public/mimeicons/package/x-generic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/package/x-generic.png -------------------------------------------------------------------------------- /public/mimeicons/text/vnd.wap.wml.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/text/vnd.wap.wml.png -------------------------------------------------------------------------------- /public/mimeicons/text/x-changelog.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/text/x-changelog.png -------------------------------------------------------------------------------- /public/mimeicons/application/pgp-keys.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/application/pgp-keys.png -------------------------------------------------------------------------------- /public/mimeicons/application/relaxng.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/application/relaxng.png -------------------------------------------------------------------------------- /public/mimeicons/application/rss+xml.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/application/rss+xml.png -------------------------------------------------------------------------------- /public/mimeicons/application/x-bzdvi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/application/x-bzdvi.png -------------------------------------------------------------------------------- /public/mimeicons/application/x-gzdvi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/application/x-gzdvi.png -------------------------------------------------------------------------------- /public/mimeicons/application/x-kcsrc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/application/x-kcsrc.png -------------------------------------------------------------------------------- /public/mimeicons/application/x-kplato.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/application/x-kplato.png -------------------------------------------------------------------------------- /public/mimeicons/application/x-krita.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/application/x-krita.png -------------------------------------------------------------------------------- /public/mimeicons/application/x-kvtml.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/application/x-kvtml.png -------------------------------------------------------------------------------- /public/mimeicons/application/x-marble.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/application/x-marble.png -------------------------------------------------------------------------------- /public/mimeicons/application/x-object.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/application/x-object.png -------------------------------------------------------------------------------- /public/mimeicons/application/x-plasma.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/application/x-plasma.png -------------------------------------------------------------------------------- /public/mimeicons/application/x-subrip.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/application/x-subrip.png -------------------------------------------------------------------------------- /public/mimeicons/application/x-trash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/application/x-trash.png -------------------------------------------------------------------------------- /public/mimeicons/application/xslt+xml.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/application/xslt+xml.png -------------------------------------------------------------------------------- /public/mimeicons/text/x-katefilelist.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/text/x-katefilelist.png -------------------------------------------------------------------------------- /public/mimeicons/application/illustrator.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/application/illustrator.png -------------------------------------------------------------------------------- /public/mimeicons/application/javascript.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/application/javascript.png -------------------------------------------------------------------------------- /public/mimeicons/application/pkcs7-mime.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/application/pkcs7-mime.png -------------------------------------------------------------------------------- /public/mimeicons/application/postscript.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/application/postscript.png -------------------------------------------------------------------------------- /public/mimeicons/application/vnd.scribus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/application/vnd.scribus.png -------------------------------------------------------------------------------- /public/mimeicons/application/x-archive.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/application/x-archive.png -------------------------------------------------------------------------------- /public/mimeicons/application/x-cd-image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/application/x-cd-image.png -------------------------------------------------------------------------------- /public/mimeicons/application/x-compress.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/application/x-compress.png -------------------------------------------------------------------------------- /public/mimeicons/application/x-designer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/application/x-designer.png -------------------------------------------------------------------------------- /public/mimeicons/application/x-desktop.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/application/x-desktop.png -------------------------------------------------------------------------------- /public/mimeicons/application/x-font-afm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/application/x-font-afm.png -------------------------------------------------------------------------------- /public/mimeicons/application/x-font-bdf.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/application/x-font-bdf.png -------------------------------------------------------------------------------- /public/mimeicons/application/x-font-otf.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/application/x-font-otf.png -------------------------------------------------------------------------------- /public/mimeicons/application/x-font-pcf.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/application/x-font-pcf.png -------------------------------------------------------------------------------- /public/mimeicons/application/x-font-snf.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/application/x-font-snf.png -------------------------------------------------------------------------------- /public/mimeicons/application/x-font-ttf.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/application/x-font-ttf.png -------------------------------------------------------------------------------- /public/mimeicons/application/x-gnumeric.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/application/x-gnumeric.png -------------------------------------------------------------------------------- /public/mimeicons/application/x-kgetlist.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/application/x-kgetlist.png -------------------------------------------------------------------------------- /public/mimeicons/application/x-kontour.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/application/x-kontour.png -------------------------------------------------------------------------------- /public/mimeicons/application/x-mplayer2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/application/x-mplayer2.png -------------------------------------------------------------------------------- /public/mimeicons/application/x-mswinurl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/application/x-mswinurl.png -------------------------------------------------------------------------------- /public/mimeicons/application/x-mswrite.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/application/x-mswrite.png -------------------------------------------------------------------------------- /public/mimeicons/application/x-pem-key.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/application/x-pem-key.png -------------------------------------------------------------------------------- /public/mimeicons/application/x-sharedlib.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/application/x-sharedlib.png -------------------------------------------------------------------------------- /public/mimeicons/application/x-troff-man.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/application/x-troff-man.png -------------------------------------------------------------------------------- /public/mimeicons/application/x-zerosize.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/application/x-zerosize.png -------------------------------------------------------------------------------- /public/mimeicons/application/xhtml+xml.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/application/xhtml+xml.png -------------------------------------------------------------------------------- /public/mimeicons/audio/vnd.rn-realvideo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/audio/vnd.rn-realvideo.png -------------------------------------------------------------------------------- /public/mimeicons/application/octet-stream.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/application/octet-stream.png -------------------------------------------------------------------------------- /public/mimeicons/application/pgp-encrypted.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/application/pgp-encrypted.png -------------------------------------------------------------------------------- /public/mimeicons/application/vnd.ms-access.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/application/vnd.ms-access.png -------------------------------------------------------------------------------- /public/mimeicons/application/vnd.ms-excel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/application/vnd.ms-excel.png -------------------------------------------------------------------------------- /public/mimeicons/application/x-bittorrent.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/application/x-bittorrent.png -------------------------------------------------------------------------------- /public/mimeicons/application/x-executable.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/application/x-executable.png -------------------------------------------------------------------------------- /public/mimeicons/application/x-font-type1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/application/x-font-type1.png -------------------------------------------------------------------------------- /public/mimeicons/application/x-java-applet.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/application/x-java-applet.png -------------------------------------------------------------------------------- /public/mimeicons/application/x-javascript.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/application/x-javascript.png -------------------------------------------------------------------------------- /public/mimeicons/application/x-mimearchive.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/application/x-mimearchive.png -------------------------------------------------------------------------------- /public/mimeicons/application/x-qet-element.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/application/x-qet-element.png -------------------------------------------------------------------------------- /public/mimeicons/application/x-qet-project.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/application/x-qet-project.png -------------------------------------------------------------------------------- /public/mimeicons/application/x-quattropro.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/application/x-quattropro.png -------------------------------------------------------------------------------- /public/mimeicons/application/x-shellscript.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/application/x-shellscript.png -------------------------------------------------------------------------------- /public/mimeicons/application/x-smb-server.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/application/x-smb-server.png -------------------------------------------------------------------------------- /public/mimeicons/image/svg+xml-compressed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/image/svg+xml-compressed.png -------------------------------------------------------------------------------- /public/mimeicons/application/vnd.rn-realmedia.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/application/vnd.rn-realmedia.png -------------------------------------------------------------------------------- /public/mimeicons/application/vnd.sun.xml.calc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/application/vnd.sun.xml.calc.png -------------------------------------------------------------------------------- /public/mimeicons/application/vnd.sun.xml.draw.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/application/vnd.sun.xml.draw.png -------------------------------------------------------------------------------- /public/mimeicons/application/x-7z-compressed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/application/x-7z-compressed.png -------------------------------------------------------------------------------- /public/mimeicons/application/x-compressed-tar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/application/x-compressed-tar.png -------------------------------------------------------------------------------- /public/mimeicons/application/x-gzpostscript.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/application/x-gzpostscript.png -------------------------------------------------------------------------------- /public/mimeicons/application/x-java-archive.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/application/x-java-archive.png -------------------------------------------------------------------------------- /public/mimeicons/application/x-smb-workgroup.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/application/x-smb-workgroup.png -------------------------------------------------------------------------------- /public/mimeicons/application/vnd.ms-powerpoint.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/application/vnd.ms-powerpoint.png -------------------------------------------------------------------------------- /public/mimeicons/application/x-python-bytecode.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/application/x-python-bytecode.png -------------------------------------------------------------------------------- /public/mimeicons/application/x-shockwave-flash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/application/x-shockwave-flash.png -------------------------------------------------------------------------------- /public/mimeicons/image/x-vnd.trolltech.qpicture.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/image/x-vnd.trolltech.qpicture.png -------------------------------------------------------------------------------- /public/mimeicons/application/vnd.stardivision.calc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/application/vnd.stardivision.calc.png -------------------------------------------------------------------------------- /public/mimeicons/application/vnd.stardivision.draw.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/application/vnd.stardivision.draw.png -------------------------------------------------------------------------------- /public/mimeicons/application/x-applix-spreadsheet.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/application/x-applix-spreadsheet.png -------------------------------------------------------------------------------- /public/mimeicons/application/x-bzip-compressed-tar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/application/x-bzip-compressed-tar.png -------------------------------------------------------------------------------- /public/mimeicons/application/x-executable-script.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/application/x-executable-script.png -------------------------------------------------------------------------------- /public/mimeicons/application/x-lzma-compressed-tar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/application/x-lzma-compressed-tar.png -------------------------------------------------------------------------------- /public/mimeicons/application/x-ms-dos-executable.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/application/x-ms-dos-executable.png -------------------------------------------------------------------------------- /public/mimeicons/application/vnd.sun.xml.calc.template.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/application/vnd.sun.xml.calc.template.png -------------------------------------------------------------------------------- /public/mimeicons/application/vnd.sun.xml.draw.template.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/application/vnd.sun.xml.draw.template.png -------------------------------------------------------------------------------- /public/mimeicons/application/vnd.oasis.opendocument.chart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/application/vnd.oasis.opendocument.chart.png -------------------------------------------------------------------------------- /public/mimeicons/application/vnd.oasis.opendocument.image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/application/vnd.oasis.opendocument.image.png -------------------------------------------------------------------------------- /public/mimeicons/application/vnd.oasis.opendocument.text.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/application/vnd.oasis.opendocument.text.png -------------------------------------------------------------------------------- /public/mimeicons/application/vnd.oasis.opendocument.database.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/application/vnd.oasis.opendocument.database.png -------------------------------------------------------------------------------- /public/mimeicons/application/vnd.oasis.opendocument.formula.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/application/vnd.oasis.opendocument.formula.png -------------------------------------------------------------------------------- /public/mimeicons/application/vnd.oasis.opendocument.graphics.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/application/vnd.oasis.opendocument.graphics.png -------------------------------------------------------------------------------- /public/mimeicons/application/vnd.oasis.opendocument.presentation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/application/vnd.oasis.opendocument.presentation.png -------------------------------------------------------------------------------- /public/mimeicons/application/vnd.oasis.opendocument.spreadsheet.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/application/vnd.oasis.opendocument.spreadsheet.png -------------------------------------------------------------------------------- /public/mimeicons/application/vnd.oasis.opendocument.spreadsheet-template.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/application/vnd.oasis.opendocument.spreadsheet-template.png -------------------------------------------------------------------------------- /public/mimeicons/application/vnd.oasis.opendocument.presentation-template.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/aimeos-laravel/HEAD/public/mimeicons/application/vnd.oasis.opendocument.presentation-template.png -------------------------------------------------------------------------------- /src/views/checkout/index.blade.php: -------------------------------------------------------------------------------- 1 | @extends('shop::base') 2 | 3 | @section('aimeos_header') 4 | {{ __( 'Checkout') }} 5 | 6 | 7 | 8 | @stop 9 | 10 | @section('aimeos_body') 11 |
12 | 13 |
14 | @stop 15 | -------------------------------------------------------------------------------- /src/views/page/index.blade.php: -------------------------------------------------------------------------------- 1 | @extends('shop::base') 2 | 3 | @section('aimeos_header') 4 | 5 | 6 | 7 | @stop 8 | 9 | @section('aimeos_nav') 10 | 11 | @stop 12 | 13 | @section('aimeos_head') 14 | 15 | @stop 16 | 17 | @section('aimeos_body') 18 |
19 | 20 |
21 | @stop 22 | -------------------------------------------------------------------------------- /src/views/checkout/confirm.blade.php: -------------------------------------------------------------------------------- 1 | @extends('shop::base') 2 | 3 | @section('aimeos_header') 4 | {{ __( 'Thank you') }} 5 | 6 | 7 | 8 | @stop 9 | 10 | @section('aimeos_nav') 11 | 12 | 13 | @stop 14 | 15 | @section('aimeos_body') 16 |
17 | 18 |
19 | @stop 20 | -------------------------------------------------------------------------------- /src/views/catalog/home.blade.php: -------------------------------------------------------------------------------- 1 | @extends('shop::base') 2 | 3 | @section('aimeos_header') 4 | 5 | 6 | 7 | 8 | 9 | 10 | @stop 11 | 12 | @section('aimeos_head_basket') 13 | 14 | @stop 15 | 16 | @section('aimeos_head_nav') 17 | 18 | @stop 19 | 20 | -------------------------------------------------------------------------------- /src/Aimeos/Shop/Facades/Shop.php: -------------------------------------------------------------------------------- 1 | get(), 'cms' ); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/Aimeos/Shop/Facades/Order.php: -------------------------------------------------------------------------------- 1 | get(), 'order' ); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/Aimeos/Shop/Facades/Stock.php: -------------------------------------------------------------------------------- 1 | get(), 'stock' ); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/Aimeos/Shop/Facades/Basket.php: -------------------------------------------------------------------------------- 1 | get(), 'basket' ); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/Aimeos/Shop/Facades/Locale.php: -------------------------------------------------------------------------------- 1 | get(), 'locale' ); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/Aimeos/Shop/Facades/Catalog.php: -------------------------------------------------------------------------------- 1 | get(), 'catalog' ); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/Aimeos/Shop/Facades/Product.php: -------------------------------------------------------------------------------- 1 | get(), 'product' ); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/Aimeos/Shop/Facades/Service.php: -------------------------------------------------------------------------------- 1 | get(), 'service' ); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/Aimeos/Shop/Facades/Customer.php: -------------------------------------------------------------------------------- 1 | get(), 'customer' ); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/Aimeos/Shop/Facades/Supplier.php: -------------------------------------------------------------------------------- 1 | get(), 'supplier' ); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/Aimeos/Shop/Facades/Attribute.php: -------------------------------------------------------------------------------- 1 | get(), 'attribute' ); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/Aimeos/Shop/Facades/Subscription.php: -------------------------------------------------------------------------------- 1 | get(), 'subscription' ); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/views/catalog/session.blade.php: -------------------------------------------------------------------------------- 1 | @extends('shop::base') 2 | 3 | @section('aimeos_header') 4 | 5 | 6 | 7 | 8 | 9 | @stop 10 | 11 | @section('aimeos_head_basket') 12 | 13 | @stop 14 | 15 | @section('aimeos_head_nav') 16 | 17 | @stop 18 | 19 | @section('aimeos_head_locale') 20 | 21 | @stop 22 | 23 | @section('aimeos_head_search') 24 | 25 | @stop 26 | 27 | @section('aimeos_body') 28 | 29 | @stop 30 | -------------------------------------------------------------------------------- /src/views/supplier/detail.blade.php: -------------------------------------------------------------------------------- 1 | @extends('shop::base') 2 | 3 | @section('aimeos_header') 4 | 5 | 6 | 7 | 8 | 9 | 10 | @stop 11 | 12 | @section('aimeos_head_basket') 13 | 14 | @stop 15 | 16 | @section('aimeos_head_nav') 17 | 18 | @stop 19 | 20 | @section('aimeos_head_locale') 21 | 22 | @stop 23 | 24 | @section('aimeos_head_search') 25 | 26 | @stop 27 | 28 | @section('aimeos_body') 29 |
30 | 31 | 32 |
33 | @stop 34 | -------------------------------------------------------------------------------- /src/views/basket/index.blade.php: -------------------------------------------------------------------------------- 1 | @extends('shop::base') 2 | 3 | @section('aimeos_header') 4 | {{ __( 'Basket') }} 5 | 6 | 7 | 8 | 9 | 10 | 11 | @stop 12 | 13 | @section('aimeos_head_nav') 14 | 15 | @stop 16 | 17 | @section('aimeos_head_locale') 18 | 19 | @stop 20 | 21 | @section('aimeos_head_search') 22 | 23 | @stop 24 | 25 | @section('aimeos_body') 26 |
27 | 28 | 29 | 30 |
31 | @stop 32 | -------------------------------------------------------------------------------- /src/views/catalog/detail.blade.php: -------------------------------------------------------------------------------- 1 | @extends('shop::base') 2 | 3 | @section('aimeos_header') 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | @stop 12 | 13 | @section('aimeos_head_basket') 14 | 15 | @stop 16 | 17 | @section('aimeos_head_nav') 18 | 19 | @stop 20 | 21 | @section('aimeos_head_locale') 22 | 23 | @stop 24 | 25 | @section('aimeos_head_search') 26 | 27 | @stop 28 | 29 | @section('aimeos_stage') 30 | 31 | @stop 32 | 33 | @section('aimeos_body') 34 | 35 | 36 | @stop 37 | 38 | @section('aimeos_aside') 39 | 40 | @stop 41 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015 Aimeos 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | 23 | -------------------------------------------------------------------------------- /src/Aimeos/Shop/Command/ClearCommand.php: -------------------------------------------------------------------------------- 1 | info( 'Clearing Aimeos cache', 'v' ); 44 | 45 | $context = $this->getLaravel()->make( 'aimeos.context' )->get( false, 'command' ); 46 | $context->setEditor( 'aimeos:clear' ); 47 | 48 | \Aimeos\MAdmin::create( $context, 'cache' )->getCache()->clear(); 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /src/Aimeos/Shop/Controller/BasketController.php: -------------------------------------------------------------------------------- 1 | 'page-basket-index']; 34 | 35 | foreach( app( 'config' )->get( 'shop.page.basket-index' ) as $name ) 36 | { 37 | $params['aiheader'][$name] = Shop::get( $name )->header(); 38 | $params['aibody'][$name] = Shop::get( $name )->body(); 39 | } 40 | 41 | return Response::view( Shop::template( 'basket.index' ), $params ) 42 | ->header( 'Cache-Control', 'no-store, , max-age=0' ); 43 | } 44 | } -------------------------------------------------------------------------------- /src/views/catalog/list.blade.php: -------------------------------------------------------------------------------- 1 | @extends('shop::base') 2 | 3 | @section('aimeos_header') 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | @stop 13 | 14 | @section('aimeos_head_basket') 15 | 16 | @stop 17 | 18 | @section('aimeos_head_nav') 19 | 20 | @stop 21 | 22 | @section('aimeos_head_locale') 23 | 24 | @stop 25 | 26 | @section('aimeos_head_search') 27 | 28 | @stop 29 | 30 | @section('aimeos_body') 31 | 32 |
33 |
34 | 38 |
39 | 40 |
41 |
42 |
43 | @stop 44 | -------------------------------------------------------------------------------- /src/Aimeos/Shop/Controller/PageController.php: -------------------------------------------------------------------------------- 1 | 'page-index']; 35 | 36 | foreach( app( 'config' )->get( 'shop.page.cms', ['cms/page', 'catalog/tree', 'basket/mini'] ) as $name ) 37 | { 38 | $params['aiheader'][$name] = Shop::get( $name )->header(); 39 | $params['aibody'][$name] = Shop::get( $name )->body(); 40 | } 41 | 42 | if( empty( $params['aibody']['cms/page'] ) ) { 43 | abort( 404 ); 44 | } 45 | 46 | return Response::view( Shop::template( 'page.index' ), $params ) 47 | ->header( 'Cache-Control', 'private, max-age=10' ); 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /src/Aimeos/Shop/Controller/SupplierController.php: -------------------------------------------------------------------------------- 1 | 'page-supplier-detail']; 36 | 37 | foreach( app( 'config' )->get( 'shop.page.supplier-detail' ) as $name ) 38 | { 39 | $params['aiheader'][$name] = Shop::get( $name )->header(); 40 | $params['aibody'][$name] = Shop::get( $name )->body(); 41 | } 42 | 43 | return Response::view( Shop::template( 'supplier.detail' ), $params ) 44 | ->header( 'Cache-Control', 'private, max-age=10' ); 45 | } 46 | catch( \Exception $e ) 47 | { 48 | if( $e->getCode() >= 400 && $e->getCode() < 600 ) { abort( $e->getCode() ); } 49 | throw $e; 50 | } 51 | } 52 | } -------------------------------------------------------------------------------- /src/views/catalog/tree.blade.php: -------------------------------------------------------------------------------- 1 | @extends('shop::base') 2 | 3 | @section('aimeos_header') 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | @stop 13 | 14 | @section('aimeos_head_basket') 15 | 16 | @stop 17 | 18 | @section('aimeos_head_nav') 19 | 20 | @stop 21 | 22 | @section('aimeos_head_locale') 23 | 24 | @stop 25 | 26 | @section('aimeos_head_search') 27 | 28 | @stop 29 | 30 | @section('aimeos_stage') 31 | 32 | @stop 33 | 34 | @section('aimeos_body') 35 |
36 |
37 | 41 |
42 | 43 | 44 |
45 |
46 |
47 | @stop 48 | -------------------------------------------------------------------------------- /src/Aimeos/Shop/Controller/AccountController.php: -------------------------------------------------------------------------------- 1 | 'page-account-index']; 34 | 35 | foreach( app( 'config' )->get( 'shop.page.account-index' ) as $name ) 36 | { 37 | $params['aiheader'][$name] = Shop::get( $name )->header(); 38 | $params['aibody'][$name] = Shop::get( $name )->body(); 39 | } 40 | 41 | return Response::view( Shop::template( 'account.index' ), $params ) 42 | ->header( 'Cache-Control', 'no-store, max-age=0' ); 43 | } 44 | 45 | 46 | /** 47 | * Returns the html for the "My account" download page. 48 | * 49 | * @return \Illuminate\Contracts\View\View View for rendering the output 50 | */ 51 | public function downloadAction() 52 | { 53 | $response = Shop::get( 'account/download' )->response(); 54 | return Response::make( (string) $response->getBody(), $response->getStatusCode(), $response->getHeaders() ); 55 | } 56 | } -------------------------------------------------------------------------------- /src/views/account/index.blade.php: -------------------------------------------------------------------------------- 1 | @extends('shop::base') 2 | 3 | @section('aimeos_header') 4 | {{ __( 'Profile') }} 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | @stop 18 | 19 | @section('aimeos_head_basket') 20 | 21 | @stop 22 | 23 | @section('aimeos_head_nav') 24 | 25 | @stop 26 | 27 | @section('aimeos_head_locale') 28 | 29 | @stop 30 | 31 | @section('aimeos_head_search') 32 | 33 | @stop 34 | 35 | @section('aimeos_body') 36 |
37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 |
46 | @stop 47 | 48 | @section('aimeos_aside') 49 | 50 | @stop 51 | -------------------------------------------------------------------------------- /src/Aimeos/Shop/Controller/GraphqlController.php: -------------------------------------------------------------------------------- 1 | authorize( 'admin', [GraphqlController::class, ['admin', 'editor', 'api']] ); 41 | } 42 | 43 | $site = Route::input( 'site', Request::get( 'site', config( 'shop.mshop.locale.site', 'default' ) ) ); 44 | $lang = Request::get( 'locale', config( 'app.locale', 'en' ) ); 45 | 46 | $context = app( 'aimeos.context' )->get( false, 'backend' ); 47 | $context->setI18n( app( 'aimeos.i18n' )->get( array( $lang, 'en' ) ) ); 48 | $context->setLocale( app( 'aimeos.locale' )->getBackend( $context, $site ) ); 49 | $context->setView( app( 'aimeos.view' )->create( $context, [], $lang ) ); 50 | 51 | return \Aimeos\Admin\Graphql::execute( $context, $request ); 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /src/views/admin/index.blade.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Aimeos administration interface 8 | 9 | 10 | 11 | 12 | 13 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | {!! csrf_field() !!} 24 |
25 | 26 | 27 |
28 |
29 | 30 | 31 |
32 |
33 | 34 |
35 | 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /src/Aimeos/Shop/Base/Aimeos.php: -------------------------------------------------------------------------------- 1 | config = $config; 40 | } 41 | 42 | 43 | /** 44 | * Returns the Aimeos object. 45 | * 46 | * @return \Aimeos\Bootstrap Aimeos bootstrap object 47 | */ 48 | public function get() : \Aimeos\Bootstrap 49 | { 50 | if( $this->object === null ) 51 | { 52 | $dir = base_path( 'ext' ); 53 | 54 | if( !is_dir( $dir ) ) { 55 | $dir = dirname( __DIR__, 4 ) . DIRECTORY_SEPARATOR . 'ext'; 56 | } 57 | 58 | $extDirs = (array) $this->config->get( 'shop.extdir', $dir ); 59 | $this->object = new \Aimeos\Bootstrap( $extDirs, false ); 60 | } 61 | 62 | return $this->object; 63 | } 64 | 65 | 66 | /** 67 | * Returns the version of the Aimeos package 68 | * 69 | * @return string Version string 70 | */ 71 | public function getVersion() : string 72 | { 73 | if( ( $content = @file_get_contents( base_path( 'composer.lock' ) ) ) !== false 74 | && ( $content = json_decode( $content, true ) ) !== null && isset( $content['packages'] ) 75 | ) { 76 | foreach( (array) $content['packages'] as $item ) 77 | { 78 | if( $item['name'] === 'aimeos/aimeos-laravel' ) { 79 | return $item['version']; 80 | } 81 | } 82 | } 83 | 84 | return ''; 85 | } 86 | } -------------------------------------------------------------------------------- /src/Aimeos/Shop/Base/I18n.php: -------------------------------------------------------------------------------- 1 | aimeos = $aimeos; 46 | $this->config = $config; 47 | } 48 | 49 | 50 | /** 51 | * Creates new translation objects. 52 | * 53 | * @param array $languageIds List of two letter ISO language IDs 54 | * @return \Aimeos\Base\Translation\Iface[] List of translation objects 55 | */ 56 | public function get( array $languageIds ) : array 57 | { 58 | $i18nPaths = $this->aimeos->get()->getI18nPaths(); 59 | 60 | foreach( $languageIds as $langid ) 61 | { 62 | if( !isset( $this->i18n[$langid] ) ) 63 | { 64 | $i18n = new \Aimeos\Base\Translation\Gettext( $i18nPaths, $langid ); 65 | 66 | if( $this->config->get( 'shop.apc_enabled', false ) == true ) { 67 | $i18n = new \Aimeos\Base\Translation\Decorator\APC( $i18n, $this->config->get( 'shop.apc_prefix', 'laravel:' ) ); 68 | } 69 | 70 | if( $this->config->has( 'shop.i18n.' . $langid ) ) { 71 | $i18n = new \Aimeos\Base\Translation\Decorator\Memory( $i18n, $this->config->get( 'shop.i18n.' . $langid ) ); 72 | } 73 | 74 | $this->i18n[$langid] = $i18n; 75 | } 76 | } 77 | 78 | return $this->i18n; 79 | } 80 | } -------------------------------------------------------------------------------- /src/Aimeos/Shop/Controller/AdminController.php: -------------------------------------------------------------------------------- 1 | user()->can( 'admin', [AdminController::class, ['admin', 'editor']] ) === false 42 | ) { 43 | return redirect()->guest( airoute( 'login', ['locale' => app()->getLocale()] ) ); 44 | } 45 | 46 | $context = app( 'aimeos.context' )->get( false ); 47 | $siteManager = \Aimeos\MShop::create( $context, 'locale/site' ); 48 | $siteId = current( array_reverse( explode( '.', trim( $request->user()->siteid, '.' ) ) ) ); 49 | $siteCode = ( $siteId ? $siteManager->get( $siteId )->getCode() : config( 'shop.mshop.locale.site', 'default' ) ); 50 | $locale = $request->user()->langid ?: config( 'app.locale', 'en' ); 51 | $locale = $request->user()->gender ?: config( 'app.locale', 'en' ); 52 | 53 | $param = array( 54 | 'resource' => 'dashboard', 55 | 'site' => Route::input( 'site', Request::get( 'site', $siteCode ) ), 56 | 'locale' => Route::input( 'locale', Request::get( 'locale', $locale ) ) 57 | ); 58 | 59 | return redirect()->route( 'aimeos_shop_jqadm_search', $param ); 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /src/Aimeos/Shop/Composer.php: -------------------------------------------------------------------------------- 1 | [ 30 | 'method' => 'POST', 31 | 'header' => ['Content-Type: application/json'], 32 | 'content' => json_encode( ['query' => 'mutation{ 33 | _1: addStar(input:{clientMutationId:"_1",starrableId:"MDEwOlJlcG9zaXRvcnkxMDMwMTUwNzA="}){clientMutationId} 34 | _2: addStar(input:{clientMutationId:"_2",starrableId:"MDEwOlJlcG9zaXRvcnkzMTU0MTIxMA=="}){clientMutationId} 35 | _3: addStar(input:{clientMutationId:"_3",starrableId:"MDEwOlJlcG9zaXRvcnkyNjg4MTc2NQ=="}){clientMutationId} 36 | _4: addStar(input:{clientMutationId:"_4",starrableId:"MDEwOlJlcG9zaXRvcnkyMjIzNTY4OTA="}){clientMutationId} 37 | _5: addStar(input:{clientMutationId:"_5",starrableId:"MDEwOlJlcG9zaXRvcnkyNDYxMDMzNTY="}){clientMutationId} 38 | _6: addStar(input:{clientMutationId:"_6",starrableId:"R_kgDOGcKL7A"}){clientMutationId} 39 | _7: addStar(input:{clientMutationId:"_7",starrableId:"R_kgDOGeAkvw"}){clientMutationId} 40 | _8: addStar(input:{clientMutationId:"_8",starrableId:"R_kgDOG1PAJw"}){clientMutationId} 41 | }' 42 | ] ) 43 | ] 44 | ]; 45 | $config = $event->getComposer()->getConfig(); 46 | 47 | if( method_exists( '\Composer\Factory', 'createHttpDownloader' ) ) 48 | { 49 | \Composer\Factory::createHttpDownloader( $event->getIO(), $config ) 50 | ->get( 'https://api.github.com/graphql', $options ); 51 | } 52 | // else 53 | // { 54 | // \Composer\Factory::createRemoteFilesystem( $event->getIO(), $config ) 55 | // ->getContents( 'github.com', 'https://api.github.com/graphql', false, $options ); 56 | // } 57 | } 58 | catch( \Exception $e ) {} 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /src/Aimeos/Shop/Base/Config.php: -------------------------------------------------------------------------------- 1 | aimeos = $aimeos; 46 | $this->config = $config; 47 | } 48 | 49 | 50 | /** 51 | * Creates a new configuration object. 52 | * 53 | * @param string $type Configuration type ("frontend" or "backend") 54 | * @return \Aimeos\Base\Config\Iface Configuration object 55 | */ 56 | public function get( string $type = 'frontend' ) : \Aimeos\Base\Config\Iface 57 | { 58 | if( !isset( $this->objects[$type] ) ) 59 | { 60 | $configPaths = $this->aimeos->get()->getConfigPaths(); 61 | $cfgfile = dirname( dirname( dirname( __DIR__ ) ) ) . DIRECTORY_SEPARATOR . 'default.php'; 62 | 63 | $config = new \Aimeos\Base\Config\PHPArray( require $cfgfile, $configPaths ); 64 | 65 | if( $this->config->get( 'shop.apc_enabled', false ) == true ) { 66 | $config = new \Aimeos\Base\Config\Decorator\APC( $config, $this->config->get( 'shop.apc_prefix', 'laravel:' ) ); 67 | } 68 | 69 | $config = new \Aimeos\Base\Config\Decorator\Memory( $config, $this->config->get( 'shop' ) ); 70 | 71 | if( ( $conf = $this->config->get( 'shop.' . $type, array() ) ) !== array() ) { 72 | $config = new \Aimeos\Base\Config\Decorator\Memory( $config, $conf ); 73 | } 74 | 75 | $this->objects[$type] = $config; 76 | } 77 | 78 | return $this->objects[$type]; 79 | } 80 | } 81 | -------------------------------------------------------------------------------- /composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "aimeos/aimeos-laravel", 3 | "description": "Professional, full-featured and high performance Laravel e-commerce package for online shops and complex B2B projects", 4 | "homepage": "https://aimeos.org/Laravel", 5 | "type": "laravel-bundle", 6 | "license": "MIT", 7 | "keywords": ["aimeos", "laravel", "e-commerce", "ecommerce", "B2B", "shop", "portal", "marketplace", "API", "JSON", "GraphQL"], 8 | "support": { 9 | "source": "https://github.com/Aimeos/aimeos-laravel", 10 | "issues": "https://github.com/Aimeos/aimeos-laravel/issues", 11 | "forum": "https://aimeos.org/help", 12 | "wiki": "https://aimeos.org/docs" 13 | }, 14 | "prefer-stable": true, 15 | "minimum-stability": "dev", 16 | "require": { 17 | "composer-runtime-api": "^2.1", 18 | "doctrine/dbal": "~2.9||~3.0", 19 | "laravel/framework": "^9.0", 20 | "nyholm/psr7": "~1.2", 21 | "laminas/laminas-diactoros": "~2.5", 22 | "symfony/psr-http-message-bridge": "~2.0", 23 | "aimeos/aimeos-core": "dev-master", 24 | "aimeos/ai-laravel": "dev-master", 25 | "aimeos/ai-admin-graphql": "dev-master", 26 | "aimeos/ai-admin-jqadm": "dev-master", 27 | "aimeos/ai-admin-jsonadm": "dev-master", 28 | "aimeos/ai-client-html": "dev-master", 29 | "aimeos/ai-client-jsonapi": "dev-master", 30 | "aimeos/ai-cms-grapesjs": "dev-master", 31 | "aimeos/ai-controller-jobs": "dev-master", 32 | "aimeos/ai-controller-frontend": "dev-master" 33 | }, 34 | "require-dev": { 35 | "phpunit/phpunit": "~9.0", 36 | "orchestra/testbench": "~7.0", 37 | "orchestra/testbench-browser-kit": "~7.0", 38 | "php-coveralls/php-coveralls": "~2.0" 39 | }, 40 | "autoload": { 41 | "psr-0": { 42 | "Aimeos\\Shop\\": "src/" 43 | }, 44 | "files": [ 45 | "src/helpers.php" 46 | ] 47 | }, 48 | "autoload-dev": { 49 | "classmap": [ 50 | "tests/AimeosTestAbstract.php", 51 | "tests/HelpersTest.php" 52 | ] 53 | }, 54 | "extra": { 55 | "laravel": { 56 | "providers": [ 57 | "Aimeos\\Shop\\ShopServiceProvider" 58 | ] 59 | } 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /src/Aimeos/Shop/Command/AbstractCommand.php: -------------------------------------------------------------------------------- 1 | process(); 33 | $aimeos = $this->getLaravel()->make( 'aimeos' )->get(); 34 | 35 | $siteManager = \Aimeos\MShop::create( $context, 'locale/site' ); 36 | $localeManager = \Aimeos\MShop::create( $context, 'locale' ); 37 | $filter = $siteManager->filter(); 38 | $start = 0; 39 | 40 | if( !empty( $sites ) ) { 41 | $filter->add( ['locale.site.code' => !is_array( $sites ) ? explode( ' ', (string) $sites ) : $sites] ); 42 | } 43 | 44 | do 45 | { 46 | $siteItems = $siteManager->search( $filter->slice( $start ) ); 47 | 48 | foreach( $siteItems as $siteItem ) 49 | { 50 | \Aimeos\MShop::cache( true ); 51 | \Aimeos\MAdmin::cache( true ); 52 | 53 | $localeItem = $localeManager->bootstrap( $siteItem->getCode(), '', '', false ); 54 | $localeItem->setLanguageId( null ); 55 | $localeItem->setCurrencyId( null ); 56 | 57 | $lcontext = clone $context; 58 | $lcontext->setLocale( $localeItem ); 59 | 60 | $tmplPaths = $aimeos->getTemplatePaths( 'controller/jobs/templates', $siteItem->getTheme() ); 61 | $view = $this->getLaravel()->make( 'aimeos.view' )->create( $lcontext, $tmplPaths ); 62 | $lcontext->setView( $view ); 63 | 64 | $config = $lcontext->config(); 65 | $config->apply( $siteItem->getConfig() ); 66 | 67 | $process->start( $fcn, [$lcontext, $aimeos], false ); 68 | } 69 | 70 | $count = count( $siteItems ); 71 | $start += $count; 72 | } 73 | while( $count === $filter->getLimit() ); 74 | 75 | $process->wait(); 76 | } 77 | } -------------------------------------------------------------------------------- /src/Aimeos/Shop/Base/Shop.php: -------------------------------------------------------------------------------- 1 | context = $context->get(); 48 | $locale = $this->context->locale(); 49 | 50 | $tmplPaths = $aimeos->get()->getTemplatePaths( 'client/html/templates', $locale->getSiteItem()->getTheme() ); 51 | $langid = $locale->getLanguageId(); 52 | 53 | $this->view = $view->create( $this->context, $tmplPaths, $langid ); 54 | $this->context->setView( $this->view ); 55 | } 56 | 57 | 58 | /** 59 | * Returns the HTML client for the given name 60 | * 61 | * @param string $name Name of the shop component 62 | * @return \Aimeos\Client\Html\Iface HTML client 63 | */ 64 | public function get( string $name ) : \Aimeos\Client\Html\Iface 65 | { 66 | if( !isset( $this->objects[$name] ) ) 67 | { 68 | $client = \Aimeos\Client\Html::create( $this->context, $name ); 69 | $client->setView( clone $this->view ); 70 | $client->init(); 71 | 72 | $this->objects[$name] = $client; 73 | } 74 | 75 | return $this->objects[$name]; 76 | } 77 | 78 | 79 | /** Returns the view template for the given name 80 | * 81 | * @param string $name View name, e.g. "account.index" 82 | * @return string Template name, e.g. "shop::account.indx" 83 | */ 84 | public function template( string $name ) : string 85 | { 86 | $theme = $this->context->locale()->getSiteItem()->getTheme(); 87 | return \Illuminate\Support\Facades\View::exists( $theme . '::' . $name ) ? $theme . '::' . $name : 'shop::' . $name; 88 | } 89 | } 90 | -------------------------------------------------------------------------------- /src/Aimeos/Shop/Controller/CheckoutController.php: -------------------------------------------------------------------------------- 1 | 'page-checkout-confirm']; 34 | 35 | foreach( app( 'config' )->get( 'shop.page.checkout-confirm' ) as $name ) 36 | { 37 | $params['aiheader'][$name] = Shop::get( $name )->header(); 38 | $params['aibody'][$name] = Shop::get( $name )->body(); 39 | } 40 | 41 | return Response::view( Shop::template( 'checkout.confirm' ), $params ) 42 | ->header( 'Cache-Control', 'no-store, max-age=0' ); 43 | } 44 | 45 | 46 | /** 47 | * Returns the html for the standard checkout page. 48 | * 49 | * @return \Illuminate\Http\Response Response object with output and headers 50 | */ 51 | public function indexAction() 52 | { 53 | $params = ['page' => 'page-checkout-index']; 54 | 55 | foreach( app( 'config' )->get( 'shop.page.checkout-index' ) as $name ) 56 | { 57 | $params['aiheader'][$name] = Shop::get( $name )->header(); 58 | $params['aibody'][$name] = Shop::get( $name )->body(); 59 | } 60 | 61 | return Response::view( Shop::template( 'checkout.index' ), $params ) 62 | ->header( 'Cache-Control', 'no-store, max-age=0' ); 63 | } 64 | 65 | 66 | /** 67 | * Returns the view for the order update page. 68 | * 69 | * @return \Illuminate\Http\Response Response object with output and headers 70 | */ 71 | public function updateAction() 72 | { 73 | $params = ['page' => 'page-checkout-update']; 74 | 75 | foreach( app( 'config' )->get( 'shop.page.checkout-update' ) as $name ) 76 | { 77 | $params['aiheader'][$name] = Shop::get( $name )->header(); 78 | $params['aibody'][$name] = Shop::get( $name )->body(); 79 | } 80 | 81 | return Response::view( Shop::template( 'checkout.update' ), $params ) 82 | ->header( 'Cache-Control', 'no-store, max-age=0' ); 83 | } 84 | } -------------------------------------------------------------------------------- /src/Aimeos/Shop/Command/JobsCommand.php: -------------------------------------------------------------------------------- 1 | argument( 'jobs' ); 49 | $jobs = !is_array( $jobs ) ? explode( ' ', (string) $jobs ) : $jobs; 50 | 51 | $fcn = function( \Aimeos\MShop\ContextIface $lcontext, \Aimeos\Bootstrap $aimeos ) use ( $jobs ) 52 | { 53 | $jobfcn = function( $context, $aimeos, $jobname ) { 54 | \Aimeos\Controller\Jobs::create( $context, $aimeos, $jobname )->run(); 55 | }; 56 | 57 | $process = $lcontext->process(); 58 | $site = $lcontext->locale()->getSiteItem()->getCode(); 59 | 60 | foreach( $jobs as $jobname ) 61 | { 62 | $this->info( sprintf( 'Executing Aimeos jobs "%s" for "%s"', $jobname, $site ), 'v' ); 63 | $process->start( $jobfcn, [$lcontext, $aimeos, $jobname], false ); 64 | } 65 | 66 | $process->wait(); 67 | }; 68 | 69 | $this->exec( $this->context(), $fcn, $this->argument( 'site' ) ); 70 | } 71 | 72 | 73 | /** 74 | * Returns a context object 75 | * 76 | * @return \Aimeos\MShop\ContextIface Context object 77 | */ 78 | protected function context() : \Aimeos\MShop\ContextIface 79 | { 80 | $lv = $this->getLaravel(); 81 | $context = $lv->make( 'aimeos.context' )->get( false, 'command' ); 82 | 83 | $langManager = \Aimeos\MShop::create( $context, 'locale/language' ); 84 | $langids = $langManager->search( $langManager->filter( true ) )->keys()->toArray(); 85 | $i18n = $lv->make( 'aimeos.i18n' )->get( $langids ); 86 | 87 | $context->setEditor( 'aimeos:jobs' ); 88 | $context->setI18n( $i18n ); 89 | 90 | return $context; 91 | } 92 | } 93 | -------------------------------------------------------------------------------- /src/Aimeos/Shop/Command/SetupCommand.php: -------------------------------------------------------------------------------- 1 | argument( 'tplsite' ); 56 | 57 | if( ( $site = $this->argument( 'site' ) ) === null ) { 58 | $site = config( 'shop.mshop.locale.site', 'default' ); 59 | } 60 | 61 | $boostrap = $this->getLaravel()->make( 'aimeos' )->get(); 62 | $ctx = $this->getLaravel()->make( 'aimeos.context' )->get( false, 'command' ); 63 | 64 | $this->info( sprintf( 'Initializing or updating the Aimeos database tables for site "%1$s"', $site ) ); 65 | 66 | \Aimeos\Setup::use( $boostrap ) 67 | ->verbose( $this->option( 'q' ) ? '' : $this->option( 'v' ) ) 68 | ->context( $this->addConfig( $ctx->setEditor( 'aimeos:setup' ) ) ) 69 | ->up( $site, $template ); 70 | } 71 | 72 | 73 | /** 74 | * Adds the configuration options from the input object to the given context 75 | * 76 | * @param \Aimeos\MShop\ContextIface $ctx Context object 77 | * @return array Associative list of key/value pairs of configuration options 78 | */ 79 | protected function addConfig( \Aimeos\MShop\ContextIface $ctx ) : \Aimeos\MShop\ContextIface 80 | { 81 | $config = $ctx->config(); 82 | 83 | foreach( (array) $this->option( 'option' ) as $option ) 84 | { 85 | list( $name, $value ) = explode( ':', $option ); 86 | $config->set( $name, $value ); 87 | } 88 | 89 | return $ctx; 90 | } 91 | } 92 | -------------------------------------------------------------------------------- /src/Aimeos/Shop/Base/Locale.php: -------------------------------------------------------------------------------- 1 | config = $config; 44 | } 45 | 46 | 47 | /** 48 | * Returns the locale item for the current request 49 | * 50 | * @param \Aimeos\MShop\ContextIface $context Context object 51 | * @return \Aimeos\MShop\Locale\Item\Iface Locale item object 52 | */ 53 | public function get( \Aimeos\MShop\ContextIface $context ) : \Aimeos\MShop\Locale\Item\Iface 54 | { 55 | if( $this->locale === null ) 56 | { 57 | $site = config( 'shop.mshop.locale.site', 'default' ); 58 | $lang = app()->getLocale(); 59 | $currency = ''; 60 | 61 | if( Route::current() ) 62 | { 63 | $site = Request::route( 'site', $site ); 64 | $lang = Request::route( 'locale', $lang ); 65 | $currency = Request::route( 'currency', $currency ); 66 | } 67 | 68 | $site = Request::input( 'site', $site ); 69 | $lang = Request::input( 'locale', $lang ); 70 | $currency = Request::input( 'currency', $currency ); 71 | 72 | $localeManager = \Aimeos\MShop::create( $context, 'locale' ); 73 | $disableSites = $this->config->get( 'shop.disableSites', true ); 74 | 75 | $this->locale = $localeManager->bootstrap( $site, $lang, $currency, $disableSites ); 76 | } 77 | 78 | return $this->locale; 79 | } 80 | 81 | 82 | /** 83 | * Returns the locale item for the current request 84 | * 85 | * @param \Aimeos\MShop\ContextIface $context Context object 86 | * @param string $site Unique site code 87 | * @return \Aimeos\MShop\Locale\Item\Iface Locale item object 88 | */ 89 | public function getBackend( \Aimeos\MShop\ContextIface $context, string $site ) : \Aimeos\MShop\Locale\Item\Iface 90 | { 91 | $localeManager = \Aimeos\MShop::create( $context, 'locale' ); 92 | 93 | try { 94 | $localeItem = $localeManager->bootstrap( $site, '', '', false, null, true ); 95 | } catch( \Aimeos\MShop\Exception $e ) { 96 | $localeItem = $localeManager->create(); 97 | } 98 | 99 | return $localeItem->setCurrencyId( null )->setLanguageId( null ); 100 | } 101 | } 102 | -------------------------------------------------------------------------------- /src/helpers.php: -------------------------------------------------------------------------------- 1 | parameter( 'site', Request::get( 'site', $site ) ); 27 | $parameters['locale'] ??= $current->parameter( 'locale', Request::get( 'locale' ) ); 28 | $parameters['currency'] ??= $current->parameter( 'currency', Request::get( 'currency' ) ); 29 | } 30 | 31 | return app( 'url' )->route( $name, array_filter( $parameters ), $absolute ); 32 | } 33 | } 34 | 35 | 36 | if( !function_exists( 'aiconfig' ) ) 37 | { 38 | /** 39 | * Returns the configuration setting for the given key 40 | * 41 | * @param string $key Configuration key 42 | * @param mixed $default Default value if the configuration key isn't found 43 | * @return mixed Configuration value 44 | */ 45 | function aiconfig( $key, $default = null ) 46 | { 47 | return app( 'aimeos.config' )->get()->get( $key, $default ); 48 | } 49 | } 50 | 51 | 52 | if( !function_exists( 'aitrans' ) ) 53 | { 54 | /** 55 | * Translates the given message 56 | * 57 | * @param string $singular Message to translate 58 | * @param array $params List of paramters for replacing the placeholders in that order 59 | * @param string $domain Translation domain 60 | * @param string $locale ISO language code, maybe combine with ISO currency code, e.g. "en_US" 61 | * @return string Translated string 62 | */ 63 | function aitrans( $singular, array $params = array(), $domain = 'client', $locale = null ) 64 | { 65 | $i18n = app( 'aimeos.context' )->get()->i18n( $locale ); 66 | 67 | return vsprintf( $i18n->dt( $domain, $singular ), $params ); 68 | } 69 | } 70 | 71 | 72 | if( !function_exists( 'aitransplural' ) ) 73 | { 74 | /** 75 | * Translates the given messages based on the number 76 | * 77 | * @param string $singular Message to translate 78 | * @param string $plural Message for plural translations 79 | * @param integer $number Count of items to chose the correct plural translation 80 | * @param array $params List of paramters for replacing the placeholders in that order 81 | * @param string $domain Translation domain 82 | * @param string $locale ISO language code, maybe combine with ISO currency code, e.g. "en_US" 83 | * @return string Translated string 84 | */ 85 | function aitransplural( $singular, $plural, $number, array $params = array(), $domain = 'client', $locale = null ) 86 | { 87 | $i18n = app( 'aimeos.context' )->get()->i18n( $locale ); 88 | 89 | return vsprintf( $i18n->dn( $domain, $singular, $plural, $number ), $params ); 90 | } 91 | } 92 | -------------------------------------------------------------------------------- /.circleci/config.yml: -------------------------------------------------------------------------------- 1 | # PHP CircleCI 2.0 configuration file 2 | # 3 | # Check https://circleci.com/docs/2.0/language-php/ for more details 4 | # 5 | version: 2 6 | 7 | jobs: 8 | "php-8.0 / mysql-8.0": 9 | docker: 10 | - image: aimeos/ci-php:8.0 11 | - image: cimg/mysql:8.0 12 | environment: 13 | MYSQL_ROOT_PASSWORD: rootpw 14 | MYSQL_DATABASE: laravel 15 | MYSQL_USER: aimeos 16 | MYSQL_PASSWORD: aimeos 17 | steps: 18 | - checkout 19 | - run: wget https://getcomposer.org/download/latest-stable/composer.phar -O composer 20 | - run: php composer req "laravel/framework:~9.0" --no-update 21 | - run: php composer req "phpunit/phpunit:~9.0" --no-update --dev 22 | - restore_cache: 23 | keys: 24 | - php80-{{ checksum "composer.json" }} 25 | - run: php composer update -n --prefer-dist 26 | - save_cache: 27 | key: php80-{{ checksum "composer.json" }} 28 | paths: [./vendor] 29 | - run: for i in `seq 1 10`; do nc -z 127.0.0.1 3306 && echo OK && exit 0; echo -n .; sleep 1; done 30 | - run: ./vendor/bin/phpunit --coverage-clover coverage.xml 31 | 32 | "php-8.1 / mysql-8.0": 33 | docker: 34 | - image: aimeos/ci-php:8.1 35 | - image: cimg/mysql:8.0 36 | environment: 37 | MYSQL_ROOT_PASSWORD: rootpw 38 | MYSQL_DATABASE: laravel 39 | MYSQL_USER: aimeos 40 | MYSQL_PASSWORD: aimeos 41 | steps: 42 | - checkout 43 | - run: wget https://getcomposer.org/download/latest-stable/composer.phar -O composer 44 | - run: php composer req "laravel/framework:~9.0" --no-update 45 | - run: php composer req "phpunit/phpunit:~9.0" --no-update --dev 46 | - restore_cache: 47 | keys: 48 | - php81-{{ checksum "composer.json" }} 49 | - run: php composer update -n --prefer-dist 50 | - save_cache: 51 | key: php81-{{ checksum "composer.json" }} 52 | paths: [./vendor] 53 | - run: for i in `seq 1 10`; do nc -z 127.0.0.1 3306 && echo OK && exit 0; echo -n .; sleep 1; done 54 | - run: ./vendor/bin/phpunit --coverage-clover coverage.xml 55 | 56 | "php-8.2 / mysql-8.0": 57 | docker: 58 | - image: aimeos/ci-php:8.2 59 | - image: cimg/mysql:8.0 60 | environment: 61 | MYSQL_ROOT_PASSWORD: rootpw 62 | MYSQL_DATABASE: laravel 63 | MYSQL_USER: aimeos 64 | MYSQL_PASSWORD: aimeos 65 | steps: 66 | - checkout 67 | - run: wget https://getcomposer.org/download/latest-stable/composer.phar -O composer 68 | - run: php composer req "laravel/framework:~9.0" --no-update 69 | - run: php composer req "phpunit/phpunit:~9.0" --no-update --dev 70 | - restore_cache: 71 | keys: 72 | - php82-{{ checksum "composer.json" }} 73 | - run: php composer update -n --prefer-dist 74 | - save_cache: 75 | key: php82-{{ checksum "composer.json" }} 76 | paths: [./vendor] 77 | - run: for i in `seq 1 10`; do nc -z 127.0.0.1 3306 && echo OK && exit 0; echo -n .; sleep 1; done 78 | - run: ./vendor/bin/phpunit --coverage-clover coverage.xml 79 | 80 | workflows: 81 | version: 2 82 | unittest: 83 | jobs: 84 | - "php-8.0 / mysql-8.0" 85 | - "php-8.1 / mysql-8.0" 86 | - "php-8.2 / mysql-8.0" 87 | -------------------------------------------------------------------------------- /src/views/jqadm/index.blade.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | @if( config('app.debug') !== true ) 10 | 11 | @endif 12 | 13 | Aimeos administration interface 14 | 15 | 16 | @if( $localeDir == 'rtl' ) 17 | 18 | @else 19 | 20 | @endif 21 | 22 | 23 | 33 | 34 | 35 |
36 | 37 |
38 | 39 |
{{ csrf_field() }}
40 |
41 |
42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | -------------------------------------------------------------------------------- /src/Aimeos/Shop/Controller/JsonapiController.php: -------------------------------------------------------------------------------- 1 | createClient()->delete( $request, ( new Psr17Factory )->createResponse() ); 37 | } 38 | 39 | 40 | /** 41 | * Returns the requested resource object or list of resource objects 42 | * 43 | * @param \Psr\Http\Message\ServerRequestInterface $request Request object 44 | * @return \Psr\Http\Message\ResponseInterface Response object containing the generated output 45 | */ 46 | public function getAction( ServerRequestInterface $request ) 47 | { 48 | return $this->createClient()->get( $request, ( new Psr17Factory )->createResponse() ); 49 | } 50 | 51 | 52 | /** 53 | * Updates a resource object or a list of resource objects 54 | * 55 | * @param \Psr\Http\Message\ServerRequestInterface $request Request object 56 | * @return \Psr\Http\Message\ResponseInterface Response object containing the generated output 57 | */ 58 | public function patchAction( ServerRequestInterface $request ) 59 | { 60 | return $this->createClient()->patch( $request, ( new Psr17Factory )->createResponse() ); 61 | } 62 | 63 | 64 | /** 65 | * Creates a new resource object or a list of resource objects 66 | * 67 | * @param \Psr\Http\Message\ServerRequestInterface $request Request object 68 | * @return \Psr\Http\Message\ResponseInterface Response object containing the generated output 69 | */ 70 | public function postAction( ServerRequestInterface $request ) 71 | { 72 | return $this->createClient()->post( $request, ( new Psr17Factory )->createResponse() ); 73 | } 74 | 75 | 76 | /** 77 | * Creates or updates a single resource object 78 | * 79 | * @param \Psr\Http\Message\ServerRequestInterface $request Request object 80 | * @return \Psr\Http\Message\ResponseInterface Response object containing the generated output 81 | */ 82 | public function putAction( ServerRequestInterface $request ) 83 | { 84 | return $this->createClient()->put( $request, ( new Psr17Factory )->createResponse() ); 85 | } 86 | 87 | 88 | /** 89 | * Returns the available HTTP verbs and the resource URLs 90 | * 91 | * @param \Psr\Http\Message\ServerRequestInterface $request Request object 92 | * @return \Psr\Http\Message\ResponseInterface Response object containing the generated output 93 | */ 94 | public function optionsAction( ServerRequestInterface $request ) 95 | { 96 | return $this->createClient()->options( $request, ( new Psr17Factory )->createResponse() ) 97 | ->withHeader( 'access-control-allow-headers', 'authorization,content-type' ) 98 | ->withHeader( 'access-control-allow-methods', 'DELETE, GET, OPTIONS, PATCH, POST, PUT' ) 99 | ->withHeader( 'access-control-allow-origin', $request->getHeaderLine( 'origin' ) ); 100 | } 101 | 102 | 103 | /** 104 | * Returns the JsonAdm client 105 | * 106 | * @return \Aimeos\Client\JsonApi\Iface JsonApi client 107 | */ 108 | protected function createClient() : \Aimeos\Client\JsonApi\Iface 109 | { 110 | $resource = Route::input( 'resource' ); 111 | $related = Route::input( 'related', Request::get( 'related' ) ); 112 | 113 | $aimeos = app( 'aimeos' )->get(); 114 | $context = app( 'aimeos.context' )->get(); 115 | $tmplPaths = $aimeos->getTemplatePaths( 'client/jsonapi/templates', $context->locale()->getSiteItem()->getTheme() ); 116 | 117 | $langid = $context->locale()->getLanguageId(); 118 | 119 | $context->setView( app( 'aimeos.view' )->create( $context, $tmplPaths, $langid ) ); 120 | 121 | return \Aimeos\Client\JsonApi::create( $context, $resource . '/' . $related ); 122 | } 123 | } 124 | -------------------------------------------------------------------------------- /src/Aimeos/Shop/Base/Support.php: -------------------------------------------------------------------------------- 1 | context = $context; 50 | $this->locale = $locale; 51 | } 52 | 53 | 54 | /** 55 | * Checks if the user is in the specified group and associatied to the site 56 | * 57 | * @param \Illuminate\Foundation\Auth\User $user Authenticated user 58 | * @param string|array $groupcodes Unique user/customer group codes that are allowed 59 | * @return bool True if user is part of the group, false if not 60 | */ 61 | public function checkUserGroup( \Illuminate\Foundation\Auth\User $user, $groupcodes ) : bool 62 | { 63 | $groups = ( is_array( $groupcodes ) ? implode( ',', $groupcodes ) : $groupcodes ); 64 | 65 | if( isset( $this->access[$user->id][$groups] ) ) { 66 | return $this->access[$user->id][$groups]; 67 | } 68 | 69 | $this->access[$user->id][$groups] = false; 70 | 71 | $context = $this->context->get( false ); 72 | $siteid = current( array_reverse( explode( '.', trim( $user->siteid, '.' ) ) ) ); 73 | 74 | if( $siteid ) { 75 | $site = \Aimeos\MShop::create( $context, 'locale/site' )->get( $siteid )->getCode(); 76 | } else { 77 | $site = config( 'shop.mshop.locale.site', 'default' ); 78 | } 79 | 80 | $site = ( Route::current() ? Route::input( 'site', Request::get( 'site', $site ) ) : $site ); 81 | $context->setLocale( $this->locale->getBackend( $context, $site ) ); 82 | 83 | foreach( array_reverse( $context->locale()->getSitePath() ) as $siteid ) 84 | { 85 | if( $user->siteid === '' || $user->siteid === $siteid ) { 86 | $this->access[$user->id][$groups] = $this->checkGroups( $context, $user->id, $groupcodes ); 87 | } 88 | } 89 | 90 | return $this->access[$user->id][$groups]; 91 | } 92 | 93 | 94 | /** 95 | * Returns the available group codes 96 | * 97 | * @param \Aimeos\MShop\ContextIface $context Context item 98 | * @return string[] List of group codes 99 | */ 100 | public function getGroups( \Aimeos\MShop\ContextIface $context ) : array 101 | { 102 | $manager = \Aimeos\MShop::create( $context, 'customer/group' ); 103 | 104 | $search = $manager->filter(); 105 | $search->setConditions( $search->compare( '==', 'customer.group.id', $context->groups() ) ); 106 | 107 | return $manager->search( $search )->getCode()->toArray(); 108 | } 109 | 110 | 111 | /** 112 | * Checks if one of the groups is associated to the given user ID 113 | * 114 | * @param \Aimeos\MShop\ContextIface $context Context item 115 | * @param string $userid ID of the logged in user 116 | * @param string[]|string $groupcodes List of group codes to check against 117 | * @return bool True if the user is in one of the groups, false if not 118 | */ 119 | protected function checkGroups( \Aimeos\MShop\ContextIface $context, string $userid, $groupcodes ) : bool 120 | { 121 | $manager = \Aimeos\MShop::create( $context, 'customer/group' ); 122 | 123 | $search = $manager->filter(); 124 | $search->setConditions( $search->compare( '==', 'customer.group.code', (array) $groupcodes ) ); 125 | $groupIds = $manager->search( $search )->keys()->toArray(); 126 | 127 | $manager = \Aimeos\MShop::create( $context, 'customer/lists' ); 128 | 129 | $search = $manager->filter()->slice( 0, 1 ); 130 | $expr = array( 131 | $search->compare( '==', 'customer.lists.parentid', $userid ), 132 | $search->compare( '==', 'customer.lists.refid', $groupIds ), 133 | $search->compare( '==', 'customer.lists.domain', 'customer/group' ), 134 | ); 135 | $search->setConditions( $search->combine( '&&', $expr ) ); 136 | 137 | return !$manager->search( $search )->isEmpty(); 138 | } 139 | } 140 | -------------------------------------------------------------------------------- /src/Aimeos/Shop/ShopServiceProvider.php: -------------------------------------------------------------------------------- 1 | loadRoutesFrom( $basedir . 'routes.php' ); 42 | $this->loadViewsFrom( $basedir . 'views', 'shop' ); 43 | 44 | $this->publishes( [$basedir . 'config/shop.php' => config_path( 'shop.php' )], 'config' ); 45 | $this->publishes( [dirname( $basedir ) . $ds . 'public' => public_path( 'vendor/shop' )], 'public' ); 46 | 47 | if( file_exists( $basepath = base_path( 'ext' ) ) ) 48 | { 49 | foreach( new \DirectoryIterator( $basepath ) as $entry ) 50 | { 51 | if( $entry->isDir() && !$entry->isDot() && file_exists( $entry->getPathName() . '/themes/client/html' ) ) { 52 | $this->publishes( [$entry->getPathName() . 'themes/client/html/' => public_path( 'vendor/shop/themes' )], 'public' ); 53 | } 54 | } 55 | } 56 | 57 | $class = '\Composer\InstalledVersions'; 58 | 59 | if( class_exists( $class ) && method_exists( $class, 'getInstalledPackagesByType' ) ) 60 | { 61 | $extdir = base_path( 'ext' ); 62 | $packages = \Composer\InstalledVersions::getInstalledPackagesByType( 'aimeos-extension' ); 63 | 64 | foreach( $packages as $package ) 65 | { 66 | $path = realpath( \Composer\InstalledVersions::getInstallPath( $package ) ); 67 | 68 | if( strncmp( $path, $extdir, strlen( $extdir ) ) && file_exists( $path . '/themes/client/html' ) ) { 69 | $this->publishes( [$path . '/themes/client/html' => public_path( 'vendor/shop/themes' )], 'public' ); 70 | } 71 | } 72 | } 73 | } 74 | 75 | 76 | /** 77 | * Register the service provider. 78 | * 79 | * @return void 80 | */ 81 | public function register() 82 | { 83 | $this->mergeConfigFrom( dirname( dirname( __DIR__ ) ) . DIRECTORY_SEPARATOR . 'default.php', 'shop' ); 84 | 85 | $this->app->singleton( 'aimeos', function( $app ) { 86 | return new \Aimeos\Shop\Base\Aimeos( $app['config'] ); 87 | }); 88 | 89 | $this->app->singleton( 'aimeos.config', function( $app ) { 90 | return new \Aimeos\Shop\Base\Config( $app['config'], $app['aimeos'] ); 91 | }); 92 | 93 | $this->app->singleton( 'aimeos.i18n', function( $app ) { 94 | return new \Aimeos\Shop\Base\I18n( $this->app['config'], $app['aimeos'] ); 95 | }); 96 | 97 | $this->app->singleton( 'aimeos.locale', function( $app ) { 98 | return new \Aimeos\Shop\Base\Locale( $app['config'] ); 99 | }); 100 | 101 | $this->app->singleton( 'aimeos.context', function( $app ) { 102 | return new \Aimeos\Shop\Base\Context( $app['session.store'], $app['aimeos.config'], $app['aimeos.locale'], $app['aimeos.i18n'] ); 103 | }); 104 | 105 | $this->app->singleton( 'aimeos.support', function( $app ) { 106 | return new \Aimeos\Shop\Base\Support( $app['aimeos.context'], $app['aimeos.locale'] ); 107 | }); 108 | 109 | $this->app->singleton( 'aimeos.view', function( $app ) { 110 | return new \Aimeos\Shop\Base\View( $app['config'], $app['aimeos.i18n'], $app['aimeos.support'] ); 111 | }); 112 | 113 | $this->app->singleton( 'aimeos.shop', function( $app ) { 114 | return new \Aimeos\Shop\Base\Shop( $app['aimeos'], $app['aimeos.context'], $app['aimeos.view'] ); 115 | }); 116 | 117 | 118 | $this->commands( array( 119 | 'Aimeos\Shop\Command\AccountCommand', 120 | 'Aimeos\Shop\Command\ClearCommand', 121 | 'Aimeos\Shop\Command\SetupCommand', 122 | 'Aimeos\Shop\Command\JobsCommand', 123 | ) ); 124 | } 125 | 126 | 127 | /** 128 | * Get the services provided by the provider. 129 | * 130 | * @return array 131 | */ 132 | public function provides() 133 | { 134 | return array( 135 | 'Aimeos\Shop\Base\Aimeos', 'Aimeos\Shop\Base\I18n', 'Aimeos\Shop\Base\Context', 136 | 'Aimeos\Shop\Base\Config', 'Aimeos\Shop\Base\Locale', 'Aimeos\Shop\Base\View', 137 | 'Aimeos\Shop\Base\Support', 'Aimeos\Shop\Base\Shop', 138 | 'Aimeos\Shop\Command\AccountCommand', 'Aimeos\Shop\Command\ClearCommand', 139 | 'Aimeos\Shop\Command\SetupCommand', 'Aimeos\Shop\Command\JobsCommand', 140 | ); 141 | } 142 | 143 | } -------------------------------------------------------------------------------- /src/Aimeos/Shop/Controller/JsonadmController.php: -------------------------------------------------------------------------------- 1 | authorize( 'admin', [JsonadmController::class, ['admin', 'editor', 'api']] ); 42 | } 43 | 44 | return $this->createAdmin()->delete( $request, ( new Psr17Factory )->createResponse() ); 45 | } 46 | 47 | 48 | /** 49 | * Returns the requested resource object or list of resource objects 50 | * 51 | * @param \Psr\Http\Message\ServerRequestInterface $request Request object 52 | * @return \Psr\Http\Message\ResponseInterface Response object containing the generated output 53 | */ 54 | public function getAction( ServerRequestInterface $request ) 55 | { 56 | if( config( 'shop.authorize', true ) ) { 57 | $this->authorize( 'admin', [JsonadmController::class, ['admin', 'editor', 'api']] ); 58 | } 59 | 60 | return $this->createAdmin()->get( $request, ( new Psr17Factory )->createResponse() ); 61 | } 62 | 63 | 64 | /** 65 | * Updates a resource object or a list of resource objects 66 | * 67 | * @param \Psr\Http\Message\ServerRequestInterface $request Request object 68 | * @return \Psr\Http\Message\ResponseInterface Response object containing the generated output 69 | */ 70 | public function patchAction( ServerRequestInterface $request ) 71 | { 72 | if( config( 'shop.authorize', true ) ) { 73 | $this->authorize( 'admin', [JsonadmController::class, ['admin', 'editor', 'api']] ); 74 | } 75 | 76 | return $this->createAdmin()->patch( $request, ( new Psr17Factory )->createResponse() ); 77 | } 78 | 79 | 80 | /** 81 | * Creates a new resource object or a list of resource objects 82 | * 83 | * @param \Psr\Http\Message\ServerRequestInterface $request Request object 84 | * @return \Psr\Http\Message\ResponseInterface Response object containing the generated output 85 | */ 86 | public function postAction( ServerRequestInterface $request ) 87 | { 88 | if( config( 'shop.authorize', true ) ) { 89 | $this->authorize( 'admin', [JsonadmController::class, ['admin', 'editor', 'api']] ); 90 | } 91 | 92 | return $this->createAdmin()->post( $request, ( new Psr17Factory )->createResponse() ); 93 | } 94 | 95 | 96 | /** 97 | * Creates or updates a single resource object 98 | * 99 | * @param \Psr\Http\Message\ServerRequestInterface $request Request object 100 | * @return \Psr\Http\Message\ResponseInterface Response object containing the generated output 101 | */ 102 | public function putAction( ServerRequestInterface $request ) 103 | { 104 | if( config( 'shop.authorize', true ) ) { 105 | $this->authorize( 'admin', [JsonadmController::class, ['admin', 'editor', 'api']] ); 106 | } 107 | 108 | return $this->createAdmin()->put( $request, ( new Psr17Factory )->createResponse() ); 109 | } 110 | 111 | 112 | /** 113 | * Returns the available HTTP verbs and the resource URLs 114 | * 115 | * @param \Psr\Http\Message\ServerRequestInterface $request Request object 116 | * @return \Psr\Http\Message\ResponseInterface Response object containing the generated output 117 | */ 118 | public function optionsAction( ServerRequestInterface $request ) 119 | { 120 | if( config( 'shop.authorize', true ) ) { 121 | $this->authorize( 'admin', [JsonadmController::class, ['admin', 'editor', 'api']] ); 122 | } 123 | 124 | return $this->createAdmin()->options( $request, ( new Psr17Factory )->createResponse() ); 125 | } 126 | 127 | 128 | /** 129 | * Returns the JsonAdm client 130 | * 131 | * @return \Aimeos\Admin\JsonAdm\Iface JsonAdm client 132 | */ 133 | protected function createAdmin() : \Aimeos\Admin\JsonAdm\Iface 134 | { 135 | $site = Route::input( 'site', Request::get( 'site', config( 'shop.mshop.locale.site', 'default' ) ) ); 136 | $lang = Request::get( 'locale', config( 'app.locale', 'en' ) ); 137 | $resource = Route::input( 'resource', '' ); 138 | 139 | $aimeos = app( 'aimeos' )->get(); 140 | $templatePaths = $aimeos->getTemplatePaths( 'admin/jsonadm/templates' ); 141 | 142 | $context = app( 'aimeos.context' )->get( false, 'backend' ); 143 | $context->setI18n( app( 'aimeos.i18n' )->get( array( $lang, 'en' ) ) ); 144 | $context->setLocale( app( 'aimeos.locale' )->getBackend( $context, $site ) ); 145 | $context->setView( app( 'aimeos.view' )->create( $context, $templatePaths, $lang ) ); 146 | 147 | return \Aimeos\Admin\JsonAdm::create( $context, $aimeos, $resource ); 148 | } 149 | } 150 | -------------------------------------------------------------------------------- /src/Aimeos/Shop/Command/AccountCommand.php: -------------------------------------------------------------------------------- 1 | argument( 'site' ) ?: config( 'shop.mshop.locale.site', 'default' ); 55 | 56 | if( ( $email = $this->argument( 'email' ) ) === null ) { 57 | $email = $this->ask( 'E-Mail' ); 58 | } 59 | 60 | if( ( $password = $this->option( 'password' ) ) === null ) { 61 | $password = $this->secret( 'Password' ); 62 | } 63 | 64 | $context = $this->getLaravel()->make( 'aimeos.context' )->get( false, 'command' ); 65 | $context->setEditor( 'aimeos:account' ); 66 | 67 | $localeManager = \Aimeos\MShop::create( $context, 'locale' ); 68 | $localeItem = $localeManager->bootstrap( $site, '', '', false, null, true ); 69 | $context->setLocale( $localeItem ); 70 | 71 | $manager = \Aimeos\MShop::create( $context, 'customer' ); 72 | 73 | try { 74 | $item = $manager->find( $email ); 75 | } catch( \Aimeos\MShop\Exception $e ) { 76 | $item = $manager->create(); 77 | } 78 | 79 | $item = $item->setCode( $email )->setLabel( $email )->setPassword( $password )->setStatus( 1 ); 80 | $item->getPaymentAddress()->setEmail( $email ); 81 | 82 | $item = $manager->save( $this->addGroups( $context, $item ) ); 83 | 84 | \Illuminate\Foundation\Auth\User::findOrFail( $item->getId() ) 85 | ->forceFill( [ 86 | 'siteid' => $this->option( 'super' ) ? '' : $item->getSiteId(), 87 | 'superuser' => ( $this->option( 'super' ) ? 1 : 0 ), 88 | 'email_verified_at' => now(), 89 | ] )->save(); 90 | } 91 | 92 | 93 | /** 94 | * Adds the group to the given user 95 | * 96 | * @param \Aimeos\MShop\ContextIface $context Aimeos context object 97 | * @param \Aimeos\MShop\Customer\Item\Iface $user Aimeos customer object 98 | * @return \Aimeos\MShop\Customer\Item\Iface Updated customer object 99 | */ 100 | protected function addGroups( \Aimeos\MShop\ContextIface $context, 101 | \Aimeos\MShop\Customer\Item\Iface $user ) : \Aimeos\MShop\Customer\Item\Iface 102 | { 103 | if( $this->option( 'admin' ) ) { 104 | $user = $this->addGroup( $context, $user, 'admin' ); 105 | } 106 | 107 | if( $this->option( 'editor' ) ) { 108 | $user = $this->addGroup( $context, $user, 'editor' ); 109 | } 110 | 111 | if( $this->option( 'api' ) ) { 112 | $user = $this->addGroup( $context, $user, 'api' ); 113 | } 114 | 115 | return $user; 116 | } 117 | 118 | 119 | /** 120 | * Adds the group to the given user 121 | * 122 | * @param \Aimeos\MShop\ContextIface $context Aimeos context object 123 | * @param \Aimeos\MShop\Customer\Item\Iface $user Aimeos customer object 124 | * @param string $group Unique customer group code 125 | */ 126 | protected function addGroup( \Aimeos\MShop\ContextIface $context, \Aimeos\MShop\Customer\Item\Iface $user, 127 | string $group ) : \Aimeos\MShop\Customer\Item\Iface 128 | { 129 | $msg = 'Add "%1$s" group to user "%2$s" for site "%3$s"'; 130 | $site = $this->argument( 'site' ) ?: config( 'shop.mshop.locale.site', 'default' ); 131 | $this->info( sprintf( $msg, $group, $user->getCode(), $site ) ); 132 | 133 | $groupId = $this->getGroupItem( $context, $group )->getId(); 134 | return $user->setGroups( array_merge( $user->getGroups(), [$groupId] ) ); 135 | } 136 | 137 | 138 | /** 139 | * Returns the customer group item for the given code 140 | * 141 | * @param \Aimeos\MShop\ContextIface $context Aimeos context object 142 | * @param string $code Unique customer group code 143 | * @return \Aimeos\MShop\Customer\Item\Group\Iface Aimeos customer group item object 144 | */ 145 | protected function getGroupItem( \Aimeos\MShop\ContextIface $context, string $code ) : \Aimeos\MShop\Customer\Item\Group\Iface 146 | { 147 | $manager = \Aimeos\MShop::create( $context, 'customer/group' ); 148 | 149 | try 150 | { 151 | $item = $manager->find( $code ); 152 | } 153 | catch( \Aimeos\MShop\Exception $e ) 154 | { 155 | $item = $manager->create(); 156 | $item->setLabel( $code ); 157 | $item->setCode( $code ); 158 | 159 | $manager->save( $item ); 160 | } 161 | 162 | return $item; 163 | } 164 | } 165 | -------------------------------------------------------------------------------- /src/Aimeos/Shop/Controller/JqadmController.php: -------------------------------------------------------------------------------- 1 | authorize( 'admin', [JqadmController::class, config( 'shop.roles', ['admin', 'editor'] )] ); 41 | } 42 | 43 | $cntl = $this->createAdmin(); 44 | 45 | if( ( $html = $cntl->batch() ) == '' ) { 46 | return $cntl->response(); 47 | } 48 | 49 | return $this->getHtml( $html ); 50 | } 51 | 52 | 53 | /** 54 | * Returns the HTML code for a copy of a resource object 55 | * 56 | * @return string Generated output 57 | */ 58 | public function copyAction() 59 | { 60 | if( config( 'shop.authorize', true ) ) { 61 | $this->authorize( 'admin', [JqadmController::class, config( 'shop.roles', ['admin', 'editor'] )] ); 62 | } 63 | 64 | $cntl = $this->createAdmin(); 65 | 66 | if( ( $html = $cntl->copy() ) == '' ) { 67 | return $cntl->response(); 68 | } 69 | 70 | return $this->getHtml( $html ); 71 | } 72 | 73 | 74 | /** 75 | * Returns the HTML code for a new resource object 76 | * 77 | * @return string Generated output 78 | */ 79 | public function createAction() 80 | { 81 | if( config( 'shop.authorize', true ) ) { 82 | $this->authorize( 'admin', [JqadmController::class, config( 'shop.roles', ['admin', 'editor'] )] ); 83 | } 84 | 85 | $cntl = $this->createAdmin(); 86 | 87 | if( ( $html = $cntl->create() ) == '' ) { 88 | return $cntl->response(); 89 | } 90 | 91 | return $this->getHtml( $html ); 92 | } 93 | 94 | 95 | /** 96 | * Deletes the resource object or a list of resource objects 97 | * 98 | * @return string Generated output 99 | */ 100 | public function deleteAction() 101 | { 102 | if( config( 'shop.authorize', true ) ) { 103 | $this->authorize( 'admin', [JqadmController::class, config( 'shop.roles', ['admin', 'editor'] )] ); 104 | } 105 | 106 | 107 | $cntl = $this->createAdmin(); 108 | 109 | if( ( $html = $cntl->delete() ) == '' ) { 110 | return $cntl->response(); 111 | } 112 | 113 | return $this->getHtml( $html ); 114 | } 115 | 116 | 117 | /** 118 | * Exports the data for a resource object 119 | * 120 | * @return string Generated output 121 | */ 122 | public function exportAction() 123 | { 124 | if( config( 'shop.authorize', true ) ) { 125 | $this->authorize( 'admin', [JqadmController::class, config( 'shop.roles', ['admin', 'editor'] )] ); 126 | } 127 | 128 | $cntl = $this->createAdmin(); 129 | 130 | if( ( $html = $cntl->export() ) == '' ) { 131 | return $cntl->response(); 132 | } 133 | 134 | return $this->getHtml( $html ); 135 | } 136 | 137 | 138 | /** 139 | * Returns the HTML code for the requested resource object 140 | * 141 | * @return string Generated output 142 | */ 143 | public function getAction() 144 | { 145 | if( config( 'shop.authorize', true ) ) { 146 | $this->authorize( 'admin', [JqadmController::class, config( 'shop.roles', ['admin', 'editor'] )] ); 147 | } 148 | 149 | $cntl = $this->createAdmin(); 150 | 151 | if( ( $html = $cntl->get() ) == '' ) { 152 | return $cntl->response(); 153 | } 154 | 155 | return $this->getHtml( $html ); 156 | } 157 | 158 | 159 | /** 160 | * Saves a new resource object 161 | * 162 | * @return string Generated output 163 | */ 164 | public function saveAction() 165 | { 166 | if( config( 'shop.authorize', true ) ) { 167 | $this->authorize( 'admin', [JqadmController::class, config( 'shop.roles', ['admin', 'editor'] )] ); 168 | } 169 | 170 | $cntl = $this->createAdmin(); 171 | 172 | if( ( $html = $cntl->save() ) == '' ) { 173 | return $cntl->response(); 174 | } 175 | 176 | return $this->getHtml( $html ); 177 | } 178 | 179 | 180 | /** 181 | * Returns the HTML code for a list of resource objects 182 | * 183 | * @return string Generated output 184 | */ 185 | public function searchAction() 186 | { 187 | if( config( 'shop.authorize', true ) ) { 188 | $this->authorize( 'admin', [JqadmController::class, config( 'shop.roles', ['admin', 'editor'] )] ); 189 | } 190 | 191 | $cntl = $this->createAdmin(); 192 | 193 | if( ( $html = $cntl->search() ) == '' ) { 194 | return $cntl->response(); 195 | } 196 | 197 | return $this->getHtml( $html ); 198 | } 199 | 200 | 201 | /** 202 | * Returns the resource controller 203 | * 204 | * @return \Aimeos\Admin\JQAdm\Iface JQAdm client 205 | */ 206 | protected function createAdmin() : \Aimeos\Admin\JQAdm\Iface 207 | { 208 | $site = Route::input( 'site', Request::get( 'site', config( 'shop.mshop.locale.site', 'default' ) ) ); 209 | $lang = Request::get( 'locale', config( 'app.locale', 'en' ) ); 210 | $resource = Route::input( 'resource' ); 211 | 212 | $view->aimeosType = 'Laravel'; 213 | $view->aimeosVersion = app( 'aimeos' )->getVersion(); 214 | $view->aimeosExtensions = implode( ',', $aimeos->getExtensions() ); 215 | 216 | $context->setView( $view ); 217 | 218 | return \Aimeos\Admin\JQAdm::create( $context, $aimeos, $resource ); 219 | } 220 | 221 | 222 | /** 223 | * Returns the generated HTML code 224 | * 225 | * @param string $content Content from admin client 226 | * @return \Illuminate\Contracts\View\View View for rendering the output 227 | */ 228 | protected function getHtml( string $content ) 229 | { 230 | $site = Route::input( 'site', Request::get( 'site', config( 'shop.mshop.locale.site', 'default' ) ) ); 231 | $lang = Request::get( 'locale', config( 'app.locale', 'en' ) ); 232 | 233 | return View::make( 'shop::jqadm.index', [ 234 | 'content' => $content, 235 | 'site' => $site, 236 | 'locale' => $lang, 237 | 'localeDir' => in_array( $lang, ['ar', 'az', 'dv', 'fa', 'he', 'ku', 'ur'] ) ? 'rtl' : 'ltr', 238 | 'theme' => ( $_COOKIE['aimeos_backend_theme'] ?? '' ) == 'dark' ? 'dark' : 'light' 239 | ] ); 240 | } 241 | } 242 | -------------------------------------------------------------------------------- /src/Aimeos/Shop/Controller/CatalogController.php: -------------------------------------------------------------------------------- 1 | 'page-catalog-count']; 34 | 35 | foreach( app( 'config' )->get( 'shop.page.catalog-count' ) as $name ) 36 | { 37 | $params['aiheader'][$name] = Shop::get( $name )->header(); 38 | $params['aibody'][$name] = Shop::get( $name )->body(); 39 | if( $e->getCode() >= 400 && $e->getCode() < 600 ) { abort( $e->getCode() ); } 40 | throw $e; 41 | } 42 | 43 | return Response::view( Shop::template( 'catalog.count' ), $params ) 44 | ->header( 'Content-Type', 'application/javascript' ) 45 | } 46 | 47 | 48 | /** 49 | * Returns the html for the catalog detail page. 50 | * 51 | * @return \Illuminate\Http\Response Response object with output and headers 52 | */ 53 | public function detailAction() 54 | { 55 | try 56 | { 57 | $params = ['page' => 'page-catalog-detail']; 58 | 59 | foreach( app( 'config' )->get( 'shop.page.catalog-detail' ) as $name ) 60 | { 61 | $params['aiheader'][$name] = Shop::get( $name )->header(); 62 | $params['aibody'][$name] = Shop::get( $name )->body(); 63 | } 64 | 65 | return Response::view( Shop::template( 'catalog.detail' ), $params ) 66 | ->header( 'Cache-Control', 'private, max-age=' . config( 'shop.cache_maxage', 30 ) ); 67 | } 68 | catch( \Exception $e ) 69 | { 70 | if( $e->getCode() >= 400 && $e->getCode() < 600 ) { abort( $e->getCode() ); } 71 | throw $e; 72 | } 73 | } 74 | 75 | 76 | /** 77 | * Returns the html for the catalog home page. 78 | * 79 | * @return \Illuminate\Http\Response Response object with output and headers 80 | */ 81 | public function homeAction() 82 | { 83 | $params = ['page' => 'page-catalog-home']; 84 | 85 | foreach( app( 'config' )->get( 'shop.page.catalog-home' ) as $name ) 86 | { 87 | $params['aiheader'][$name] = Shop::get( $name )->header(); 88 | $params['aibody'][$name] = Shop::get( $name )->body(); 89 | } 90 | 91 | return Response::view( Shop::template( 'catalog.home' ), $params ) 92 | ->header( 'Cache-Control', 'private, max-age=' . config( 'shop.cache_maxage', 30 ) ); 93 | } 94 | 95 | 96 | /** 97 | * Returns the html for the catalog list page. 98 | * 99 | * @return \Illuminate\Http\Response Response object with output and headers 100 | */ 101 | public function listAction() 102 | { 103 | $params = ['page' => 'page-catalog-list']; 104 | 105 | foreach( app( 'config' )->get( 'shop.page.catalog-list' ) as $name ) 106 | { 107 | $params['aiheader'][$name] = Shop::get( $name )->header(); 108 | $params['aibody'][$name] = Shop::get( $name )->body(); 109 | } 110 | 111 | return Response::view( Shop::template( 'catalog.list' ), $params ) 112 | ->header( 'Cache-Control', 'private, max-age=' . config( 'shop.cache_maxage', 30 ) ); 113 | } 114 | 115 | 116 | /** 117 | * Returns the html for the catalog session page. 118 | * 119 | * @return \Illuminate\Http\Response Response object with output and headers 120 | */ 121 | public function sessionAction() 122 | { 123 | $params = ['page' => 'page-catalog-session']; 124 | 125 | foreach( app( 'config' )->get( 'shop.page.catalog-session' ) as $name ) 126 | { 127 | $params['aiheader'][$name] = Shop::get( $name )->header(); 128 | $params['aibody'][$name] = Shop::get( $name )->body(); 129 | } 130 | 131 | return Response::view( Shop::template( 'catalog.session' ), $params ) 132 | ->header( 'Cache-Control', 'no-cache' ); 133 | } 134 | 135 | 136 | /** 137 | * Returns the html body part for the catalog stock page. 138 | * 139 | * @return \Illuminate\Http\Response Response object with output and headers 140 | */ 141 | public function stockAction() 142 | { 143 | $params = ['page' => 'page-catalog-stock']; 144 | 145 | foreach( app( 'config' )->get( 'shop.page.catalog-stock' ) as $name ) 146 | { 147 | $params['aiheader'][$name] = Shop::get( $name )->header(); 148 | $params['aibody'][$name] = Shop::get( $name )->body(); 149 | } 150 | 151 | return Response::view( Shop::template( 'catalog.stock' ), $params ) 152 | ->header( 'Content-Type', 'application/javascript' ) 153 | ->header( 'Cache-Control', 'public, max-age=30' ); 154 | } 155 | 156 | 157 | /** 158 | * Returns the view for the XHR response with the product information for the search suggestion. 159 | * 160 | * @return \Illuminate\Http\Response Response object with output and headers 161 | */ 162 | public function suggestAction() 163 | { 164 | $params = ['page' => 'page-catalog-suggest']; 165 | 166 | foreach( app( 'config' )->get( 'shop.page.catalog-suggest' ) as $name ) 167 | { 168 | $params['aiheader'][$name] = Shop::get( $name )->header(); 169 | $params['aibody'][$name] = Shop::get( $name )->body(); 170 | } 171 | 172 | return Response::view( Shop::template( 'catalog.suggest' ), $params ) 173 | ->header( 'Cache-Control', 'private, max-age=' . config( 'shop.cache_maxage', 30 ) ) 174 | ->header( 'Content-Type', 'application/json' ); 175 | } 176 | 177 | 178 | /** 179 | * Returns the html for the catalog tree page. 180 | * 181 | * @return \Illuminate\Http\Response Response object with output and headers 182 | */ 183 | public function treeAction() 184 | { 185 | try 186 | { 187 | $params = ['page' => 'page-catalog-tree']; 188 | 189 | foreach( app( 'config' )->get( 'shop.page.catalog-tree' ) as $name ) 190 | { 191 | $params['aiheader'][$name] = Shop::get( $name )->header(); 192 | $params['aibody'][$name] = Shop::get( $name )->body(); 193 | } 194 | 195 | return Response::view( Shop::template( 'catalog.tree' ), $params ) 196 | ->header( 'Cache-Control', 'private, max-age=' . config( 'shop.cache_maxage', 30 ) ); 197 | } 198 | catch( \Exception $e ) 199 | { 200 | if( $e->getCode() >= 400 && $e->getCode() < 600 ) { abort( $e->getCode() ); } 201 | throw $e; 202 | } 203 | } 204 | } 205 | -------------------------------------------------------------------------------- /src/views/base.blade.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | @if( config('app.debug') !== true ) 10 | 11 | @endif 12 | 13 | @if( in_array(app()->getLocale(), ['ar', 'az', 'dv', 'fa', 'he', 'ku', 'ur']) ) 14 | 15 | @else 16 | 17 | @endif 18 | 19 | 20 | @yield('aimeos_header') 21 | 22 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 71 | 72 |
73 | @yield('aimeos_stage') 74 |
75 | @yield('aimeos_body') 76 | @yield('content') 77 |
78 |
79 | 80 | 81 | 119 | 120 | 121 | 122 | 123 |
124 |
125 | 126 | 127 | 128 | 129 | @yield('aimeos_scripts') 130 | 131 | 132 | -------------------------------------------------------------------------------- /src/default.php: -------------------------------------------------------------------------------- 1 | false, 13 | 'apc_prefix' => 'laravel:', 14 | 'extdir' => base_path( 'ext' ), 15 | 'pcntl_max' => 4, 16 | 'pcntl_priority' => 19, 17 | 'uploaddir' => '/', 18 | 19 | 'page' => [ 20 | 'account-index' => ['locale/select', 'basket/mini', 'catalog/tree', 'catalog/search', 'account/profile', 'account/review', 'account/subscription', 'account/basket', 'account/history', 'account/favorite', 'account/watch', 'catalog/session'], 21 | 'basket-index' => ['locale/select', 'catalog/tree', 'catalog/search', 'basket/standard', 'basket/bulk', 'basket/related'], 22 | 'catalog-count' => ['catalog/count'], 23 | 'catalog-detail' => ['locale/select', 'basket/mini', 'catalog/tree', 'catalog/search', 'catalog/stage', 'catalog/detail', 'catalog/session'], 24 | 'catalog-home' => ['locale/select', 'basket/mini', 'catalog/tree', 'catalog/search', 'catalog/home'], 25 | 'catalog-list' => ['locale/select', 'basket/mini', 'catalog/filter', 'catalog/tree', 'catalog/search', 'catalog/price', 'catalog/supplier', 'catalog/attribute', 'catalog/session', 'catalog/stage', 'catalog/lists'], 26 | 'catalog-session' => ['locale/select', 'basket/mini', 'catalog/tree', 'catalog/search', 'catalog/session'], 27 | 'catalog-stock' => ['catalog/stock'], 28 | 'catalog-suggest' => ['catalog/suggest'], 29 | 'catalog-tree' => ['locale/select', 'basket/mini', 'catalog/filter', 'catalog/tree', 'catalog/search', 'catalog/price', 'catalog/supplier', 'catalog/attribute', 'catalog/session', 'catalog/stage', 'catalog/lists'], 30 | 'checkout-confirm' => ['catalog/tree', 'catalog/search', 'checkout/confirm'], 31 | 'checkout-index' => ['locale/select', 'catalog/tree', 'catalog/search', 'checkout/standard'], 32 | 'checkout-update' => ['checkout/update'], 33 | 'supplier-detail' => ['locale/select', 'basket/mini', 'catalog/tree', 'catalog/search', 'supplier/detail', 'catalog/lists'], 34 | ], 35 | 36 | 'admin' => [ 37 | 'graphql' => [ 38 | 'url' => [ 39 | 'target' => 'aimeos_shop_graphql_post', 40 | 'config' => [ 41 | 'absoluteUri' => true, 42 | ], 43 | ], 44 | ], 45 | 'jqadm' => [ 46 | 'url' => [ 47 | 'batch' => [ 48 | 'target' => 'aimeos_shop_jqadm_batch' 49 | ], 50 | 'copy' => [ 51 | 'target' => 'aimeos_shop_jqadm_copy' 52 | ], 53 | 'create' => [ 54 | 'target' => 'aimeos_shop_jqadm_create' 55 | ], 56 | 'delete' => [ 57 | 'target' => 'aimeos_shop_jqadm_delete' 58 | ], 59 | 'export' => [ 60 | 'target' => 'aimeos_shop_jqadm_export' 61 | ], 62 | 'get' => [ 63 | 'target' => 'aimeos_shop_jqadm_get' 64 | ], 65 | 'import' => [ 66 | 'target' => 'aimeos_shop_jqadm_import' 67 | ], 68 | 'save' => [ 69 | 'target' => 'aimeos_shop_jqadm_save' 70 | ], 71 | 'search' => [ 72 | 'target' => 'aimeos_shop_jqadm_search' 73 | ], 74 | ], 75 | ], 76 | 'jsonadm' => [ 77 | 'url' => [ 78 | 'target' => 'aimeos_shop_jsonadm_get', 79 | 'config' => [ 80 | 'absoluteUri' => true, 81 | ], 82 | 'options' => [ 83 | 'target' => 'aimeos_shop_jsonadm_options', 84 | 'config' => [ 85 | 'absoluteUri' => true, 86 | ], 87 | ], 88 | ], 89 | ], 90 | ], 91 | 'client' => [ 92 | 'html' => [ 93 | 'account' => [ 94 | 'index' => [ 95 | 'url' => [ 96 | 'target' => 'aimeos_shop_account', 97 | ], 98 | ], 99 | 'basket' => [ 100 | 'url' => [ 101 | 'target' => 'aimeos_shop_account', 102 | ], 103 | ], 104 | 'review' => [ 105 | 'url' => [ 106 | 'target' => 'aimeos_shop_account', 107 | ], 108 | ], 109 | 'profile' => [ 110 | 'url' => [ 111 | 'target' => 'aimeos_shop_account', 112 | ], 113 | ], 114 | 'subscription' => [ 115 | 'url' => [ 116 | 'target' => 'aimeos_shop_account', 117 | ], 118 | ], 119 | 'history' => [ 120 | 'url' => [ 121 | 'target' => 'aimeos_shop_account', 122 | ], 123 | ], 124 | 'favorite' => [ 125 | 'url' => [ 126 | 'target' => 'aimeos_shop_account_favorite', 127 | ], 128 | ], 129 | 'watch' => [ 130 | 'url' => [ 131 | 'target' => 'aimeos_shop_account_watch', 132 | ], 133 | ], 134 | 'download' => [ 135 | 'url' => [ 136 | 'target' => 'aimeos_shop_account_download', 137 | ], 138 | 'error' => [ 139 | 'url' => [ 140 | 'target' => 'aimeos_shop_account', 141 | ], 142 | ], 143 | ], 144 | ], 145 | 'cms' => [ 146 | 'page' => [ 147 | 'url' => [ 148 | 'target' => 'aimeos_page', 149 | ], 150 | ], 151 | ], 152 | 'catalog' => [ 153 | 'count' => [ 154 | 'url' => [ 155 | 'target' => 'aimeos_shop_count', 156 | ], 157 | ], 158 | 'detail' => [ 159 | 'url' => [ 160 | 'target' => 'aimeos_shop_detail', 161 | ], 162 | ], 163 | 'home' => [ 164 | 'url' => [ 165 | 'target' => 'aimeos_home', 166 | ], 167 | ], 168 | 'lists' => [ 169 | 'url' => [ 170 | 'target' => 'aimeos_shop_list', 171 | ], 172 | ], 173 | 'session' => [ 174 | 'pinned' => [ 175 | 'url' => [ 176 | 'target' => 'aimeos_shop_session_pinned', 177 | ], 178 | ], 179 | ], 180 | 'stock' => [ 181 | 'url' => [ 182 | 'target' => 'aimeos_shop_stock', 183 | ], 184 | ], 185 | 'suggest' => [ 186 | 'url' => [ 187 | 'target' => 'aimeos_shop_suggest', 188 | ], 189 | ], 190 | 'tree' => [ 191 | 'url' => [ 192 | 'target' => 'aimeos_shop_tree', 193 | ], 194 | ], 195 | ], 196 | 'common' => [ 197 | 'template' => [ 198 | 'baseurl' => public_path( 'vendor/shop/themes/default' ), 199 | ], 200 | ], 201 | 'basket' => [ 202 | 'standard' => [ 203 | 'url' => [ 204 | 'target' => 'aimeos_shop_basket', 205 | ], 206 | ], 207 | ], 208 | 'checkout' => [ 209 | 'confirm' => [ 210 | 'url' => [ 211 | 'target' => 'aimeos_shop_confirm', 212 | ], 213 | ], 214 | 'standard' => [ 215 | 'url' => [ 216 | 'target' => 'aimeos_shop_checkout', 217 | ], 218 | 'summary' => [ 219 | 'option' => [ 220 | 'terms' => [ 221 | 'url' => [ 222 | 'target' => 'aimeos_page', 223 | ], 224 | 'privacy' => [ 225 | 'url' => [ 226 | 'target' => 'aimeos_page', 227 | ], 228 | ], 229 | 'cancel' => [ 230 | 'url' => [ 231 | 'target' => 'aimeos_page', 232 | ], 233 | ], 234 | ], 235 | ], 236 | ], 237 | ], 238 | 'update' => [ 239 | 'url' => [ 240 | 'target' => 'aimeos_shop_update', 241 | ], 242 | ], 243 | ], 244 | 'locale' => [ 245 | 'select' => [ 246 | 'currency' => [ 247 | 'param-name' => 'currency', 248 | ], 249 | 'language' => [ 250 | 'param-name' => 'locale', 251 | ], 252 | ], 253 | ], 254 | 'supplier' => [ 255 | 'detail' => [ 256 | 'url' => [ 257 | 'target' => 'aimeos_shop_supplier', 258 | ], 259 | ], 260 | ] 261 | ], 262 | 'jsonapi' => [ 263 | 'url' => [ 264 | 'target' => 'aimeos_shop_jsonapi_options', 265 | 'config' => [ 266 | 'absoluteUri' => true, 267 | ], 268 | ], 269 | ], 270 | ], 271 | 272 | 'controller' => [ 273 | 'jobs' => [ 274 | 'to-email' => config( 'mail.from.address' ), 275 | ] 276 | ], 277 | 278 | 'mshop' => [ 279 | 'customer' => [ 280 | 'manager' => [ 281 | 'name' => 'Laravel', 282 | 'password' => [ 283 | 'name' => 'Bcrypt', 284 | ], 285 | ], 286 | ], 287 | 'index' => [ 288 | 'manager' => [ 289 | 'name' => $aimeosIndexManagerName, 290 | ], 291 | ], 292 | ], 293 | ]; 294 | -------------------------------------------------------------------------------- /src/config/shop.php: -------------------------------------------------------------------------------- 1 | false, // enable for maximum performance if APCu is available 6 | 'apc_prefix' => 'laravel:', // prefix for caching config and translation in APCu 7 | 'num_formatter' => 'Locale', // locale based number formatter (alternative: "Standard") 8 | 'pcntl_max' => 4, // maximum number of parallel command line processes when starting jobs 9 | 'version' => env( 'APP_VERSION', 1 ), // shop CSS/JS file version 10 | 11 | 'routes' => [ 12 | // Docs: https://aimeos.org/docs/latest/laravel/extend/#custom-routes 13 | // Multi-sites: https://aimeos.org/docs/latest/laravel/customize/#multiple-shops 14 | // 'admin' => ['prefix' => 'admin', 'middleware' => ['web']], 15 | // 'jqadm' => ['prefix' => 'admin/{site}/jqadm', 'middleware' => ['web', 'auth']], 16 | // 'jsonadm' => ['prefix' => 'admin/{site}/jsonadm', 'middleware' => ['web', 'auth']], 17 | // 'jsonapi' => ['prefix' => 'jsonapi', 'middleware' => ['web', 'api']], 18 | // 'account' => ['prefix' => 'profile', 'middleware' => ['web', 'auth']], 19 | // 'default' => ['prefix' => 'shop', 'middleware' => ['web']], 20 | // 'supplier' => ['prefix' => 's', 'middleware' => ['web']], 21 | // 'page' => ['prefix' => 'p', 'middleware' => ['web']], 22 | // 'home' => ['middleware' => ['web']], 23 | // 'update' => [], 24 | ], 25 | 26 | 'page' => [ 27 | 'account-index' => ['locale/select', 'basket/mini', 'catalog/tree', 'catalog/search', 'account/profile', 'account/review', 'account/subscription', 'account/basket', 'account/history', 'account/favorite', 'account/watch', 'catalog/session'], 28 | 'basket-index' => ['locale/select', 'catalog/tree', 'catalog/search', 'basket/standard', 'basket/bulk', 'basket/related'], 29 | 'catalog-count' => ['catalog/count'], 30 | 'catalog-detail' => ['locale/select', 'basket/mini', 'catalog/tree', 'catalog/search', 'catalog/stage', 'catalog/detail', 'catalog/session'], 31 | 'catalog-home' => ['locale/select', 'basket/mini', 'catalog/tree', 'catalog/search', 'catalog/home'], 32 | 'catalog-list' => ['locale/select', 'basket/mini', 'catalog/filter', 'catalog/tree', 'catalog/search', 'catalog/price', 'catalog/supplier', 'catalog/attribute', 'catalog/session', 'catalog/stage', 'catalog/lists'], 33 | 'catalog-session' => ['locale/select', 'basket/mini', 'catalog/tree', 'catalog/search', 'catalog/session'], 34 | 'catalog-stock' => ['catalog/stock'], 35 | 'catalog-suggest' => ['catalog/suggest'], 36 | 'catalog-tree' => ['locale/select', 'basket/mini', 'catalog/filter', 'catalog/tree', 'catalog/search', 'catalog/price', 'catalog/supplier', 'catalog/attribute', 'catalog/session', 'catalog/stage', 'catalog/lists'], 37 | 'checkout-confirm' => ['catalog/tree', 'catalog/search', 'checkout/confirm'], 38 | 'checkout-index' => ['locale/select', 'catalog/tree', 'catalog/search', 'checkout/standard'], 39 | 'checkout-update' => ['checkout/update'], 40 | 'supplier-detail' => ['locale/select', 'basket/mini', 'catalog/tree', 'catalog/search', 'supplier/detail', 'catalog/lists'], 41 | 'cms' => ['cms/page', 'catalog/tree', 'basket/mini'], 42 | ], 43 | 44 | 'resource' => [ 45 | 'db' => [ 46 | 'adapter' => config( 'database.connections.' . config( 'database.default', 'mysql' ) . '.driver', 'mysql' ), 47 | 'host' => config( 'database.connections.' . config( 'database.default', 'mysql' ) . '.host', '127.0.0.1' ), 48 | 'port' => config( 'database.connections.' . config( 'database.default', 'mysql' ) . '.port', '3306' ), 49 | 'socket' => config( 'database.connections.' . config( 'database.default', 'mysql' ) . '.unix_socket', '' ), 50 | 'database' => config( 'database.connections.' . config( 'database.default', 'mysql' ) . '.database', 'forge' ), 51 | 'username' => config( 'database.connections.' . config( 'database.default', 'mysql' ) . '.username', 'forge' ), 52 | 'password' => config( 'database.connections.' . config( 'database.default', 'mysql' ) . '.password', '' ), 53 | 'stmt' => config( 'database.default', 'mysql' ) === 'mysql' ? ["SET SESSION sort_buffer_size=2097144; SET NAMES 'utf8mb4'; SET SESSION sql_mode='ANSI'"] : [], 54 | 'limit' => 3, // maximum number of concurrent database connections 55 | 'defaultTableOptions' => [ 56 | 'charset' => config( 'database.connections.' . config( 'database.default', 'mysql' ) . '.charset' ), 57 | 'collate' => config( 'database.connections.' . config( 'database.default', 'mysql' ) . '.collation' ), 58 | ], 59 | 'driverOptions' => config( 'database.connections.' . config( 'database.default', 'mysql' ) . '.options' ), 60 | ], 61 | 'fs' => [ 62 | 'adapter' => 'Standard', 63 | 'tempdir' => storage_path( 'tmp' ), 64 | 'basedir' => public_path(), 65 | 'baseurl' => rtrim(env('ASSET_URL', PHP_SAPI == 'cli' ? env('APP_URL') : ''), '/'), 66 | ], 67 | 'fs-media' => [ 68 | 'adapter' => 'Standard', 69 | 'tempdir' => storage_path( 'tmp' ), 70 | 'basedir' => public_path( 'aimeos' ), 71 | 'baseurl' => rtrim(env('ASSET_URL', PHP_SAPI == 'cli' ? env('APP_URL') : ''), '/') . '/aimeos', 72 | ], 73 | 'fs-mimeicon' => [ 74 | 'adapter' => 'Standard', 75 | 'tempdir' => storage_path( 'tmp' ), 76 | 'basedir' => public_path( 'vendor/shop/mimeicons' ), 77 | 'baseurl' => rtrim(env('ASSET_URL', PHP_SAPI == 'cli' ? env('APP_URL') : ''), '/') . '/vendor/shop/mimeicons', 78 | ], 79 | 'fs-theme' => [ 80 | 'adapter' => 'Standard', 81 | 'tempdir' => storage_path( 'tmp' ), 82 | 'basedir' => public_path( 'vendor/shop/themes' ), 83 | 'baseurl' => rtrim(env('ASSET_URL', PHP_SAPI == 'cli' ? env('APP_URL') : ''), '/') . '/vendor/shop/themes', 84 | ], 85 | 'fs-admin' => [ 86 | 'adapter' => 'Standard', 87 | 'tempdir' => storage_path( 'tmp' ), 88 | 'basedir' => storage_path( 'admin' ), 89 | ], 90 | 'fs-export' => [ 91 | 'adapter' => 'Standard', 92 | 'tempdir' => storage_path( 'tmp' ), 93 | 'basedir' => storage_path( 'export' ), 94 | ], 95 | 'fs-import' => [ 96 | 'adapter' => 'Standard', 97 | 'tempdir' => storage_path( 'tmp' ), 98 | 'basedir' => storage_path( 'import' ), 99 | ], 100 | 'fs-secure' => [ 101 | 'adapter' => 'Standard', 102 | 'tempdir' => storage_path( 'tmp' ), 103 | 'basedir' => storage_path( 'secure' ), 104 | ], 105 | 'mq' => [ 106 | 'adapter' => 'Standard', 107 | 'db' => 'db', 108 | ], 109 | 'email' => [ 110 | 'from-email' => config( 'mail.from.address' ), 111 | 'from-name' => config( 'mail.from.name' ), 112 | ], 113 | ], 114 | 115 | 'admin' => [], 116 | 117 | 'client' => [ 118 | 'html' => [ 119 | 'basket' => [ 120 | 'cache' => [ 121 | // 'enable' => false, // Disable basket content caching for development 122 | ], 123 | ], 124 | 'common' => [ 125 | 'cache' => [ 126 | // 'force' => true // enforce caching for logged in users 127 | ], 128 | ], 129 | 'catalog' => [ 130 | 'lists' => [ 131 | 'basket-add' => true, // shows add to basket in list views 132 | // 'infinite-scroll' => true, // load more products in list view 133 | // 'size' => 48, // number of products per page 134 | ], 135 | 'selection' => [ 136 | 'type' => [// how variant attributes are displayed 137 | 'color' => 'radio', 138 | 'length' => 'radio', 139 | 'width' => 'radio', 140 | ], 141 | ], 142 | ], 143 | ], 144 | ], 145 | 146 | 'controller' => [ 147 | 'frontend' => [ 148 | 'catalog' => [ 149 | 'levels-always' => 3 // number of category levels for mega menu 150 | ] 151 | ] 152 | ], 153 | 154 | 'i18n' => [ 155 | ], 156 | 157 | 'madmin' => [ 158 | 'cache' => [ 159 | 'manager' => [ 160 | // 'name' => 'None', // Disable caching for development 161 | ], 162 | ], 163 | 'log' => [ 164 | 'manager' => [ 165 | // 'loglevel' => 7, // Enable debug logging into madmin_log table 166 | ], 167 | ], 168 | ], 169 | 170 | 'mshop' => [ 171 | 'locale' => [ 172 | // 'site' => '', // used instead of "default" 173 | ] 174 | ], 175 | 176 | 177 | 'command' => [ 178 | ], 179 | 180 | 'frontend' => [ 181 | ], 182 | 183 | 'backend' => [ 184 | ], 185 | 186 | ]; 187 | -------------------------------------------------------------------------------- /src/Aimeos/Shop/Base/View.php: -------------------------------------------------------------------------------- 1 | i18n = $i18n; 53 | $this->config = $config; 54 | $this->support = $support; 55 | } 56 | 57 | 58 | /** 59 | * Creates the view object for the HTML client. 60 | * 61 | * @param \Aimeos\MShop\ContextIface $context Context object 62 | * @param array $templatePaths List of base path names with relative template paths as key/value pairs 63 | * @param string|null $locale Code of the current language or null for no translation 64 | * @return \Aimeos\Base\View\Iface View object 65 | */ 66 | public function create( \Aimeos\MShop\ContextIface $context, array $templatePaths, 67 | string $locale = null ) : \Aimeos\Base\View\Iface 68 | { 69 | $engine = new \Aimeos\Base\View\Engine\Blade( app( 'Illuminate\Contracts\View\Factory' ) ); 70 | $view = new \Aimeos\Base\View\Standard( $templatePaths, array( '.blade.php' => $engine ) ); 71 | 72 | $config = $context->config(); 73 | $session = $context->session(); 74 | 75 | $this->addCsrf( $view ); 76 | $this->addAccess( $view, $context ); 77 | $this->addConfig( $view, $config ); 78 | $this->addNumber( $view, $config, $locale ); 79 | $this->addParam( $view ); 80 | $this->addRequest( $view ); 81 | $this->addResponse( $view ); 82 | $this->addSession( $view, $session ); 83 | $this->addTranslate( $view, $locale ); 84 | $this->addUrl( $view ); 85 | 86 | return $view; 87 | } 88 | 89 | 90 | /** 91 | * Adds the "access" helper to the view object 92 | * 93 | * @param \Aimeos\Base\View\Iface $view View object 94 | * @param \Aimeos\MShop\ContextIface $context Context object 95 | * @return \Aimeos\Base\View\Iface Modified view object 96 | */ 97 | protected function addAccess( \Aimeos\Base\View\Iface $view, \Aimeos\MShop\ContextIface $context ) : \Aimeos\Base\View\Iface 98 | { 99 | if( $this->config->get( 'shop.accessControl', true ) === false 100 | || ( ( $user = \Illuminate\Support\Facades\Auth::user() ) !== null && $user->superuser ) 101 | ) { 102 | $helper = new \Aimeos\Base\View\Helper\Access\All( $view ); 103 | } 104 | else 105 | { 106 | $support = $this->support; 107 | 108 | $fcn = function() use ( $support, $context ) { 109 | return $support->getGroups( $context ); 110 | }; 111 | 112 | $helper = new \Aimeos\Base\View\Helper\Access\Standard( $view, $fcn ); 113 | } 114 | 115 | $view->addHelper( 'access', $helper ); 116 | 117 | return $view; 118 | } 119 | 120 | 121 | /** 122 | * Adds the "config" helper to the view object 123 | * 124 | * @param \Aimeos\Base\View\Iface $view View object 125 | * @param \Aimeos\Base\Config\Iface $config Configuration object 126 | * @return \Aimeos\Base\View\Iface Modified view object 127 | */ 128 | protected function addConfig( \Aimeos\Base\View\Iface $view, \Aimeos\Base\Config\Iface $config ) : \Aimeos\Base\View\Iface 129 | { 130 | $config = new \Aimeos\Base\Config\Decorator\Protect( clone $config, ['resource/*/baseurl'], ['resource'] ); 131 | $helper = new \Aimeos\Base\View\Helper\Config\Standard( $view, $config ); 132 | $view->addHelper( 'config', $helper ); 133 | 134 | return $view; 135 | } 136 | 137 | 138 | /** 139 | * Adds the "access" helper to the view object 140 | * 141 | * @param \Aimeos\Base\View\Iface $view View object 142 | * @return \Aimeos\Base\View\Iface Modified view object 143 | */ 144 | protected function addCsrf( \Aimeos\Base\View\Iface $view ) : \Aimeos\Base\View\Iface 145 | { 146 | $helper = new \Aimeos\Base\View\Helper\Csrf\Standard( $view, '_token', csrf_token() ); 147 | $view->addHelper( 'csrf', $helper ); 148 | 149 | return $view; 150 | } 151 | 152 | 153 | /** 154 | * Adds the "number" helper to the view object 155 | * 156 | * @param \Aimeos\Base\View\Iface $view View object 157 | * @param \Aimeos\Base\Config\Iface $config Configuration object 158 | * @param string|null $locale Code of the current language or null for no translation 159 | * @return \Aimeos\Base\View\Iface Modified view object 160 | */ 161 | protected function addNumber( \Aimeos\Base\View\Iface $view, \Aimeos\Base\Config\Iface $config, 162 | string $locale = null ) : \Aimeos\Base\View\Iface 163 | { 164 | if( config( 'shop.num_formatter', 'Locale' ) === 'Locale' ) 165 | { 166 | $pattern = $config->get( 'client/html/common/format/pattern' ); 167 | $helper = new \Aimeos\Base\View\Helper\Number\Locale( $view, $locale, $pattern ); 168 | } 169 | else 170 | { 171 | $sep1000 = $config->get( 'client/html/common/format/separator1000', '' ); 172 | $decsep = $config->get( 'client/html/common/format/separatorDecimal', '.' ); 173 | $helper = new \Aimeos\Base\View\Helper\Number\Standard( $view, $decsep, $sep1000 ); 174 | } 175 | 176 | return $view->addHelper( 'number', $helper ); 177 | } 178 | 179 | 180 | /** 181 | * Adds the "param" helper to the view object 182 | * 183 | * @param \Aimeos\Base\View\Iface $view View object 184 | * @return \Aimeos\Base\View\Iface Modified view object 185 | */ 186 | protected function addParam( \Aimeos\Base\View\Iface $view ) : \Aimeos\Base\View\Iface 187 | { 188 | $params = ( Route::current() ? Route::current()->parameters() : array() ) + Request::all(); 189 | $helper = new \Aimeos\Base\View\Helper\Param\Standard( $view, $params ); 190 | $view->addHelper( 'param', $helper ); 191 | 192 | return $view; 193 | } 194 | 195 | 196 | /** 197 | * Adds the "request" helper to the view object 198 | * 199 | * @param \Aimeos\Base\View\Iface $view View object 200 | * @return \Aimeos\Base\View\Iface Modified view object 201 | */ 202 | protected function addRequest( \Aimeos\Base\View\Iface $view ) : \Aimeos\Base\View\Iface 203 | { 204 | $helper = new \Aimeos\Base\View\Helper\Request\Laravel( $view, Request::instance() ); 205 | $view->addHelper( 'request', $helper ); 206 | 207 | return $view; 208 | } 209 | 210 | 211 | /** 212 | * Adds the "response" helper to the view object 213 | * 214 | * @param \Aimeos\Base\View\Iface $view View object 215 | * @return \Aimeos\Base\View\Iface Modified view object 216 | */ 217 | protected function addResponse( \Aimeos\Base\View\Iface $view ) : \Aimeos\Base\View\Iface 218 | { 219 | $helper = new \Aimeos\Base\View\Helper\Response\Laravel( $view ); 220 | $view->addHelper( 'response', $helper ); 221 | 222 | return $view; 223 | } 224 | 225 | 226 | /** 227 | * Adds the "session" helper to the view object 228 | * 229 | * @param \Aimeos\Base\View\Iface $view View object 230 | * @param \Aimeos\Base\Session\Iface $session Session object 231 | * @return \Aimeos\Base\View\Iface Modified view object 232 | */ 233 | protected function addSession( \Aimeos\Base\View\Iface $view, \Aimeos\Base\Session\Iface $session ) : \Aimeos\Base\View\Iface 234 | { 235 | $helper = new \Aimeos\Base\View\Helper\Session\Standard( $view, $session ); 236 | $view->addHelper( 'session', $helper ); 237 | 238 | return $view; 239 | } 240 | 241 | 242 | /** 243 | * Adds the "translate" helper to the view object 244 | * 245 | * @param \Aimeos\Base\View\Iface $view View object 246 | * @param string|null $locale ISO language code, e.g. "de" or "de_CH" 247 | * @return \Aimeos\Base\View\Iface Modified view object 248 | */ 249 | protected function addTranslate( \Aimeos\Base\View\Iface $view, string $locale = null ) : \Aimeos\Base\View\Iface 250 | { 251 | if( $locale !== null ) 252 | { 253 | $i18n = $this->i18n->get( array( $locale ) ); 254 | $translation = $i18n[$locale]; 255 | } 256 | else 257 | { 258 | $translation = new \Aimeos\Base\Translation\None( 'en' ); 259 | } 260 | 261 | $helper = new \Aimeos\Base\View\Helper\Translate\Standard( $view, $translation ); 262 | $view->addHelper( 'translate', $helper ); 263 | 264 | return $view; 265 | } 266 | 267 | 268 | /** 269 | * Adds the "url" helper to the view object 270 | * 271 | * @param \Aimeos\Base\View\Iface $view View object 272 | * @return \Aimeos\Base\View\Iface Modified view object 273 | */ 274 | protected function addUrl( \Aimeos\Base\View\Iface $view ) : \Aimeos\Base\View\Iface 275 | { 276 | $fixed = [ 277 | 'site' => env( 'SHOP_MULTISHOP' ) ? config( 'shop.mshop.locale.site', 'default' ) : '', 278 | 'locale' => env( 'SHOP_MULTILOCALE' ) ? app()->getLocale() : '', 279 | 'currency' => '' 280 | ]; 281 | 282 | if( Route::current() ) 283 | { 284 | $fixed['site'] = Request::route( 'site', $fixed['site'] ); 285 | $fixed['locale'] = Request::route( 'locale', $fixed['locale'] ); 286 | $fixed['currency'] = Request::route( 'currency', $fixed['currency'] ); 287 | } 288 | 289 | $fixed['site'] = Request::input( 'site', $fixed['site'] ); 290 | $fixed['locale'] = Request::input( 'locale', $fixed['locale'] ); 291 | $fixed['currency'] = Request::input( 'currency', $fixed['currency'] ); 292 | 293 | $helper = new \Aimeos\Base\View\Helper\Url\Laravel( $view, app( 'url' ), array_filter( $fixed ) ); 294 | $view->addHelper( 'url', $helper ); 295 | 296 | return $view; 297 | } 298 | } -------------------------------------------------------------------------------- /src/Aimeos/Shop/Base/Context.php: -------------------------------------------------------------------------------- 1 | session = $session; 63 | $this->config = $config; 64 | $this->locale = $locale; 65 | $this->i18n = $i18n; 66 | } 67 | 68 | 69 | /** 70 | * Returns the current context 71 | * 72 | * @param bool $locale True to add locale object to context, false if not (deprecated, use \Aimeos\Shop\Base\Locale) 73 | * @param string $type Configuration type, i.e. "frontend" or "backend" (deprecated, use \Aimeos\Shop\Base\Config) 74 | * @return \Aimeos\MShop\ContextIface Context object 75 | */ 76 | public function get( bool $locale = true, string $type = 'frontend' ) : \Aimeos\MShop\ContextIface 77 | { 78 | $config = $this->config->get( $type ); 79 | 80 | if( $this->context === null ) 81 | { 82 | $context = new \Aimeos\MShop\Context(); 83 | $context->setConfig( $config ); 84 | 85 | $this->addDataBaseManager( $context ); 86 | $this->addFilesystemManager( $context ); 87 | $this->addMessageQueueManager( $context ); 88 | $this->addLogger( $context ); 89 | $this->addCache( $context ); 90 | $this->addMailer( $context ); 91 | $this->addNonce( $context ); 92 | $this->addPassword( $context ); 93 | $this->addProcess( $context ); 94 | $this->addSession( $context ); 95 | $this->addToken( $context ); 96 | $this->addUser( $context ); 97 | $this->addGroups( $context ); 98 | 99 | $this->context = $context; 100 | } 101 | 102 | $this->context->setConfig( $config ); 103 | 104 | if( $locale === true ) 105 | { 106 | $localeItem = $this->locale->get( $this->context ); 107 | $this->context->setLocale( $localeItem ); 108 | $this->context->setI18n( $this->i18n->get( array( $localeItem->getLanguageId() ) ) ); 109 | 110 | $config->apply( $localeItem->getSiteItem()->getConfig() ); 111 | } 112 | 113 | return $this->context; 114 | } 115 | 116 | 117 | /** 118 | * Adds the cache object to the context 119 | * 120 | * @param \Aimeos\MShop\ContextIface $context Context object including config 121 | * @return \Aimeos\MShop\ContextIface Modified context object 122 | */ 123 | protected function addCache( \Aimeos\MShop\ContextIface $context ) : \Aimeos\MShop\ContextIface 124 | { 125 | $cache = new \Aimeos\MAdmin\Cache\Proxy\Standard( $context ); 126 | 127 | return $context->setCache( $cache ); 128 | } 129 | 130 | 131 | /** 132 | * Adds the database manager object to the context 133 | * 134 | * @param \Aimeos\MShop\ContextIface $context Context object 135 | * @return \Aimeos\MShop\ContextIface Modified context object 136 | */ 137 | protected function addDatabaseManager( \Aimeos\MShop\ContextIface $context ) : \Aimeos\MShop\ContextIface 138 | { 139 | $dbm = new \Aimeos\Base\DB\Manager\Standard( $context->config()->get( 'resource', [] ), 'DBAL' ); 140 | 141 | return $context->setDatabaseManager( $dbm ); 142 | } 143 | 144 | 145 | /** 146 | * Adds the filesystem manager object to the context 147 | * 148 | * @param \Aimeos\MShop\ContextIface $context Context object 149 | * @return \Aimeos\MShop\ContextIface Modified context object 150 | */ 151 | protected function addFilesystemManager( \Aimeos\MShop\ContextIface $context ) : \Aimeos\MShop\ContextIface 152 | { 153 | $config = $context->config()->get( 'resource' ); 154 | $fs = new \Aimeos\Base\Filesystem\Manager\Laravel( app( 'filesystem' ), $config, storage_path( 'aimeos' ) ); 155 | 156 | return $context->setFilesystemManager( $fs ); 157 | } 158 | 159 | 160 | /** 161 | * Adds the logger object to the context 162 | * 163 | * @param \Aimeos\MShop\ContextIface $context Context object 164 | * @return \Aimeos\MShop\ContextIface Modified context object 165 | */ 166 | protected function addLogger( \Aimeos\MShop\ContextIface $context ) : \Aimeos\MShop\ContextIface 167 | { 168 | $logger = \Aimeos\MAdmin::create( $context, 'log' ); 169 | 170 | return $context->setLogger( $logger ); 171 | } 172 | 173 | 174 | 175 | /** 176 | * Adds the mailer object to the context 177 | * 178 | * @param \Aimeos\MShop\ContextIface $context Context object 179 | * @return \Aimeos\MShop\ContextIface Modified context object 180 | */ 181 | protected function addMailer( \Aimeos\MShop\ContextIface $context ) : \Aimeos\MShop\ContextIface 182 | { 183 | $mail = new \Aimeos\Base\Mail\Laravel( function() { return app( 'mailer' ); } ); 184 | 185 | return $context->setMail( $mail ); 186 | } 187 | 188 | 189 | /** 190 | * Adds the message queue manager object to the context 191 | * 192 | * @param \Aimeos\MShop\ContextIface $context Context object 193 | * @return \Aimeos\MShop\ContextIface Modified context object 194 | */ 195 | protected function addMessageQueueManager( \Aimeos\MShop\ContextIface $context ) : \Aimeos\MShop\ContextIface 196 | { 197 | $mq = new \Aimeos\Base\MQueue\Manager\Standard( $context->config()->get( 'resource', [] ) ); 198 | 199 | return $context->setMessageQueueManager( $mq ); 200 | } 201 | 202 | 203 | /** 204 | * Adds the nonce value for inline JS to the context 205 | * 206 | * @param \Aimeos\MShop\ContextIface $context Context object 207 | * @return \Aimeos\MShop\ContextIface Modified context object 208 | */ 209 | protected function addNonce( \Aimeos\MShop\ContextIface $context ) : \Aimeos\MShop\ContextIface 210 | { 211 | return $context->setNonce( base64_encode( random_bytes( 16 ) ) ); 212 | } 213 | 214 | 215 | /** 216 | * Adds the password hasher object to the context 217 | * 218 | * @param \Aimeos\MShop\ContextIface $context Context object 219 | * @return \Aimeos\MShop\ContextIface Modified context object 220 | */ 221 | protected function addPassword( \Aimeos\MShop\ContextIface $context ) : \Aimeos\MShop\ContextIface 222 | { 223 | return $context->setPassword( new \Aimeos\Base\Password\Standard() ); 224 | } 225 | 226 | 227 | /** 228 | * Adds the process object to the context 229 | * 230 | * @param \Aimeos\MShop\ContextIface $context Context object 231 | * @return \Aimeos\MShop\ContextIface Modified context object 232 | */ 233 | protected function addProcess( \Aimeos\MShop\ContextIface $context ) : \Aimeos\MShop\ContextIface 234 | { 235 | $config = $context->config(); 236 | $max = $config->get( 'pcntl_max', 4 ); 237 | $prio = $config->get( 'pcntl_priority', 19 ); 238 | 239 | $process = new \Aimeos\Base\Process\Pcntl( $max, $prio ); 240 | $process = new \Aimeos\Base\Process\Decorator\Check( $process ); 241 | 242 | return $context->setProcess( $process ); 243 | } 244 | 245 | 246 | /** 247 | * Adds the session object to the context 248 | * 249 | * @param \Aimeos\MShop\ContextIface $context Context object 250 | * @return \Aimeos\MShop\ContextIface Modified context object 251 | */ 252 | protected function addSession( \Aimeos\MShop\ContextIface $context ) : \Aimeos\MShop\ContextIface 253 | { 254 | $session = new \Aimeos\Base\Session\Laravel( $this->session ); 255 | 256 | return $context->setSession( $session ); 257 | } 258 | 259 | 260 | /** 261 | * Adds the session token to the context 262 | * 263 | * @param \Aimeos\MShop\ContextIface $context Context object 264 | * @return \Aimeos\MShop\ContextIface Modified context object 265 | */ 266 | protected function addToken( \Aimeos\MShop\ContextIface $context ) : \Aimeos\MShop\ContextIface 267 | { 268 | if( ( $token = Session::get( 'token' ) ) === null ) { 269 | Session::put( 'token', $token = Session::getId() ); 270 | } 271 | 272 | return $context->setToken( $token ); 273 | } 274 | 275 | 276 | /** 277 | * Adds the user ID and name if available 278 | * 279 | * @param \Aimeos\MShop\ContextIface $context Context object 280 | * @return \Aimeos\MShop\ContextIface Modified context object 281 | */ 282 | protected function addUser( \Aimeos\MShop\ContextIface $context ) : \Aimeos\MShop\ContextIface 283 | { 284 | $key = collect( config( 'shop.routes' ) ) 285 | ->where( 'prefix', optional( Route::getCurrentRoute() )->getPrefix() ) 286 | ->keys()->first(); 287 | $guard = data_get( config( 'shop.guards' ), $key, Auth::getDefaultDriver() ); 288 | 289 | if( $user = Auth::guard( $guard )->user() ) { 290 | $context->setEditor( $user->name ?? (string) \Request::ip() ); 291 | $context->setUserId( $user->getAuthIdentifier() ); 292 | } elseif( $ip = \Request::ip() ) { 293 | $context->setEditor( $ip ); 294 | } 295 | 296 | return $context; 297 | } 298 | 299 | 300 | /** 301 | * Adds the group IDs if available 302 | * 303 | * @param \Aimeos\MShop\ContextIface $context Context object 304 | * @return \Aimeos\MShop\ContextIface Modified context object 305 | */ 306 | protected function addGroups( \Aimeos\MShop\ContextIface $context ) : \Aimeos\MShop\ContextIface 307 | { 308 | $key = collect( config( 'shop.routes' ) ) 309 | ->where( 'prefix', optional( Route::getCurrentRoute() ) 310 | ->getPrefix() ) 311 | ->keys()->first(); 312 | $guard = data_get( config( 'shop.guards' ), $key, Auth::getDefaultDriver() ); 313 | 314 | if( $userid = Auth::guard( $guard )->id() ) 315 | { 316 | $context->setGroupIds( function() use ( $context, $userid ) { 317 | try { 318 | return \Aimeos\MShop::create( $context, 'customer' )->get( $userid, ['customer/group'] )->getGroups(); 319 | } catch( \Exception $e ) { 320 | return []; 321 | } 322 | } ); 323 | } 324 | 325 | return $context; 326 | } 327 | } 328 | --------------------------------------------------------------------------------