2017 © Pedro Peláez
 

library cscart-composer

image

techupbusiness/cscart-composer

  • Friday, July 20, 2018
  • by techup
  • Repository
  • 0 Watchers
  • 0 Stars
  • 0 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

CS-Cart composer installation

This repository allows you to install cs-cart with composer (but still not really elegant as cs-cart is not supporting it natively). You can also checkout https://github.com/drahosistvan/cscart-installer, which is another (unofficial) commandline tool., (*1)

Preparation

  1. Point your webserver root for your domain to a folder web in this projects root (does not exist yet)
  2. If needed, you can create the folder (is a sibling of patches, shared etc. then) - it will be replaced by a symlink later

Installation of a fresh cs-cart instance

  1. Run composer update and wait until it is finished
  2. Run composer init-fs, now the file-system is prepared (you can check the script init in composer.json section "scripts":)
  3. Now you have two installation options:
    1. BROWSER:
      1. Go to http(s)://YOURHOST/install and follow the wizard or
    2. COMMAND-LINE:
      1. Does not work at the moment, check out https://docs.cs-cart.com/4.4.x/install/install_via_console.html

Installation of add-ons

Console command example to install an add-on which is available already on the server (in folder packages/ost-loyalty):, (*2)

# vendor/bin/cscart-sdk addon:symlink [OPTIONAL: --templates-to-design] [ADDON-NAME] [CURRENT-ADDON-PATH] web
vendor/bin/cscart-sdk addon:symlink --templates-to-design ost_loyalty packages/ost-loyalty web

The folder could be any folder, also one in vendor if you can install some extensions via composer. This command symlinks all folders in the addon-path to its corresponding location within the cs-cart structure. The command-line tool is officially supported by cs-cart (https://github.com/cscart/sdk)., (*3)

You can also add the command(s) to composer.json and then run them via composer setup-addons, (*4)

  "scripts": {
    "init-fs": [
      "rm -rf web",
      "ln -s vendor/cscart/cscart-ultimate web",
      "chmod 666 web/config.local.php",
      "chmod -R 777 web/design web/images web/var",
      "find web/design -type f -print0 | xargs -0 chmod 666",
      "find web/images -type f -print0 | xargs -0 chmod 666",
      "find web/var -type f -print0 | xargs -0 chmod 666"
    ],
    "setup-addons": [
      "vendor/bin/cscart-sdk addon:symlink --templates-to-design ost_loyalty packages/ost-loyalty web"
    ]
  }

The Versions