Questions tagged [products]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1 vote
1 answer
58 views

Set default values for new Commerce products

I'm trying to set some defaults for newly created products. That is, when a new product is created, I want to set some settings to specific default values, but users should be allowed to change those. ...
MoritzLost's user avatar
  • 10.7k
1 vote
1 answer
96 views

Delete All Products (and their variants)

I'm looking for the correct way to delete all of the products and related variants from my Commerce site. This is just for my local development environment as I'm debugging an import job. The delete() ...
cherrykoda's user avatar
  • 840
2 votes
1 answer
125 views

CraftCMS Commerce order by most sold products

I am currently working on a project where I have to sort products based on their times being sold. Unfortunately I could not find anything related to this functionality. Where do I start to implement ...
Kimixi's user avatar
  • 21
1 vote
1 answer
40 views

Category as variant

In Products (Craft Commerce), I've set custom fields. Some are texts, some are related to a Category. Actually, there's 2 different categories per variant... In order to draw the fields, I need to ...
Sylvain Tremblay's user avatar
0 votes
1 answer
107 views

Commerce search: return products containing keywords in related entries' fields

Craft CMS 3.6.11.2 / Commerce 3.2.17.4 We have a Stores structure section that contains fields (searchable) such as phone, address, etc. These Stores are assigned as Entries (searchable, max of 1) to ...
biko's user avatar
  • 660
1 vote
1 answer
20 views

Commerce - Email users on new product input

Good Afternoon, Is it possible to have Craft email a list of users (based on a category) when a new product is added to the shop? Is there a pluigin that would do this, or is it a matter of a small ...
springboynick's user avatar
1 vote
1 answer
90 views

Get UI elements of entry in front end

Is is possible to get UI-elements of Craft 3.5 in the front end? Specifically wanting to get hold of the headers I use to separate fields of products. This is my current code: {% set layout = product....
nitech's user avatar
  • 679
1 vote
2 answers
99 views

Change naming of sections in Craft Commerce CMS

Is it possible to change the name of the of 'Products' to 'Projects' & Variants to 'Pledges'? I would like to use the Commerce CMS as a base to start from but need to be able to change certain ...
Kap1tein's user avatar
1 vote
3 answers
312 views

Commerce: How can I check that a user has bought a product?

I have a digital product, with a landing page, and I want to know if the connected user has already bought the product so I can give him access to the content.
Miguel Bocquier's user avatar
1 vote
1 answer
339 views

Commerce 2: Custom product fields not showing up in order

I've created a dropdown field for my users to select from on each of my products, but if the user was to select an option from the dropdown and click 'add to cart' , it doesn't show up in their order ...
Amy's user avatar
  • 407
1 vote
1 answer
68 views

Filter and sort Commerce products based on Matrix blocks

We have a website that uses Craft CMS v3.1.28 and Commerce v2.1.6.1. The below logic is implemented within a plugin and we're prepared to do custom implementations aka. prepared to go deep! I would ...
Meinhard Meintjes's user avatar
2 votes
1 answer
166 views

Commerce 1: Different default order status based on product types

I want to assign different default order status based on product types. Is this possible? What I need to achieve is to send different email notifications based on product types. Can this be ...
biko's user avatar
  • 660
2 votes
1 answer
280 views

Get and display a product's variant fields in twig

I'm working on a product template that can display products of any type. Various product types have varying numbers of variant fields each with their own options as other products. (All of my variant ...
Mark J. Reeves's user avatar
2 votes
0 answers
260 views

Creating multiple plan subscriptions

Versions: - Craft CMS (3.1.21) - Craft Commerce (2.1.2) - Stripe for Craft Commerce (1.2.0) Problem: - My website offers user's ability to subscribe to several subscriptions at the same time. ...
Gavin Vaske's user avatar
3 votes
2 answers
84 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 ...
Jay's user avatar
  • 1,042
2 votes
1 answer
52 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 ...
foamcow's user avatar
  • 2,019
1 vote
2 answers
881 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 ...
Matt Shearing's user avatar
1 vote
0 answers
51 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 ...
levilucas03's user avatar
1 vote
0 answers
120 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. ...
watarutmnh's user avatar
1 vote
1 answer
55 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 ...
Darryl Hardin's user avatar
1 vote
1 answer
451 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 ...
karinegomes's user avatar
4 votes
2 answers
630 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 ...
Matt Shearing's user avatar
0 votes
1 answer
234 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 ...
Darryl Hardin's user avatar
1 vote
1 answer
32 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 ...
ToddPadwick's user avatar
1 vote
1 answer
162 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. ...
M dunbavan's user avatar
1 vote
1 answer
237 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 ...
Darryl Hardin's user avatar
1 vote
1 answer
407 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 ...
Branko's user avatar
  • 495
1 vote
1 answer
859 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 ...
Özlem's user avatar
  • 13
1 vote
2 answers
593 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 ...
mmc501's user avatar
  • 1,779
0 votes
1 answer
423 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 | ...
Clive Portman's user avatar