magepal / magento2-custom-shipping-rate

Create your own Custom Shipping rates for admin order or a predefined sets of shipping methods for frontend customers.
http://www.magepal.com
93 stars 32 forks source link

Create package and shipping label #4

Closed shashikant-wagh closed 6 years ago

shashikant-wagh commented 6 years ago

Hi,

Checked this module and its really awesome, although I have a question if I want to create shipping label and package how should do this using this code.

srenon commented 6 years ago

@LV2Code ... Please provide more information on what you are trying to do

shashikant-wagh commented 6 years ago

I want to create package at submit shipment page from the products in order, I have tried many things so far without any luck.

If you can share some light on it, it will be really helpful.

Thanks

srenon commented 6 years ago

@LV2Code ... Take a look at Magento/Shipping/Model/Carrier/AbstractCarrier.php

Returning true from one of this function should address your issue. Let me know which one and I will add it.

  /**
 * Check if carrier has shipping tracking option available
 *
 * @return bool
 */
public function isTrackingAvailable()
{
    return false;
}

/**
 * Check if carrier has shipping label option available
 *
 * @return bool
 */
public function isShippingLabelsAvailable()
{
    return false;
}