Navigation

    Bagisto Forum

    Bagisto

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    1. Home
    2. devansh-webkul
    3. Best
    D
    • Profile
    • Following
    • Followers
    • Topics
    • Posts
    • Best
    • Groups

    Best posts made by devansh-webkul

    • RE: Change arabic number format.

      Hi @rosisse,

      If you check this file packages/Webkul/Core/src/Core.php. In this file we have used NumberFormatter class. You need to set en locale for each object.

      For example,
      $num = NumberFormatter('en', NumberFormatter::DECIMAL);

      posted in General Discussion
      D
      devansh-webkul
    • RE: Where did you construct $product array [$product array is available in product detail page]

      Hi @AkashWeybee,

      As I have seen the screenshot, you are trying to access the object.

      There is a 'index()' method in file name i.e. 'packages/Webkul/Shop/src/Http/Controllers/ProductsCategoriesProxyController.php'.

      There is a variable '$product' present in the 'if' case, if you want to add custom field than asign property like this,

      $product->extra_field_1 = 'Test 1';
      $product->extra_field_2 = 'Test 2';
      

      And then in the main view access the object like this.

      {{ $product->extra_field_1 }}
      {{ $product->extra_field_2 }}
      
      posted in Knowledge Base
      D
      devansh-webkul
    • RE: Change the name of tax on frontend

      Hi @Deepanjali,

      Please look at the file at path 'packages/Webkul/Velocity/src/Resources/views/shop/checkout/total/summary.blade.php'.

      Change The Below Lines,

      @if ($cart->selected_shipping_rate)
          <div class="row">
              <span class="col-8">{{ __('shop::app.checkout.total.delivery-charges') }}</span>
              <span class="col-4 text-right">{{ core()->currency($cart->selected_shipping_rate->base_price) }}</span>
          </div>
      @endif
      
      @if ($cart->base_tax_total)
          @foreach (Webkul\Tax\Helpers\Tax::getTaxRatesWithAmount($cart, true) as $taxRate => $baseTaxAmount )
              <div class="row">
                  <span class="col-8" id="taxrate-{{ core()->taxRateAsIdentifier($taxRate) }}">{{ __('shop::app.checkout.total.tax') }} {{ $taxRate }} %</span>
                  <span class="col-4 text-right" id="basetaxamount-{{ core()->taxRateAsIdentifier($taxRate) }}">{{ core()->currency($baseTaxAmount) }}</span>
              </div>
          @endforeach
      @endif
      

      To

      @if ($cart->selected_shipping_rate)
          <div class="row">
              <span class="col-8">Transportation</span>
              <span class="col-4 text-right">{{ core()->currency($cart->selected_shipping_rate->base_price) }}</span>
          </div>
      @endif
      
      @if ($cart->base_tax_total)
          @foreach (Webkul\Tax\Helpers\Tax::getTaxRatesWithAmount($cart, true) as $taxRate => $baseTaxAmount )
              <div class="row">
                  <span class="col-8" id="taxrate-{{ core()->taxRateAsIdentifier($taxRate) }}">GST {{ $taxRate }} %</span>
                  <span class="col-4 text-right" id="basetaxamount-{{ core()->taxRateAsIdentifier($taxRate) }}">{{ core()->currency($baseTaxAmount) }}</span>
              </div>
          @endforeach
      @endif
      

      After that run php artisan vendor:publish --all --force

      Note: I hardcoded values with 'Transportation' and 'GST'. If you need translation support than you need to add values in translation.

      posted in Knowledge Base
      D
      devansh-webkul
    • RE: how to add another status or edit current status ?

      Hi @otheriz,

      Unless and until you are not manipulating the calculation in this method updateOrderStatus($order) in file packages/Webkul/Sales/src/Repositories/OrderRepository.php.

      In this method, 3 methods are calling which is depend on some calculations. Please go through it.

      posted in Modules
      D
      devansh-webkul
    • RE: I need to deliver the Api token from the json response not the header

      Hi @simi61193

      May, I know the full request data and URI you are hitting.

      posted in Modules
      D
      devansh-webkul
    • RE: TypeError: environment is null script.js:68:13

      Hi @olevacho,

      Please go to .env file and set up your database credentials. Then,

      1. Run php artisan config:cache.
      2. Run php artisan bagisto:install.
      3. Run php artisan serve.
      posted in General Discussion
      D
      devansh-webkul
    • RE: Decimal quantity ?

      Hi @nessuno,

      Please check this file packages/Webkul/Velocity/src/Resources/views/shop/UI/particals.blade.php, in this file you will found quantity-changer component, you need to adjust your settings here.

      For backend check this file packages/Webkul/Checkout/src/Cart.php, in this file there is a method updateItems().

      These two files will help you.

      posted in Knowledge Base
      D
      devansh-webkul
    • RE: Customer data at onepage.blade.php

      Hi @nessuno,

      Use {{ auth('customer')->user() }} to get current customer.

      posted in Knowledge Base
      D
      devansh-webkul
    • RE: Wrong Stats ( number of customers )

      Hi @nessuno,

      Please raise the same here,

      https://github.com/bagisto/bagisto/issues

      posted in Bug Report
      D
      devansh-webkul
    • RE: Custom Theme in Separate Package

      Hi @lukasyelle,

      It depends on development, if someone only wants to do the CSS stuff then this command is not needed because use can directly do in the resources folder.

      However, if you totally want to change the package and make theme from scratch. Then you can create a new package and use that command which you are telling by registering your assets in the provider.

      posted in Knowledge Base
      D
      devansh-webkul
    • RE: 6 issues - in cart -- paypal says already purchased new purchase - address cannot not choose , cart adds values and cannot delete values

      Hi @mikeyapina,

      From the images, I am not getting what you are saying. Please explain all the 6 issues in point so that we can further investigate.

      posted in Bug Report
      D
      devansh-webkul
    • RE: HIde unnecessary countries on checkout page and cart address

      Hi, @Nayan7030,

      1. For countries, you need to check the countries table in the database.
      2. For zip/postal, there are two themes default and velocity. For velocity, you need to check in this file packages/Webkul/Velocity/src/Resources/views/shop/checkout/onepage/customer-new-form.blade.php and for default, you need to check this file packages/Webkul/Shop/src/Resources/views/checkout/onepage/customer-info.blade.php.
      3. Important note, you need to handle the validation part also because in backend postal code is required. So for that, just comment the line in the file i.e. packages/Webkul/Checkout/src/Http/Requests/CustomerAddressForm.php you don't require.

      After that you need to run php artisan vendor:publish --all --force. This will reflect all your changes to the resources folder. Before hitting this command I would suggest you take back up of resources folder first.

      posted in General Discussion
      D
      devansh-webkul
    • RE: Override index.blade.php example

      Hi @nessuno,

      If you check the Laravel package development guide, you will see that,

      Laravel first try to check the view files in the resources folder,

      for e.g. you have created a view inside a package i.e. admin.layout.index that means laravel will first check the default path i.e. resources/views/admin/layout/index.

      If the view file not found then it will move to your package's view file from there it will load.

      I hope this will solve your problem.

      posted in Knowledge Base
      D
      devansh-webkul
    • RE: Override index.blade.php example

      Hi @nessuno,

      First one i.e. this->publish. This is will publish your assets.

      Second one i.e. loadFromView. This will load view.

      You can check Bagisto repository there are list of severals packages which will help you in this. Or you can check here i.e. https://devdocs.bagisto.com/1.x/packages/create_package.html.

      posted in Knowledge Base
      D
      devansh-webkul
    • RE: Prettus mismatch when issuing invoice via Tinker ( Prettus/Repository/Eloquent/BaseRepository::__construct() must be an instance of Illuminate/Container/Container )

      Hi @nessuno,

      Did you go deeper? If you check the OrderItemRepository, you will see that this class is extends to Repository and further it is extend to BaseRepository.

      There you will see that, constructor is calling which needs an application instance. Because reflection API won't work there so you need to pass the application object manually.

      So just try this and let me know,

      $a = new OrderItemRepository(app(), $this_order);
      
      posted in Knowledge Base
      D
      devansh-webkul
    • RE: Inventory deducted on order

      Hi @otheriz,

      There is a method named as 'saveOrder()' in file 'packages/Webkul/Shop/src/Http/Controllers/OnepageController.php'.

      This is the method where order is placed. If you want to go deeper than you will see that in this method we have used order repository.

      $order = $this->orderRepository->create(Cart::prepareDataForOrder());
      

      This line create your order, inside order repository's create method (Path: 'packages/Webkul/Sales/src/Repositories/OrderRepository.php'), you will see 'manageInventory' call.

      $this->orderItemRepository->manageInventory($orderItem);
      

      These are the methods which will help you.

      posted in Knowledge Base
      D
      devansh-webkul
    • RE: Inventory deducted on order

      Hi @otheriz,

      If you check this folder 'packages/Webkul/Product/src/Type', you will see that there are types of product class which is inherited by an abstract class.

      In class method you will find 'haveSufficientQuantity()'. This is the method which check sufficient quantity.

      posted in Knowledge Base
      D
      devansh-webkul
    • RE: Prettus mismatch when issuing invoice via Tinker ( Prettus/Repository/Eloquent/BaseRepository::__construct() must be an instance of Illuminate/Container/Container )

      Hi @nessuno,

      Thanks for the update.

      Also, if you like our support, you may give us the review here:- https://www.trustpilot.com/review/bagisto.com

      That would be grateful for us.

      Thanks & Regards,
      Devansh

      posted in Knowledge Base
      D
      devansh-webkul
    • RE: How does bagisto implement Vee-Validate

      Hi @Uyo-obong,

      We are using the vee-validate package. If you want to remove that field you need to check this documentation,

      https://vee-validate.logaretm.com/v2/guide/messages.html#field-specific-custom-messages

      I am giving you sample, this will help you, just go to the specific blade file where you want to change add this,

      const dict = {
          custom: {
              code: {
                  required: 'Something is required.'
              }
          }
      };
      

      After that, inside component's create or mount method add this,

      this.$validator.localize('en', dict);
      
      posted in General Discussion
      D
      devansh-webkul