Category : e-commerce

I have a problem with an ecommerce’s cart. In my controller when i use the first() property in my query the product that is added in my cart is always the same, the first that I click. This is my code: Controller: public function addToCart(Request $request) { $reference = $request->reference; $ean = $request->ean; $product = ..

Read more

I want to: Create a dynamic route logic to handle category and subcategory in URL. Send a dynamic variable to where clause in Products Model Web.php Route file: Route::prefix("products")->group(function () { Route::get(‘{category_one}/{category_two}’,[ProductsController::class,’index’])->where([‘category_one’=> ‘[A-Za-z]+’,’category_two’=>'[A-Za-z]+’]); }); ProductsController.php use AppModelsProducts; public function index() { $products = new Products; $products=$products->getProducts(); return view(‘pages.products’)->with([‘products’=>$products]); } Products.php Model use IlluminateSupportFacadesDB; public function ..

Read more

I am making an e-commerce website and trying to finish my order management for normal users/customers. I want to allow the customer to cancel an order if the status is still pending. I have an OrderHistoryController with the following: public function cancel(Order $order) { $order->status = ‘canceled’; $order->save(); //check if all suborders are canceled $pendingSubOrders ..

Read more

Pls can anyone help me to explain aimeos from start to finish. I am a laravel developer having 3months experience and have built 5 application with it. But the projects am embarking on now is e-commerce. Pls i need assistance from start to finish. Like the adjustment of frontend, admin panel, payment gateway, sending promotional ..

Read more

Am trying to save different image sizes with its original filename but its refusing and it keeps giving me the above error Below is my code if ($request->hasFile(‘image’)) { $image_tmp = $request->file(‘image’); if ($image_tmp->isValid()) { $filename = $request->file(‘image’)->getClientOriginalName(); $large_image_path = $request->image->store(‘images/backend_img/products/large’, $filename); $medium_image_path = $request->image->store(‘images/backend_img/products/medium’, $filename); $small_image_path = $request->image->store(‘images/backend_img/products/small’, $filename); //Resize Images Image::make($image_tmp)->save($large_image_path); Image::make($image_tmp)->resize(600,600)->save($medium_image_path); Image::make($image_tmp)->resize(300,300)->save($small_image_path); ..

Read more

Error message on page reload even after runing php artisan cache clear and then php artisan serve Trying to get property ‘code’ of non-object (View: C:xampphtdocsbagistoresourcesthemesvelocityviewsUIheader.blade.php) (View: C:xampphtdocsbagistoresourcesthemesvelocityviewsUIheader.blade.php) (View: C:xampphtdocsbagistoresourcesthemesvelocityviewsUIheader.blade.php) (View: C:xampphtdocsbagistoresourcesthemesvelocityviewsUIheader.blade.php) .env file config: What am I missing? Sourc..

Read more

Error message on page reload even after runing php artisan cache clear and then php artisan serve Trying to get property ‘code’ of non-object (View: C:xampphtdocsbagistoresourcesthemesvelocityviewsUIheader.blade.php) (View: C:xampphtdocsbagistoresourcesthemesvelocityviewsUIheader.blade.php) (View: C:xampphtdocsbagistoresourcesthemesvelocityviewsUIheader.blade.php) (View: C:xampphtdocsbagistoresourcesthemesvelocityviewsUIheader.blade.php) .env file config: What am I missing? Sourc..

Read more

i’m using laravel in my project , so when i add a product in the shop cart all the data is displayed except the product image. This is the cartcontroller.php: public function add(Request $request) { $produit=productmodel::find($request->id); Cart::add(array( ‘id’ =>$request->id, // inique row ID ‘name’ =>$request->product_name, ‘price’ => $request->product_price, ‘quantity’ =>$request->product_quantity, ‘attributes’ => array(‘photo’=>$request->product_image))); return redirect ..

Read more