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 [products]

The tag has no usage guidance.

3
votes
2answers
31 views

Showing a list of selected/related categories to entry

I have a suitability category field in my product type that allows the content writer to select which categories this product is associated with. But my issue is that on the product page I need to ...
2
votes
1answer
11 views

Including a variant segment in product type template route in Commerce 2

Is it possible to use a wildcard when specifying the template path for a Commerce 2 product type? I want to format my URLs as /type/product/variant Where 'variant' could be a custom field applied to ...
1
vote
2answers
35 views

Search products and entries with pagination

Is there any way of searching both entries and products at the same time? Wanting a single search on the site which will return all entries and products containing the searched for phrase. Looked at ...
1
vote
0answers
26 views

Commerce filter with width, height and length with tolerance

Hope you guys can help. I need to create a search feature on a craft commerce site that will allow the user to search for products in this principle: Product Type Width +- value height +- value ...
1
vote
0answers
58 views

Add fields to Product Type itself

I want to create product groups and save some data in themselves. but I only could add field to individual product, not product type itself. Or it is nice if product could have hierarchal structures. ...
1
vote
1answer
25 views

How to show a product from a field entry

I'm trying to bring in recommended products for adding to a bigger purchase. I set up a simple matrix but can't seem to figure out how to pull product information. This is what I have so far, it ...
0
votes
0answers
30 views

if products related to entry in product entry field, else products related to type

I have an entry field in each of my products that have an entry assigned to them. These are designers that are linked to each product. I also have product types. For each product, I want to show ...
1
vote
1answer
105 views

Filter products by custom boolean field

I'm working on a online store website and we need a filter to hide some products based on the country. I created a lightswitch field called "Hide in Europe" (default false) and added it to the ...
2
votes
2answers
356 views

Multiple category relationship criteria (or)and(or)

Is there a way to do relatedTo categories where the category is (a or b) and (c or d or e)? I can get (a or b) working using: {% paginate craft.commerce.products.relatedTo(categories).limit(20) as ...
0
votes
0answers
60 views

set slug from entry in custom field as a variable

My products have a custom field that allows the client to assign a 'designer' entry to it. (each designer has their own article page) I then need to use the slug from these 'designer' entries, to ...
0
votes
1answer
71 views

How to use promotable Boolean in Craft Commerce?

I'm sure this is somewhere in Craft documentation but I cannot find anything on it. There is that checkbox in the product area that says "Promotable". I'm assuming this is so I can reference it later ...
1
vote
1answer
30 views

How can I break up a product into two page templates?

I have a product overview page, with images and some text, then a call to action that launches a product customiser for that particular product. (the customiser is requiring some bespoke JSON using ...
1
vote
1answer
41 views

Is it possible to use images as variant selectors when choosing products?

I am fleshing out all the main parts of my commerce site and going through all the requirements needed. I have installed the Craft Commerce plugin and set it up with required shipping, delivery, etc. ...
1
vote
1answer
138 views

Enforce search match multiple parameters

I actually found this code on here Search Form with Craft Commerce. I had a problem with this code pulling up products that didn't match, and then after creating a new product it worked for a bit and ...
1
vote
1answer
211 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 ...
0
votes
0answers
342 views

Creating a product and it's variants programmatically

I'm really at a loss at what do. I'm already past my deadline for this so I'm kind of in a panic. I've created a task to take rows of a CSV file and create products and variants from them. Since I ...
1
vote
1answer
415 views

Craft Commerce - Product Types URL

I'm working for the first time with Craft Commerce and trying to create product types. So far so good, now I have three product types: "Inspiration", "Gift" and "New". I need the URL of these three ...
1
vote
2answers
172 views

Craft Commerce - Advanced Product Options & Pricing

What are the options for creating advanced product options with pricing. I see there are way to create variants ok - but can this be linked to advanced pricing, e.g. for printing products. the ...
1
vote
1answer
114 views

Craft Commerce hasStock not working?

I'm trying to query for certain products but only ones that have stock (the products just have defaultVariants): {% set earliestDate = now | date_modify('- 1 days') %} {% set latestDate = now | ...