Card + Products

This commit is contained in:
Kevin Adametz 2018-12-12 14:33:52 +01:00
parent 5ff57a21a7
commit c129a44383
38 changed files with 4489 additions and 1789 deletions

View file

@ -15,12 +15,38 @@
Route::domain('mivita.local')->group(function () {
Route::get('/', 'Web\SiteController@index')->name('/');
Route::get('/', 'Web\SiteController@index')->name('/');
Route::get('product/image/{slug}', function($slug = null)
{
$image = \App\Models\ProductImage::where('slug', $slug)->first();
$path = storage_path('app/public').'/images/product'.'/'.$image->product_id.'/'.$image->filename;
if (file_exists($path)) {
return Response::file($path);
}
})->name('product_image');
Route::get('/card/add/{id}/{quantity?}/{product_slug?}', 'Web\CardController@addToCardGet')->name('card_add_get');
Route::post('/card/add/{id}', 'Web\CardController@addToCardPost')->name('card_add_post');
Route::get('/card/show', 'Web\CardController@showCard')->name('card_show');
Route::get('/card/checkout', 'Web\CardController@checkoutCard')->name('card_checkout');
Route::post('/card/checkout_final', 'Web\CardController@checkoutFinalCard')->name('card_checkout_final');
Route::post('/card/update', 'Web\CardController@updateCard')->name('card_update');
Route::get('/card/remove/{rowId}', 'Web\CardController@removeCard')->name('card_remove');
Route::get('/card/delete', 'Web\CardController@deleteCard')->name('card_delete');
Route::get('/{site}/{subsite?}/{product_slug?}', 'Web\SiteController@site')->name('site');
});
/* ROUTING FOR CRM / CMS*/
@ -189,14 +215,7 @@ Route::get('/user/update_email_confirm/{token}', 'UpdateEmailController@activate
Route::get('product/image/{slug}', function($slug = null)
{
$image = \App\Models\ProductImage::where('slug', $slug)->first();
$path = storage_path('app/public').'/images/product'.'/'.$image->product_id.'/'.$image->filename;
if (file_exists($path)) {
return Response::file($path);
}
})->name('product_image');
/*Route::get('storage/{what}/{path}/{id}/{file_name}', function($what = null, $path = null, $id = null, $file_name = null)
{