/**
  * Allows the opportunity for the Order Step to add any fields to Order::getCMSFields
  *
  * @param FieldList $fields
  * @param Order $order
  * @return FieldList
  **/
 function addOrderStepFields(FieldList $fields, Order $order)
 {
     $fields = parent::addOrderStepFields($fields, $order);
     $title = _t("OrderStep.MUSTENTERDISPATCHRECORD", " ... To move this order to the next step you enter the dispatch details in the logs.");
     $fields->addFieldToTab("Root.Next", $order->getOrderStatusLogsTableField("OrderStatusLog_DispatchPhysicalOrder", $title), "ActionNextStepManually");
     return $fields;
 }
 /**
  * Allows the opportunity for the Order Step to add any fields to Order::getCMSFields
  *@param FieldList $fields
  *@param Order $order
  *@return FieldList
  **/
 function addOrderStepFields(FieldList $fields, Order $order)
 {
     $fields = parent::addOrderStepFields($fields, $order);
     $title = _t("OrderStep.CANADDGENERALLOG", " ... if you want to make some notes about this step then do this here...");
     $fields->addFieldToTab("Root.Next", $order->getOrderStatusLogsTableField("OrderStatusLog", $title), "ActionNextStepManually");
     return $fields;
 }
 /**
  * Allows the opportunity for the Order Step to add any fields to Order::getCMSFields
  * @param FieldList $fields
  * @param Order $order
  * @return FieldList
  **/
 function addOrderStepFields(FieldList $fields, Order $order)
 {
     $fields = parent::addOrderStepFields($fields, $order);
     $title = _t("OrderStep.MUSTDOPAYMENTCHECK", " ... To move this order to the next step you must carry out a payment check (is the money in the bank?) by creating a record here (click me)");
     $fields->addFieldToTab("Root.Next", $order->getOrderStatusLogsTableField("OrderStatusLog_PaymentCheck", $title), "ActionNextStepManually");
     $fields->addFieldToTab("Root.Next", new LiteralField("ExampleOfThingsToCheck", "<ul><li>" . implode("</li><li>", EcommerceConfig::get("OrderStep_Confirmed", "list_of_things_to_check")) . "</li></ul>"), "ActionNextStepManually");
     return $fields;
 }
 /**
  * Allows the opportunity for the Order Step to add any fields to Order::getCMSFields
  *@param FieldList $fields
  *@param Order $order
  *@return FieldList
  **/
 function addOrderStepFields(FieldList $fields, Order $order)
 {
     $fields = parent::addOrderStepFields($fields, $order);
     if (!$order->IsPaid()) {
         $header = _t("OrderStep.SUBMITORDER", "Order NOT Paid");
         $msg = _t("OrderStep.ORDERNOTPAID", "This order can not be completed, because it has not been paid. You can either create a payment or change the status of any existing payment to <i>success</i>.");
         $fields->addFieldToTab("Root.Next", new HeaderField("NotPaidHeader", $header, 3), "ActionNextStepManually");
         $fields->addFieldToTab("Root.Next", new LiteralField("NotPaidMessage", '<p>' . $msg . '</p>'), "ActionNextStepManually");
     }
     return $fields;
 }
 /**
  * Allows the opportunity for the Order Step to add any fields to Order::getCMSFields
  *@param FieldList $fields
  *@param Order $order
  *@return FieldList
  **/
 function addOrderStepFields(FieldList $fields, Order $order)
 {
     $fields = parent::addOrderStepFields($fields, $order);
     if (!$order->IsSubmitted()) {
         //LINE BELOW IS NOT REQUIRED
         $header = _t("OrderStep.SUBMITORDER", "Submit Order");
         $label = _t("OrderStep.SUBMITNOW", "Submit Now");
         $msg = _t("OrderStep.MUSTDOSUBMITRECORD", "<p>Tick the box below to submit this order.</p>");
         $problems = array();
         if (!$order->getTotalItems()) {
             $problems[] = "There are no --- Order Items (products) --- associated with this order.";
         }
         if (!$order->MemberID) {
             $problems[] = "There is no --- Customer --- associated with this order.";
         }
         if (!$order->BillingAddressID) {
             $problems[] = "There is no --- Billing Address --- associated with this order.";
         } elseif ($billingAddress = $order->BillingAddress()) {
             $requiredBillingFields = $billingAddress->getRequiredFields();
             if ($requiredBillingFields && is_array($requiredBillingFields) && count($requiredBillingFields)) {
                 foreach ($requiredBillingFields as $requiredBillingField) {
                     if (!$billingAddress->{$requiredBillingField}) {
                         $problems[] = "There is no --- {$requiredBillingField} --- recorded in the billing address.";
                     }
                 }
             }
         }
         if (count($problems)) {
             $msg = "<p>You can not submit this order because:</p> <ul><li>" . implode("</li><li>", $problems) . "</li></ul>";
         }
         $fields->addFieldToTab("Root.Next", new HeaderField("CreateSubmitRecordHeader", $header, 3), "ActionNextStepManually");
         $fields->addFieldToTab("Root.Next", new LiteralField("CreateSubmitRecordMessage", $msg), "ActionNextStepManually");
         if (!$problems) {
             $fields->addFieldToTab("Root.Next", new CheckboxField("SubmitOrderViaCMS", $label), "ActionNextStepManually");
         }
     }
     return $fields;
 }
 /**
  * Allows the opportunity for the Order Step to add any fields to Order::getCMSFields
  *@param FieldSet $fields
  *@param Order $order
  *@return FieldSet
  **/
 function addOrderStepFields(FieldList $fields, Order $order)
 {
     $fields = parent::addOrderStepFields($fields, $order);
     return $fields;
 }
 /**
  * Allows the opportunity for the Order Step to add any fields to Order::getCMSFields
  *
  * @param FieldList $fields
  * @param Order $order
  *
  * @return FieldList
  **/
 function addOrderStepFields(FieldList $fields, Order $order)
 {
     $fields = parent::addOrderStepFields($fields, $order);
     $fields->addFieldToTab("Root.Next", new HeaderField("DownloadFiles", _t("ElectronicDelivery_OrderStep.AVAILABLE_FOR_DOWNLOAD", "Files are available for download"), 3), "ActionNextStepManually");
     return $fields;
 }
Esempio n. 8
0
 /**
  * Allows the opportunity for the Order Step to add any fields to Order::getCMSFields
  *@param FieldSet $fields
  *@param Order $order
  *@return FieldSet
  **/
 function addOrderStepFields(&$fields, $order)
 {
     $fields = parent::addOrderStepFields($fields, $order);
     $msg = _t("OrderStep.CANADDGENERALLOG", " ... if you want to make some notes about this order then do this here ...");
     $fields->addFieldToTab("Root.Next", $order->OrderStatusLogsTable("OrderStatusLog_Archived", $msg), "ActionNextStepManually");
     return $fields;
 }