Navigation

    Bagisto Forum

    Bagisto

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

    Posts made by DaniD

    • Integrate custom billing system

      Hi, how can I integrate for example in bagisto to be able to make invoices with this tool? Is there such a thing?
      https://packagist.org/packages/necenzurat/smartbill

      posted in General Discussion
      D
      DaniD
    • Modify cart quantity

      175e4f29-83ce-434e-be3c-e2fe2d152f7b-image.png
      From where I can change this with quantity from cart for exemple (2 items => one item have 2 products and one item 2 products). I want to show 4 not 2

      posted in General Discussion
      D
      DaniD
    • Set price based on country

      Hi, for example I have some country arrays, how could I set the price depending on the country?
      For example, I use this function but I don't get the location from the country basket.
      How can I proceed?

      $area1 = 'Hungary';
              
              $area2 = array('Czechia', 'Slovakia', 'Slovenia', 'Bulgaria', 'Serbia');
              
              $area3 = array('Poland', 'Germany', 'Switzerland', 'Netherlands',
                              'Liechtenstein', 'Austria', 'Italy', 'Croatia');
                              
              $area4 = array('Denmark', 'France', 'United Kingdom', 'Irland', 'San Marino',
                              'Vatican', 'Mocano', 'Portugal', 'Spain', 'Canary Islands');
                              
              $area5 = array('Greece', 'Andorra', 'Gibraltar', 'Sweden', 'Finland', 'Norway',
                              'Malta', 'Cyprus', 'Estonia', 'Lithuania', 'Latvia', 'Turkey');
      
              switch ($cart->shipping_address->country)
              {
                  case $area1:
                      $object->base_price = 18;
                  break;
      
                  case array_search($cart->shipping_address->country, $area2):
                      $object->base_price = 18;
                  break;
      
                  case array_search($cart->shipping_address->country, $area3): 
                      $object->base_price = 8;
                  break;
      
                  case array_search($cart->shipping_address->country, $area4): 
                  break;
      
                  case array_search($cart->shipping_address->country, $area5): 
                  break;
              }
      

      Or I tried with ifs but it doesn't work, I get error 500 when I want to post.
      He may not find the country.
      How would you proceed to set a price depending on the country?

      posted in General Discussion
      D
      DaniD
    • Calculate price depending on the weight of the product and the country

      Hi, in my custom payment method, how could I call from the cart to see which cities receive / country the products and their weight?
      For weight let's say I have an attribute but how can I take the country?

      posted in General Discussion
      D
      DaniD
    • RE: Change all products to another locale

      So. I have all the products on the website on the English site.
      I did another translation with 'ro' and put it in shop / front velocity etc.
      Eh, and from the front when I select ro, no products appear to me, nothing.
      And even in cms, they don't appear to me as if they were on the 'ro' place
      How can I proceed to move all products and categories to ro?
      @devansh-webkul

      posted in General Discussion
      D
      DaniD
    • RE: Change all products to another locale

      @devansh-webkul yes but i have categories and products on m website.
      I tried tutorial but not work...
      So how can I proceed to switch the current categories and products to the other local?

      posted in General Discussion
      D
      DaniD
    • Change all products to another locale

      Hello, I have all products on EN locale and I want change / copy on local ro, a basic method pls?

      posted in General Discussion
      D
      DaniD
    • Custom shipping method with all cities and calculate

      Hi, I followed the tutorial to make a custom delivery method, but how could I introduce all the cities in my country in this and somehow calculate them according to the requirements?
      When calculating, I know that I can get it from a bee from the delivery source, but how can all cities have it?

      posted in General Discussion
      D
      DaniD
    • Attribute to product card

      Hi, I would like to bring the attributes according to the product id on each product card.
      E.g:
      I have the x card with the product y information etc and I would like to bring some attributes on it
      This thing is made from what I saw in product-card.vue and the attributes on the product page are in the blade.
      Where could I send those attributes in vue?

      <div class="card-body">
                  <div class="product-name col-12 no-padding">
                      <a
                          class="unset"
                          :title="product.name"
                          :href="`${baseUrl}/${product.slug}`">
      
                          <span class="fs16">{{ product.name | truncate }}</span>
                          <span class="fs16">2</span>
                      </a>
                  </div>
      
                  <div class="sticker new" v-if="product.new">
                      {{ product.new }}
                  </div>
      
                  <div class="product-price fs16" v-html="product.priceHTML"></div>
      

      for example here i want to add some attributes

      posted in General Discussion
      D
      DaniD
    • Make custom awb

      Hello, how I can make a custom package for get custom awb
      from courier companies in the country when I order, give me the price from them

      posted in General Discussion
      D
      DaniD
    • Get cart items in controller like in Payment class abstract

      Hi, I would like to take the items from the cart in my payment package as they are taken in paypal only I need them in the controller.
      How can I proceed?
      I tried to do that

       $cart = $this->getCart();
      

      But I do this in the controller and I can't extend it to the payment class
      Another solution?

      posted in General Discussion
      D
      DaniD
    • RE: Custom payment method failed

      I do not receive a response when I call mobilpay ($ order)
      Maybe I shouldn't call where the order function is?
      Usually where would a payment function be called when the order is placed?

      posted in General Discussion
      D
      DaniD
    • Custom payment method failed

      Hi, I tried a guide for a custom payment.
      First I created the package, I created all the http files, routes and repository
      In the Controller I put a confirm class to confirm the payment when I am taken to the sandbox and in the Repository the logic of the payment itself which I call in the OrderRepository

      Controller
       protected $invoiceRepository;
      
          protected $this->orderRepository;
      
          public function __construct(
              OrderRepository $this->orderRepository,
              InvoiceRepository $invoiceRepository
          )
          {
              $this->orderRepository = $this->orderRepository;
      
              $this->invoiceRepository = $invoiceRepository;
          }
      
          public function confirm()
          {
              $response = Mobilpay::response();
              $data = $response->getData();
              Log::info("OrderID: {$data['orderId']} | Response: ".json_encode($data));
              $this->order = Order::where('id', $data['params']['orderId'])->first();
      
              if ($data['objPmNotify']['errorCode'] == 0 && $this->order) {
                  switch ($response->getMessage()) {
                      case 'confirmed_pending': // transaction is pending review. After this is done, a new IPN request will be sent with either confirmation or cancellation
                          $this->order->status_mobilpay = 'confirmed_pending';
                          // $payment->save();
                          //update DB, SET status = "pending"
      
                          break;
                      case 'paid_pending': // transaction is pending review. After this is done, a new IPN request will be sent with either confirmation or cancellation
                          $this->order->status_mobilpay = 'paid_pending';
                          // $payment->save();
                          //update DB, SET status = "pending"
      
                          break;
                      case 'paid': // transaction is pending authorization. After this is done, a new IPN request will be sent with either confirmation or cancellation
                          $this->order->status_mobilpay = 'paid';
                          // $payment->save();
                          //update DB, SET status = "open/preauthorized"
      
                          break;
                      case 'confirmed': // transaction is finalized, the money have been captured from the customer's account
                          $this->order->status_mobilpay = 'confirmed';
                          Mail::to($this->order->billing_email)->send(new Proforma($this->order->id));
                          if (!empty($this->settings->email_orders)) {
                              Mail::to($this->settings->email_orders)->send(new Proforma($this->order->id));
                          }
                          //update DB, SET status = "confirmed/captured"
      
                          break;
                      case 'canceled': // transaction is canceled
                          $this->order->status_mobilpay = 'canceled';
                          // $payment->save();
                          //update DB, SET status = "canceled"
      
                          break;
                      case 'credit': // transaction has been refunded
                          $this->order->status_mobilpay = 'credit';
                          // $payment->save();
                          //update DB, SET status = "refunded"
      
                          break;
                  }
                  $this->order->message_mobilpay = $data['objPmNotify']['errorMessage'];
                  $this->order->error_code_mobilpay = $data['objPmNotify']['errorCode'];
                  $this->order->save();
              } else {
                  if ($this->order) {
                      $this->order->message_mobilpay = $data['objPmNotify']['errorMessage'];
                      $this->order->error_code_mobilpay = $data['objPmNotify']['errorCode'];
                      $this->order->status_mobilpay = 'rejected';
                      $this->order->save();
                  }
              }
          }
      

      Repository

       public function pay(Order $order)
          {
              $mobilpayOrderId = time();
              $order->mobilpay_orderid = $mobilpayOrderId;
              $order->save();
              Mobilpay::setOrderId($mobilpayOrderId)
                  ->setAmount($order->total)
                  ->setAdditionalParams([
                      'orderId' => $order->id,
                  ])
                  ->setBillingAddress([
                      'type' => 1,
                      'firstName' => 'test',
                      'lastName' => 'test',
                      'country' => 'Romania',
                      'county' => 'test',
                      'city' => 'test',
                      'address' => 'test',
                      'email' => 'test',
                      'mobilePhone' => 'test',
                  ])
                  ->setShippingAddress([
                      'firstName' => 'test',
                      'lastName' => 'test',
                      'country' => 'Romania',
      	            'county' => 'test',
      	            'city' => 'test',
                      'address' => 'test',
                      'email' => 'test',
                      'mobilePhone' => 'test',
                  ])
                  ->setDetails('Comanda noua pe platforma '.env('APP_NAME'))
                  ->purchase();
          }
      

      And in OrderRepository before return order I tried this

      $mobilpayRepository = new MobilPayRepository();
              $mobilpayRepository->pay($order);
              return $order;
      

      What could be the problem?
      I don't get errors, I'm just not redirected.

      Can I provide other details?

      posted in General Discussion
      D
      DaniD
    • Problem with custom payment method

      Hi, I tried to make a custom payment method exactly on paypal.
      I copied the files from paypal and tried to change the links to the sandbox as in this documentation.

      public function getRedirectUrl($params = [])
          {
              return sprintf('http://sandboxsecure.mobilpay.ro',
                  $this->getConfigData('sandbox') ? 'sandbox.' : '',
                  $params ? '?' . http_build_query($params) : ''
              );
          }
      

      IPN

      protected function postBack()
          {
              if (array_key_exists('test_ipn', $this->post) && 1 === (int) $this->post['test_ipn']) {
                  $url = 'http://sandboxsecure.mobilpay.ro';
              } else {
                  $url = '';
              }
      
              $request = curl_init();
      
              curl_setopt_array($request, [
                  CURLOPT_URL            => $url,
                  CURLOPT_POST           => TRUE,
                  CURLOPT_POSTFIELDS     => http_build_query(array('cmd' => '_notify-validate') + $this->post),
                  CURLOPT_RETURNTRANSFER => TRUE,
                  CURLOPT_HEADER         => FALSE,
              ]);
      
              $response = curl_exec($request);
              $status = curl_getinfo($request, CURLINFO_HTTP_CODE);
      
              curl_close($request);
      
              if ($status == 200 && $response == 'VERIFIED') {
                  return true;
              }
      
              return false;
          }
      

      https://github.com/mobilpay/composer
      This is the documentation.
      My question is, how exactly could I make this work and be redirected properly?
      Can I make this method concrete or should I take a payment method to change it?
      What do you think and if you could give me some advice on how I could proceed

      posted in General Discussion
      D
      DaniD
    • RE: Payment gateaway free

      @ghermans For example, Can I implement extensions payseguro with another type payment?
      Like a payment from my country

      posted in General Discussion
      D
      DaniD
    • Payment gateaway free

      Hello, existing a free extension for payment gateway ? I want to make a payment with card and I don`t know who make this. I tried with a packaged but I failed.
      It's much different with the payments on the bagisto platform than I thought.
      How could I make this job easier than to make a card payment by just putting water where it should be done?
      I hope you can help me

      posted in General Discussion
      D
      DaniD
    • Custom payment method problem

      Target class [Webkul\Netopia\Payment\Standard] does not exist I get this error but class exist..
      I paid the code for the front. It appears in the admin panel, but not on the user front, what do you think is the problem?
      Have you ever encountered something like this?

       'key'    => 'sales.paymentmethods.netopia',
                      'name'   => 'admin::app.admin.system.netopia',
                      'sort'   => 4,
                      'fields' => [
      

      system.php from directory Payment
      Payments.php from custom payment packages

      
          'netopia' => [
              'code'             => 'netopia',
              'title'            => 'Netopia',
              'description'      => 'Netopia',
              'class'            => 'Webkul\Netopia\Payment\Standard',
              'sandbox'          => true,
              'active'           => true,
              'sort'             => 3,
          ],
      
      posted in General Discussion
      D
      DaniD
    • Change height Slider from home page

      Hello, how I can change the size of slider from home page?
      For example I put some images and they appear super large, how could I change the height?

      posted in General Discussion
      D
      DaniD
    • Create a new method payment with https://github.com/mobilpay/composer

      Hello, how I can create a new method payment with mobilpay?
      Is possible to implement this in bagisto or something?
      If it, can I get an explication how I can do this?
      https://github.com/mobilpay/composer

      posted in General Discussion
      D
      DaniD
    • Optimize category if I have more atributes

      Hi, I have a lot of product attributes and it's very hard to load when I fall into a category.
      How can I optimize this whole thing?

      posted in General Discussion
      D
      DaniD