Example #1
0
        foreach ($methodTypes as $methodType) {
            ?>
			<table class="table table-striped">
				<thead>
					<th><?php 
            echo $methodType->getShippingMethodTypeName() . t(" Methods");
            ?>
</th>
					<th class="text-right"><?php 
            echo t("Actions");
            ?>
</th>
				</thead>
				<tbody>
					<?php 
            foreach (StoreShippingMethod::getAvailableMethods($methodType->getShippingMethodTypeID()) as $method) {
                ?>
					<tr>
						<td><?php 
                echo $method->getName();
                ?>
</td>
						<td class="text-right">
							<a href="<?php 
                echo URL::to('/dashboard/store/settings/shipping/edit', $method->getShippingMethodID());
                ?>
" class="btn btn-default"><?php 
                echo t("Edit");
                ?>
</a>
                            <a href="<?php 
 public function delete()
 {
     $methods = StoreShippingMethod::getAvailableMethods($this->getShippingMethodTypeID());
     foreach ($methods as $method) {
         $method->delete();
     }
     $em = Database::get()->getEntityManager();
     $em->remove($this);
     $em->flush();
 }
Example #3
0
 public function isShippable()
 {
     $shippableItems = self::getShippableItems();
     $shippingMethods = StoreShippingMethod::getAvailableMethods();
     if (count($shippingMethods) > 0) {
         if (count($shippableItems) > 0) {
             return true;
         } else {
             return false;
         }
     } else {
         return false;
     }
 }