Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [order]

The tag has no usage guidance.

1
vote
1answer
17 views

Special order filter (by language) in CP for Craft Commerce

We have a online-shop for german customers (Craft 2 + Commerce 1) and will expand the shop for american customers (via second domain). Is there a way to filter the order (status) views in the Backend ...
1
vote
0answers
16 views

Getting the order for categories.lft rgt

While trying to assign a global CSS class based on the order of the categories based on the drag and drop in the admin editor. The categories I'm using is a single 1 level deep category. It seems ...
1
vote
0answers
19 views

Commerce: reading Stripe object in Craft Transaction model

I'm looking to add the credit card last four digits to my customer's frontend order history. Stripe is the gateway. The Stripe transaction object doesn't seem to be available in the Craft ...
1
vote
1answer
85 views

How to save Order Status Message in Craft Commerce using frontend form

It's easy enough update the order status from the frontend using: <input type="hidden" name="action" value="commerce/orders/updateStatus"> <input type="hidden" name="orderId" value="{{ order....
1
vote
0answers
18 views

How to sort entries via categories?

I am creating a site on which I want to list images, ordered after month and year. I created two category-groups, one is called "Month" and one "Year". (They contain all months as single category and ...
1
vote
2answers
60 views

Partial Order Fulfillment

Is it possible to fulfil orders partially? For instance when only two of four products are in stock, would it be possible to ship the two items immediately?
1
vote
1answer
155 views

Placing a Test Order (Craft Commerce)

This is a really basic question but I have had trouble finding an answer, or documentation on it. What is the best way to place a test order with a default Craft Commerce installation? I'm unable to ...
3
votes
3answers
56 views

Show time ordered entries from midnight at end of loop

I'm creating a line up listing page for a festival, across 4 nights. Acts are listed, per day, sorted by a date field in order of a start time field. The issue I'm having is that midnight until 3am ...
1
vote
1answer
29 views

what does {% set order = 'pin desc, postDate desc' %} do?

I am new to using twig and I do not understand how this line of code works. If you could explain that would be wonderful! thanks:)
1
vote
1answer
25 views

Product category not being added to the order model. Craft Commerce

I've created a form in which to specify a category for a product on the product entry page. I can't seem to add the category that the customer selects to the order model. I've checked the orders in ...
1
vote
1answer
60 views

Missing Download PDF Button in Orders for Craft Commerce

I'm not sure what happened, but the "Download PDF" button that is on the orders in the CMS is missing. I thought maybe the order PDF template file or path was missing but both of those are there. Is ...
3
votes
3answers
164 views

Option and notes fields after cart at checkout for order, not just line items

My client has gift wrapping services but they apply to the entire order, not one single line item. How would I add notes or custom fields to the entire order, at the shipping stage of checkout? is ...
2
votes
1answer
61 views

Creating a sitemap/index page, ordered by A-Z and 0-9

I'm created an Index like page (like at the back of a book) for entries within a certain section, ordered alphabetically with the letter proceeding it. My code below seems like a tedious way to do it,...
3
votes
1answer
173 views

Set Entries field in Commerce order on completion

I'm trying to set an Entries field within a Commerce Order once the order completes. I've tried using the onOrderComplete event like so; craft()->on('commerce_orders.onOrderComplete',function($...
1
vote
0answers
126 views

Craft Commerce: Sort products by Sale price

Trying to sort products by price. {% set products = craft.commerce.products({ type: 'footwear', limit: shopSettings.productsPerPage, order: 'defaultPrice asc', }) %} It works fine. Please ...
1
vote
1answer
118 views

Sort entry titles alphabetically excluding 'The'?

I need to list the names of all of my entries in alphabetical order excluding 'the' (which could only be at the beginning). I've looked around online, but I was only able to find a code segment (which ...
1
vote
2answers
374 views

Craft Commerce - Edit Complete Order Address from frontend

We are trying to give our clients the ability to update an order's shipping address before the order has been actually shipped. We've created a members area where they can list their orders and ...
1
vote
1answer
193 views

Sort products by category field value

All of my products have a category field called stateCat. These state categories have a field called stateImportance. This is because some states are more important than others and I want to sort the ...
1
vote
1answer
325 views

Sort entries by custom date in Matrix field / Super Table

I currently have numerous Super Tables with date fields inside and I am trying to get all table items to list themselves together in date order depending on what the user inputs. I have tried using ...
1
vote
1answer
275 views

Craft Commerce - Create Order from Control Panel

We've been looking around to get some info for this feature but didn't find anything yet and wanted to ask here in case we are missing something. Is there a way to create an order from the Control ...
1
vote
1answer
314 views

ElementAPI: How to order and/or limit results?

Currently collaborating on a site with another developer, which is using ElementAPI pretty heavily for content delivery. Is there a way to limit the number of returns on any given json feed? Say; ...
1
vote
1answer
101 views

Search entries ordered by sections

Is it possible to perform a search and have the results grouped/prioritized by sections? e.g. something like: craft.entries.section(['sec3', 'sec5', 'sec1']).search(...).limit(6) as page_info, ...
1
vote
1answer
97 views

User Order History Not showing Up in CP

I have a user I am running some Commerce order tests with. I have 6 orders they have placed. If I add a Commerce Customer Info field to their profile, I can see all their past orders on their Profile ...
1
vote
1answer
75 views

Order PDF in back-end error with Globals

I have created a PDF template for orders and this works fine on the front-end. However, when I click to Download PDF through the admin panel in an order. I get an error that: Variable "companyInfo" ...
0
votes
1answer
65 views

Display children's order numbers

I thought this was going to be easy; showing the order number of children against their parent, but the only answer I can find is in this thread and I'm unsure how to implement this into my code. {%...
0
votes
1answer
81 views

Extend order methods to sort numbers naturally

I've encountered a similar problem as in this post: How to order numbers naturally? I have some products I need sorted on a page by model number, and currently they sort as ABC-1, ABC-12, ABC-2, etc. ...
1
vote
0answers
91 views

How to get the order index of a structure entry?

I have a structure with 3 levels. The first 2 levels are for structuring the content and most of the content comes from the 3.rd level. This 3.rd level are the entries which are written by different ...
1
vote
1answer
102 views

How do I set the value of a custom entries order field from a plugin?

I'm trying to set the value of a custom field on an order when saving an entry. I found an example of how to do this for a simple text field, but the field I'm trying to set is an entries field, not ...
1
vote
0answers
42 views

Missing entries if order of entries is changed

I'm having a very bizarre problem and was wondering if anyone else has had this happen. I have a page displaying thumbnails of product sheets. My loop code starts with this: {% for entry in craft....
1
vote
1answer
56 views

Decimals missing in result after adding up order totals for a customer

I want to show a user the total sum of all their orders. My problem: In the result the decimals are "lost" and always show as zeros. {% set totalOrders = 0 %} {% for order in craft.commerce.orders....
2
votes
1answer
570 views

Craft Commerce: Sort Products By Price

Trying to sort products by price. Since the price of a product in Commerce isn't a textual custom field it's attached to a variant, I'm having trouble working out the syntax to make this happen. {% ...
2
votes
1answer
112 views

Query two sections filtered by different custom fields, then order them

Two channels: 1) exhibitions, which have a startDate and EndDate 2) events, which have a date I need to grab the current exhibitions, future exhibitions and future events, which I do using this: {% ...
2
votes
1answer
371 views

How to order by related entry type field

Two sections: 1) Products 2) Authors The "Products" section pulls the author name from the "Authors" section through an entries type field. I'd like to order the products first by authors (...
3
votes
0answers
203 views

