2017 © Pedro Peláez
 

library ecommerce

Ecommerce system

image

railroad/ecommerce

Ecommerce system

  • Monday, July 30, 2018
  • by calebfavor
  • Repository
  • 3 Watchers
  • 0 Stars
  • 673 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 49 Versions
  • 381 % Grown

The README.md

Ecommerce

E-commerce system, (*1)

Install

With composer command composer require railroad/ecommerce:1.0.19, (*2)

API Reference

Add item to cart - forms controller

GET /ecommerce/add-to-cart

Request Example



Request Parameters

path\ query\ body key required default description\ notes
query products yes Products array. Array keys will be matched to product SKU and array values to product quantity.
query redirect no redirect()->back() If this is set the request will redirect to this url; otherwise will be redirect back
query locked no If it's true 'lock' the cart so when other items are added it clears the cart first
query promo-code no Promo code

Response Example

302 Redirects to previous url or to path passed in with redirect param., (*3)

On the session are flashed the following data:\ * success - boolean value\ * addedProducts - array with added product info\ * cartSubTotal - cart items subtotal price\ * cartNumberOfItems - the number of cart items\ * notAvailableProducts - array with the error messages for the products that could not be added to cart, (*4)

The Versions