Covering OroCommerce, OroCRM, OroPlatform topics, including community updates and company announcements.

Forums Forums Oro Community Shipping Freight Class

This topic contains 0 replies, has 1 voice, and was last updated by  marius.negoescu 2 years, 11 months ago.

Starting from March 1, 2020 the forum has been switched to the read-only mode. Please head to StackOverflow for support.

  • Creator
  • #40075


    Hi, guys

    I have added an extra freight class: pallet.

    I had no problem in adding the data to the database, but I am struggling with creating the FreightClassesExtension class which implements the FreightClassesExtensionInterface.

    I have followed this guide:

    I have created the class in my bundle:

    namespace Oro\Bundle\ShippingDemoBundle\Extension\Shipping;

    use Oro\Bundle\ShippingBundle\Entity\FreightClassInterface;
    use Oro\Bundle\ShippingBundle\Entity\ProductShippingOptionsInterface;
    use Oro\Bundle\ShippingBundle\Extension\FreightClassesExtensionInterface;

    class FreightClassesExtension implements FreightClassesExtensionInterface
    * {@inheritdoc}
    public function isApplicable(FreightClassInterface $class, ProductShippingOptionsInterface $options)
    if ($class->getCode() === ‘demo_class50’) {
    return $this->checkClass50($options);
    } elseif ($class->getCode() === ‘demo_class55’) {
    return $this->checkClass55($options);

    return false;

    //Other protected methods that implement logic to verify given options against given freight class

    and added it to the services.yml like this:

    class: ‘Oro\Bundle\ShippingDemoBundle\Extension\Shipping\FreightClassesExtension’
    – { name: oro_shipping.extension.freight_classes }

    but when I go to a product it keeps saying:

    Attempted to load class “FreightClassesExtension” from namespace “Oro\Bundle\ShippingDemoBundle\Extension\Shipping”.
    Did you forget a “use” statement for another namespace?

    Any ideas ?

    Cheers, Marius

The forum ‘Oro Community’ is closed to new topics and replies.

Back to top

You will be redirected to [title]. Would you like to continue?

Yes No

You will be redirected to [title]. Would you like to continue?

Yes No