Assets Order Effected by Eager Loading [closed]

I am trying to eager load an asset field that contains 4 images. When I originally set my entries the order was not affected as written below: {% set products = craft.entries.section('products') %} ...
1
vote
1answer
284 views

Sort single entries by section with same query order

When querying multiple singles by section slugs, is it possible to maintain the order of the results as the query? Currently the return result is sorted by the default postDate desc. craft.entries....
3
votes
2answers
255 views

Order Users List by Last Entry Date

I am trying to order a list of Users by the date of their last entry. order('postDate desc') works for entries of course, but I can't find a way to order the Users of those posts based on their latest ...
3
votes
1answer
598 views

How to get the order number of the current entry in a structure

Is there a way in Craft to get the order property of the current entry when it's in a structure? For example say you have the following structure: Parent Page Child One Child Two Child Three Is ...
1
vote
2answers
155 views

Order Sprout Forms by field handle returns an error

For some reason Sprout Forms entries will not accept the usual order by field handle setup. When I want to order the contact entries by address for instance: {% for formEntry in craft.sproutForms....
2
votes
2answers
242 views

Conditionally Applying CSS to Element on Active Page Without Using URL or ID Logic

I want to conditionally add some CSS to a subnav element if that page in the subnav is currently active. However, I can't add the CSS based on any slug / URL / getSegment logic, as that will likely be ...
2
votes
1answer
339 views

Order Entries in a Section by Category Titles

I currently have entries from a section output simply using a variable like: {% set beer = craft.entries.section('beverages') %} All of the beer entries have brands assigned to them using the ...
2
votes
1answer
116 views

Users Order not Working

I'm trying to order my users with craft.users.order('lastName'), which should be no problem, since I'm pulling that straight from the documentation; however, it's not working for some reason. Is this ...
2
votes
2answers
522 views

Order entries based on last string of title

I would like to get the last string of a entry title and order entries based on that. Basically the people title are their full names and I am trying to find their last name and filter based on that, ...
2
votes
1answer
78 views

Output tags in the order they were added to an entry

Is it possible to output tags for an entry page in the order they were added to related entry? For example on a News page I would like to output any/all tags added to the News article on the specific ...
3
votes
1answer
495 views

group Matrix blocks and also order by Matrix field for a given block

I'm wondering if I might have a little too much inception madness in my thinking with this problem. Enhancing a site we built for a conference last year. As there's an annual conference each year and ...
3
votes
1answer
428 views

Order grouped entries

I need to group and order member profiles alphabetically but I can't get it to work. Have a look here: http://ffsd.de.w0129b45.kasserver.com/mitglieder (It's german but you should get the idea :)) In ...
0
votes
0answers
39 views

Display only those entries that have assets [duplicate]

I'm trying to get a list of entries that have at least one asset in it (standard assets field) called "assets". {% for entry in craft.entries.section('banks').first.assets.filename(':notempty:')....
3
votes
1answer
2k views

Order entries by custom time field

I've got an events listings which works pretty well and there is a: Custom Date field, eventEnd (just date) Custom Start Time, eventStart (just time) Custom End Time, eventEnd (just time) I can list ...
1
vote
1answer
449 views

Is it possible to order entries by Entry type title/slug

I would like to order my entries by the entry type they have, so for instance: {% set entries = craft.entries.section('more-info').order('type') %} However, this orders by entry type ID, and not by ...
1
vote
1answer
453 views

How to order categories in key/value for loop?

This is what I'm trying to accomplish: All categories displayed on one page, with entries returned from each. Only six entries shown in each category. Categories need to be in a specific order. I've ...
1
vote
1answer
732 views

How to order matrix blocks in reverse

I've using a matrix field from the same entry in two different templates. In one template I want them in the order they're displaying in the CMS, while in the other I want them displayed in reverse. ...