Laravel 8 E-Commerce - Admin Making On Sale Timer Working

Поделиться
HTML-код
  • Опубликовано: 28 сен 2024
  • In this video I will talk about Admin Making On Sale Timer Working.
    TOPIC DISCUSSED:
    Making On Sale Timer Working
    Create Sale Timer Setting Page
    Add DateTime Picker
    Your Queries -
    1.How to make on sale timer working on homepage in laravel 8 ecommerce?
    2.How to add datetime picker in laravel 8 ecommerce?
    3.How to use sale timer for the on sale products in laravel 8 ecommerce?
    4.What are the steps for making on sale timer working on homepage in laravel 8 ecommerce?
    Template Url:
    github.com/sur...
    FOLLOW SURFSIDE MEDIA:
    / surfsidem
    / mediasurfside
    github.com/sur...
    / surfsidemedia
    #laravel #laravel8 #laravel8x

Комментарии • 69

  • @peterkovacs9086
    @peterkovacs9086 2 года назад +1

    Guys, if yours datetimepicker is not working, thats becouse you ignore cdn versions on the dropdown list or you choose another version. Check the cdn version in this video and choose that to copy...

  • @mdsahabubalam9570
    @mdsahabubalam9570 3 года назад +1

    awesome explanation,make checkout and payment system

    • @raudbook9683
      @raudbook9683 3 года назад

      when add to shopping cart that time added regular_price but its should be sale_price

    • @kitky
      @kitky 3 года назад +1

      @@raudbook9683 I think you can make some changes as below:
      In CartComponent.php
      public function render()
      {
      $sale = Sale::find(1);
      return view('livewire.cart-component', [
      'sale' => $sale
      ])->layout('layouts.base');
      }
      In cart-component.blade.php
      @if ($row->model->sale_price > 0 && $sale->status == 1 && $sale->sale_date > Carbon\Carbon::now())
      ${{ $row->model->sale_price }}
      @else
      ${{ $row->model->regular_price }}
      @endif

  • @mahmudrashid492
    @mahmudrashid492 2 года назад +1

    tired everyting ..added bootstrap 3 cdn ..but still date time picker not working ....how to fix ??

  • @diyaaghanem9172
    @diyaaghanem9172 3 года назад +2

    I'm Using a different layout for admin dashboard but datetimepicker doesn't work :"(
    any one can help?
    i'm using adminLTE dashboard

  • @gadgetkh9408
    @gadgetkh9408 3 года назад

    Thank you for your video! By the way, which extension do you use for the color bars matching each syntax?

    • @SurfsideMedia
      @SurfsideMedia  3 года назад

      indent-rainbow

    • @raudbook9683
      @raudbook9683 3 года назад

      @@SurfsideMedia when add to shopping cart that time added regular_price but its should be sale_price

    • @raudbook9683
      @raudbook9683 3 года назад

      @@SurfsideMedia when add to shopping cart that time added regular_price but its should be sale_price

  • @abusayeed7309
    @abusayeed7309 3 года назад

    Sir time picker not found. Same thing happened on categories earlier. I didn't understand what the problem is. I have done everything like you did.
    @push('scripts')
    $(function()
    {
    $('#sale-date').datetimepicker({
    format: 'Y-MM-DD h:m:s',
    })
    .on('dp.change',function(ev){
    var data =$('$sale-date').val();
    @this.set('sale_date',data);
    });
    });
    @endpush

  • @jessicanneka5026
    @jessicanneka5026 3 года назад

    here is how to solve datetime not showing=> in your base.blade.php file, make sure bootstrap 3 cdn is directly above the datetimepicker cdn in styles; now in the js script part, bootstrap first, moment.js second followed by datetimepicker cdn.

  • @shahaludheenk1533
    @shahaludheenk1533 3 года назад +1

    Plz do price rangr slider filter on nxt video

  • @muhammadsaharhussain4656
    @muhammadsaharhussain4656 3 года назад +2

    sir my datetimepicker is working properly but it didnt shows the arrows for chaning month year and days properly

    • @muhammadsaharhussain4656
      @muhammadsaharhussain4656 3 года назад

      now its start working with bootstrap 3 cdn. will it work with latest bootstrap version if i change the version of datetimepicker cdn?

    • @SurfsideMedia
      @SurfsideMedia  3 года назад

      This Template is based on bootstrap 3 so you can only use bootstrap 3 cdn

    • @hildepalmans748
      @hildepalmans748 3 года назад

      @@SurfsideMedia does it mean we have to import also a version 3 of the cdn? Because I tried several versions and none of them works correctly (it doen's show the arrows or the mini clock in the bottom)

    • @moisescorchoperez4860
      @moisescorchoperez4860 3 года назад

      @@hildepalmans748 did you manage to correct?

    • @moisescorchoperez4860
      @moisescorchoperez4860 3 года назад

      I've the same error, did you manage to correct?

  • @dadomultimediamusic
    @dadomultimediamusic 3 года назад +2

    I would like to share this adjustment for the cart-component.blade.php:
    @if($item->model->sale_price > 0 && $sale->status == 1 && $sale->sale_date > Carbon\Carbon::now())
    ${{ $item->model->regular_price }}
    @else
    ${{ $item->model->regular_price }}
    @endif

    • @vatlyvadoisong3
      @vatlyvadoisong3 2 года назад +1

      Nice bro!

    • @thachpham1843
      @thachpham1843 2 года назад +1

      some thing wrong, bro. i will correct below
      @if($item->model->sale_price > 0 && $sale->status == 1 && $sale->sale_date > Carbon\Carbon::now())
      ${{ $item->model->sale_price }}
      @else
      ${{ $item->model->regular_price }}
      @endif
      And also adding $sale = Sale::find(1); in render() function of CartComponent

  • @akibrahman1497
    @akibrahman1497 3 года назад +2

    everything is working except count down. The Count system is not working everything is showing 0-0-0 please help me please

  • @abdulwahab7578
    @abdulwahab7578 3 года назад +2

    On sale date is not working

  • @muhammaddanial5075
    @muhammaddanial5075 2 года назад +1

    Thanks for video but datetimepicker icons are not visible and AM/PM control does not work I've put necessary links in base.blade please any suggestions

  • @thatsfantastic313
    @thatsfantastic313 2 года назад +2

    My timer is not showing data-expire time even before applying carbon... :( please help

  • @two-zero
    @two-zero 2 года назад +1

    Thank you, every day I'm learning from your code. Best teacher.

  • @olegpupkin6892
    @olegpupkin6892 2 года назад

    There is one problem! Then i delete "sale price" on edit product page comes error - SQLSTATE[22007]: Invalid datetime format: 1366 Incorrect decimal value: '' for column `tattoomarket`.`products`.`sale_price` at row 1 (SQL: update `products` set `sale_price` = , `products`.`updated_at` = 2021-10-19 16:41:15 where `id` = 7)

  • @olegpupkin6892
    @olegpupkin6892 2 года назад +2

    The best teacher ever!!!👏

  • @seif-eddinesegueni548
    @seif-eddinesegueni548 3 года назад

    Hey,my datetime picker is not working, it's blank ,how can i fix this without using bootstrap 3 cuz it will affect on my theme ?

  • @hazimmarzuki_
    @hazimmarzuki_ 6 месяцев назад

    Did i need livewire?

  • @ayahosny6995
    @ayahosny6995 2 года назад

    it works with me only when i change type of input from text to datetime-local and update doesn't work at all

  • @sagarwakchaure3092
    @sagarwakchaure3092 3 года назад +1

    Hello sir this is not working for 24 hours format ? because when we give time 4.00 or 16.00 ...Both are consider as 4.00 AM ... So How to give time for evening 4.00 ...please help sir...

    • @raudbook9683
      @raudbook9683 3 года назад

      when add to shopping cart that time added regular_price but its should be sale_price

    • @kitky
      @kitky 3 года назад +3

      MySQL datetime format
      2021-05-22 15:15:00
      Countdown Plugin datetime format
      2021/05/22 15:15:00
      In admin-sale-component.blade.php

      $(function () {
      $('#sale-date').datetimepicker({
      format: 'YYYY-MM-DD HH:mm',
      icons: {
      time: "fa fa-clock-o",
      date: "fa fa-calendar",
      up: "fa fa-arrow-up",
      down: "fa fa-arrow-down",
      previous: "fa fa-chevron-left",
      next: "fa fa-chevron-right",
      today: "fa fa-clock-o",
      clear: "fa fa-trash-o"
      },
      })
      .on('dp.hide', function (ev) {
      var data = $('#sale-date').val();
      @this.set('sale_date', data);
      });
      });
      In home-component.blade.php
      @php
      $expireDate = Carbon\Carbon::parse($sale->sale_date)->format('Y/m/d H:i:s');
      @endphp

    • @kitky
      @kitky 3 года назад

      Noted that for the varying timezone, we might specify the timezone to make the homepage countdown and product details page work as expected.
      For example, in home-component.blade.php
      update the IF condition of the on-sale component:
      @if ($sproducts->count() > 0 && $sale->status == 1 && $sale->sale_date > Carbon\Carbon::now('Asia/Hong_Kong'))
      @endif
      Timezone Ref:
      www.php.net/manual/en/timezones.php

    • @keyyung2807
      @keyyung2807 3 года назад

      @@kitky thanks brother im missing those navigation icon, you helped me alots!

  • @raudbook9683
    @raudbook9683 3 года назад

    when add to shopping cart that time added regular_price but its should be sale_price

  • @mahmudrashid492
    @mahmudrashid492 2 года назад

    stuck in 17:52 ...this push script is not working in my code ..how to fix ?

  • @thatsfantastic313
    @thatsfantastic313 2 года назад

    My icons are not showing on datetimepicker :(

  • @shahaludheenk1533
    @shahaludheenk1533 3 года назад

    How to update cart count automatically when we click add to cart button

  • @syaifukiara
    @syaifukiara 3 года назад

    Best tutorial

  • @devlaravel8871
    @devlaravel8871 3 года назад

    why did you comment the line for the bootstrap.min.css ? did I forget something ?

    • @SurfsideMedia
      @SurfsideMedia  3 года назад +1

      I added the bootstrap 3 cdn, because of the glyphicon was not working.

    • @devlaravel8871
      @devlaravel8871 3 года назад

      @@SurfsideMedia yes but I did not saw it in your previous video

    • @raudbook9683
      @raudbook9683 3 года назад

      when add to shopping cart that time added regular_price but its should be sale_price

  • @pandipandi2050
    @pandipandi2050 3 года назад

    Even if connecting with internet,icons(arrows, time)icons not viewed properly in datetimepicker..can you say any suggestion to solve that

    • @SurfsideMedia
      @SurfsideMedia  3 года назад

      Please add the bootstrap cdn (css and js) in base layout file

    • @rifathosen8387
      @rifathosen8387 3 года назад

      @@SurfsideMedia i am add this but its still not working

    • @nguyenvd2169
      @nguyenvd2169 2 года назад

      @@rifathosen8387 did you fix the error yet?

  • @theodorabi-mansour1750
    @theodorabi-mansour1750 3 года назад

    lovely explanation, keep up the good work.

    • @raudbook9683
      @raudbook9683 3 года назад

      when add to shopping cart that time added regular_price but its should be sale_price

  • @devlaravel8871
    @devlaravel8871 3 года назад

    when I click on the sale date to pick a date, it appears 2 seconds and then disappears.... please help me :) is there any known bug on Chrome ?

    • @sagarwakchaure3092
      @sagarwakchaure3092 3 года назад

      Can you solve this issue ? I also have same issue ...

    • @devlaravel8871
      @devlaravel8871 3 года назад

      @@sagarwakchaure3092 I still don't know how to resolve this bug sorry !

    • @sagarwakchaure3092
      @sagarwakchaure3092 3 года назад

      @@devlaravel8871 ok... Thanks for reply...

    • @ramilo69
      @ramilo69 3 года назад

      @Krishnadev P Melevila I don't have any problem if I change the date and time when I have it set to "inactive", if I change it to active if the calendar closes .... it's weird.

    • @kitky
      @kitky 3 года назад +11

      ​@@devlaravel8871 In admin-sale-component.blade.php
      Replace
      .on('dp.change', function (ev) {
      var data = $('#sale-date').val();
      @this.set('sale_date', data);
      });
      To
      .on('dp.hide', function (ev) {
      var data = $('#sale-date').val();
      @this.set('sale_date', data);
      });