Set Product order.

@route POST /api/v1/products/sort
@authentication required
330483
public function sort()
    {
        if (!Input::has('sortable')) {
            return $this->jsonErrorResponse('"sortable" is required.');
        }

        $product = Subbly::api('subbly.product')->sort(Input::get('sortable'));

        return $this->jsonResponse(array(),
        array(
            'status' => array('message' => 'Product updated'),
        ));
    }
454028
function set_sort_order($sort_col, $sort_order = null)
    {
        if ($sort_col != null && ($this->coltypes[$sort_col] || in_array($sort_col, $this->coltypes))) {
            $this->sort_col = $sort_col;
        }
        if ($sort_order != null) {
            $this->sort_order = strtoupper($sort_order) == 'DESC' ? 'DESC' : 'ASC';
        }
    }
1076995
public function setOrder($sortParam)
    {

        if (!isset($sortParam) || !is_string($sortParam)) return;

        if (substr($sortParam, 0, 1) == '-') {
            $direction = SORT_DESC;
            $sortParam = substr($sortParam, 1);
        } else {
            $direction = SORT_ASC;
        }
        if (array_key_exists($sortParam, $this->attributes)) {
            $this->orderBy = [$sortParam => $direction];
        }
    }
508643
protected function pushOrder()
    {
        if( $this->order ) {
            $this->parts[] = 'ORDER BY';
            $this->parts[] = $this->quoteIdentifierIfNotExpression($this->order);
            $this->parts[] = $this->direction == self::DESC ? self::DESC : self::ASC;
        }
    }
370147
public function updateOrder($requestParams)
    {
        $options["headers"] = self::retrieveContentTypeHeader(self::CONTENT_TYPE_JSON);
        $requiredParams = array("offer");
        return $this->client->request($requestParams, $this->_mainTransactionEndpoint . "/" . self::ORDER, "put", $requiredParams, $options);
    }
23757
def set_sort(self, request):
        
        # Look for 'sort' in get request. If not available use default.
        sort_request = request.GET.get(self.sort_parameter, self.default_sort)
        if sort_request.startswith('-'):
            sort_order = '-'
            sort_field = sort_request.split('-')[1]
        else:
            sort_order = ''
            sort_field = sort_request
        # Invalid sort requests fail silently
        if not sort_field in self._allowed_sort_fields:
            sort_order = self.default_sort_order
            sort_field = self.default_sort_field
        return (sort_order, sort_field)
107183
protected function setSortingOrder()
    {
        if (null !== $this->info->list->default_sort) {
            return $this;
        }

        if ($this->info->list->orderable && $this->info->list->getOrderableColumn()) {
            $this->info->list->default_sort = $this->info->list->getOrderableColumn();
        } elseif ($this->info->timestamps) {
            $this->info->list->default_sort = $this->info->timestamp_created;
        } elseif ($this->info->incrementing) {
            $this->info->list->default_sort = $this->model->getKeyName();
        }

        return $this;
    }
449654
public function order(array &$submitted, array $options = array())
    {
        $this->options = $options;
        $this->submitted = &$submitted;

        $this->validateOrder();
        $this->validateStoreId();
        $this->validatePaymentOrder();
        $this->validateShippingOrder();
        $this->validateStatusOrder();
        $this->validateShippingAddressOrder();
        $this->validatePaymentAddressOrder();
        $this->validateUserCartId();
        $this->validateCreatorOrder();
        $this->validateTotalOrder();
        $this->validateData();
        $this->validateComponentPricesOrder();
        $this->validateCurrencyOrder();
        $this->validateCommentOrder();
        $this->validateTransactionOrder();
        $this->validateLogOrder();

        $this->unsetSubmitted('update');

        return $this->getResult();
    }
280998
public function setOrderItems($value)
    {
        if (!$this->_isNumericArray($value)) {
            $value = array ($value);
        }
        $this->_fields['OrderItems']['FieldValue'] = $value;
        return $this;
    }
72617
protected function prepareOrderAccountOrder(array &$order)
    {
        $this->setItemTotalFormatted($order, $this->price);
        $this->setItemOrderAddress($order, $this->address);
        $this->setItemOrderStoreName($order, $this->store);
        $this->setItemOrderStatusName($order, $this->order);
        $this->setItemOrderPaymentName($order, $this->payment);
        $this->setItemOrderShippingName($order, $this->shipping);
    }
1361539
protected function _setOrder()
    {
        $order = $this->_sql->getOrder();
        if (!(is_null($order) || empty($order))) {
            $this->_statement .= " ORDER BY {$order}";
        }
        return $this;
    }
529530
public function setOrders($orders)
    {
        foreach ($orders as $order) {
            $this->orders[$order->id] = $order->expose();
        }
    }
1227769
protected function setSort()
    {
        $this->sort = Input::get($this->sortName, []);
        if (!is_array($this->sort)) {
            return;
        }

        if (empty($this->sort['column']) || empty($this->sort['type'])) {
            return;
        }

        if (str_contains($this->sort['column'], '.')) {
            $this->setRelationSort($this->sort['column']);
        } else {
            $this->resetOrderBy();

            $this->queries->push([
                'method' => 'orderBy',
                'arguments' => [$this->sort['column'], $this->sort['type']],
            ]);
        }
    }
799806
public function prepareOrder()
    {
        $this->setPaymorrowPaymentMethodId();

        /** @var OxpsPaymorrowRequestControllerProxy $pmGateWay */
        $pmGateWay = oxNew('OxpsPaymorrowRequestControllerProxy');

        $oUtils = oxRegistry::getUtils();
        $oUtils->setHeader("Content-Type: application/json");
        $oUtils->showMessageAndExit($pmGateWay->prepareOrder($_POST));
    }
988444
public function reorder()
    {
        $store = $this->getRepository()->getStore();
        $query = $this->getScopedQuery($this->_mixer);
        $store->execute('SET @order = 0');
        $query->update('@col(ordering) = (@order := @order + 1)')->order('ordering', 'ASC');
        $store->execute($query);
    }
354158
private function applyOrdering()
    {
        if (empty($this->menu)
            || $this->orderingApplied
        ) {
            return;
        }

        uasort($this->menu, array($this, 'menuCompare'));
        foreach ($this->menu as $key => &$element) {
            if (is_null($element)) {
                unset($this->menu[$key]);
            } elseif ($element['_hasSubmenu']) {
                uasort($element, array($this, 'menuCompare'));
            }
        }

        $this->orderingApplied = true;
    }
899351
def place_order!()
      if has_order_items?
        order_template = order_object
        order_template = yield order_object if block_given?

        @virtual_server.softlayer_client[:Product_Order].placeOrder(order_template)
      end
    end