2022 Developer Survey is open! Take survey.

Questions tagged [plugin-craftcommerce]

Use this tag for questions relating to the Craft Commerce product.

Filter by
Sorted by
Tagged with
1 vote
0 answers
22 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 ...
user avatar
  • 11
1 vote
1 answer
24 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 ...
user avatar
0 votes
0 answers
54 views

Craft Commerce variants and stock limit

I'm working on solution that shows product variants with ability to select attributes in the front end. Now I have code like this: {% set colour = colour ?? [] %} {% set length = length ?? [] %} {% ...
user avatar
1 vote
1 answer
44 views

How to retrieve (& output via twig) one key pair of json object stored i a database column

in commerce, all transactions are written into the database, into the table "commerce_transactions". every transactions will result in a row, where different data is the stored into columns. ...
user avatar
  • 197
0 votes
0 answers
59 views

Craft Commerce 3 guest checkout flow – can't update addresses

I'm finding a guest checkout flow in Commerce 3.4.14 insanely confusing, docs aren't much help. I'm using Craft Solo and Commerce Lite. TL;DR I realize the code below is probably too complex, so even ...
user avatar
  • 55
2 votes
1 answer
42 views

Get order shipping address in module

I'm trying to add an address column to my orders index but I'm having trouble correctly getting the actual address. From my code below, when I dump on $orderShippingAddress I get the ID of a valid ...
user avatar
  • 337
0 votes
1 answer
24 views

Craft Commerce - add additional message during checkout

We can add a message to a product while adding it to the cart as per this question here - Option and notes fields after cart at checkout for order, not just line items But is there a way to add a ...
user avatar
  • 187
0 votes
0 answers
19 views

Email Template rendering issue with Verbb - GiftVoucher Email Attachements

I have the current problem that when I enable the attachments in the GiftVoucher Email Settings, the HTML emails are sent in plain text mode. (HTML of Email Template is visible) If I deactivate the ...
user avatar
  • 23
0 votes
0 answers
26 views

Craft Commerce attributes

I was looking for the way to make something like this with Commerce variants: and the only solution that I found is this tutorial: https://www.vaersaagod.no/en/multi-attribute-variant-selection-in-...
user avatar
0 votes
0 answers
16 views

Get store's primary currency from twig

As the documentation notes, every Craft Commerce store has a primary currency. You can get this from an order as order.currency, but since it's a global setting, is there a way to get it from settings ...
user avatar
1 vote
1 answer
34 views

Eager-Loading Cart images

The cart of Craft Commerce can't really be cached so I try to increase performance by loading product images in the cart via eager-loading. All tutorials tell me to use the .with(['variantThumb']). ...
user avatar
  • 3,664
1 vote
1 answer
15 views

Commerce show customer only once even with multiple orders

Is it possible to print a list of customers but display a customer only once even when he/she ordered multiple times? {% set orders = craft.orders.completed(true).limit(null).orderBy('dateOrdered ...
user avatar
  • 3,664
2 votes
1 answer
71 views

Craft Commerce multisite mail origin

I have a multisite setup where 2 sites can make orders on the same commerce, but I would like to have dynamic mail settings (domain name, origin, api keys, etc) based on the site of the order. Do you ...
user avatar
  • 143
1 vote
2 answers
38 views

Sending Craft Commerce Orders to Salesforce.com

I know similar questions have been asked before... but they are a bit dated and there was never a clear answer. I'm looking to send order information from Craft Commerce to Salesforce.com. It's a ...
user avatar
0 votes
0 answers
15 views

Commerce: Sales that toggles product availability as a condition

My client creates and sells products that are only for sale around the Christmas and Easter holidays. I tried to solve this in the front-end by adding a date range on the product which toggles the buy-...
user avatar
0 votes
0 answers
26 views

Headless commerce in Craft - SCA2, tokens and taking payments client-side

I'm building an SPA with Svelte that's supported by Craft and Craft Commerce. Currently, I'm fetching products, building the cart locally, syncing it with the server, and taking payments using Stripe ...
user avatar
0 votes
0 answers
25 views

Twig call to get REFRESHED payments

I use commerce for subscriptions. We design a twig page to show subscriber's payment history. For some reasons, the very last purchase don't show as we need to perform a "refresh-payments" (...
user avatar
1 vote
1 answer
36 views

Craft Commerce Subscriptions

We're using commerce 3.2 and were testing the plans options with the default templates. We've put in the Stipe test keys, but when we try to subscribe, we get the message: Unable to start the ...
user avatar
  • 187
1 vote
1 answer
27 views

How do I reset all Commerce order references?

By default, Commerce uses the {{number[:7]}} format to set an order's reference on order completion. Now (after the site already has orders and I can no longer reset the site's data), I need to use a ...
user avatar
  • 6,288
0 votes
0 answers
25 views

how to set up Discount (10% for min 6 items) for all but x categories and categories should not sum up in cart

I have a discount which takes 10% of the price, if there are a min of 6 items. now i have around 300 items and did not want to make a discount for every item in the cp, so i went for categories, which ...
user avatar
  • 197
0 votes
0 answers
14 views

Commerce - Language-Switch / Search - Problem with "entry"

We use Commerce - and there we have the problem with the search or e.g. the language changer, because we work with "entry" and Commerce does not know that. Does anyone know how we can solve ...
user avatar
2 votes
1 answer
73 views

Redesign of existing commerce site with content/structure changes - whats the best way to manage this?

So I am currently working on an existing clients craft and craft commerce website and looking to completely redesign and revamp this. Earlier in the yer, this underwent a major upgrade in terms of the ...
user avatar
  • 1,824
0 votes
0 answers
29 views

Displaying paymentCurrency

Folks: I've got a multi-currency store. The user can switch their currency using a drop-down menu. In the drop-down menu, I display the currency they are using with: {% if cart.paymentCurrency == 'CAD'...
user avatar
  • 471
0 votes
0 answers
22 views

List User/Customer billing address

I need to export an exhaustive list of all customers info including their commerce primary billing address and a custom Section fields. I did most of the job except I can't get a grasp on how to fetch ...
user avatar
1 vote
1 answer
19 views

Subscribe a user to Campaign Monitor during checkout in craft commerce

I found this thread for Mailchimp. Is there somewhere also a plugin solution for Campaign Monitor? I can't find anything via google.
user avatar
  • 3,664
2 votes
1 answer
79 views

Craft Commerce payments not going through - status "redirect"

I'm running a site taking orders via Craft Commerce. Most of the orders are fine, but a small percentage are failing, and going into the "Attempted Payments" section of the orders area. If i ...
user avatar
2 votes
1 answer
48 views

Multi-attribute product variants

I'm basically looking for a more up-to-date way to do this: https://www.vaersaagod.no/en/multi-attribute-variant-selection-in-craft-commerce So that I can allow users to select color and size in two ...
user avatar
  • 337
0 votes
0 answers
24 views

Order Condition Formula in a Shipping Condition

I have digital products that are sold alongside physical products and need a way to set it so that the 'standard shipping' method is not shown as an option if ONLY digital products are in the cart/...
user avatar
2 votes
1 answer
47 views

Free Shipping toggle switch in product editor doesn't work

Hi in the product editor of Craft Commerce by default there is a toggle switch for Free Shipping on the right side column. I have the base rate set up as a standard flat rate charge but wanted to know ...
user avatar
  • 177
0 votes
0 answers
14 views

sourceSnapshot not populated in lineItem adjustment

I'm querying the order, and from the order I'm looping through the line items returned from getLineItems(). When I then dump the line item, calling getAdjustments(), the sourceSnapshot never seems to ...
user avatar
1 vote
1 answer
21 views

Craft Commerce Checkout: How to prevent payment link from bypassing shipping section in nav-checkout

I'm using checkout.twig in the CraftCMS shop checkout examples templates. As the user proceeds though the checkout process, this nav strip appears at the top of each page and marks their progress. The ...
user avatar
  • 177
0 votes
0 answers
27 views

Bulk editing Commerce products

Is there a recommended way to allow bulk editing of prices within Craft Commerce? What about variants? I thought of possibly exporting all data to a spreadsheet and using FeedMe to update the prices. ...
user avatar
  • 611
1 vote
1 answer
36 views

Check if product type is in user's cart

I would like to redirect users to an additional page in my checkout flow if they have a particular product type in their cart. Does anyone know how I can do that?
user avatar
  • 337
0 votes
0 answers
25 views

Commerce price difference for specific country

I have a fairly simple shop with one product. I would like to be able to adjust the price of the product (increase it by around 5%) for customers from one specific country. I have some price changes ...
user avatar
  • 343
0 votes
0 answers
58 views

Craft Commerce/Sprig - change add to cart button dependent on what is in cart

I am using Craft Commerce with Sprig and I am hoping to get some help with the add to cart button, which I need to change dynamically dependent on what is already in the cart. Essentially I have two ...
user avatar
  • 1
0 votes
0 answers
12 views

How to apply discount after taxes in Craft Commerce

I have a unique situation where the discount applied must be done AFTER taxes are applied to the total cart price. Can I reorganize the discounts to come after tax? Or is there another way to make it ...
user avatar
0 votes
1 answer
59 views

Craft Commerce product export to CSV?

Does anyone know if it us possible to export products from Craft to a CSV? I can't see anything native. Sprout reports seems like it might be able to but it looks quite complicated.
user avatar
0 votes
0 answers
208 views

SQLSTATE[HY000]: General error: 1525 Incorrect DATETIME value: ''

My website is running on Fortrabbit with the following settings: PHP version 7.4.15 OS version Linux 4.15.0-50-generic Database driver & version MySQL 8.0.23 Image driver & version Imagick ...
user avatar
1 vote
1 answer
33 views

Disable Commerce 3 shipping altogether

Is it possible to disable the shipping feature altogether in Commerce 3? A shipping step decreases sales up to 30%. I have some quirky CSS hiding shenanigans going on in my templates to hide the ...
user avatar
  • 3,664
0 votes
0 answers
18 views

Tax applied to line item before Discount Adjuster

I've made an adjuster that applies an additional unit pricing. For example, the first of an item is charged at £5 and then each additional unit is charged at £2. This works great as far as the line ...
user avatar
  • 1,979
0 votes
0 answers
23 views

Commerce Shipping/Tax Estimates

Within the checkout flow, I am looking to offer an up to date 'shipping/tax' estimation. Looking through the Craft Commerce docs, I found the 'Estimate Cart Addresses' (https://craftcms.com/docs/...
user avatar
  • 101
0 votes
0 answers
22 views

show shipping methods from backend based on total order weight

I've the following shipping rules on paper: shipping costs according to total weight of order: 5kg: 8,- 10kg: 11,- 20kg: 16,- 30kg: 23,- pickup: 0,- if customer wants priority shipping: 5,- ...
user avatar
  • 197
1 vote
1 answer
46 views

Add users to a group upon purchase [check if a purchasable has a variant]

I have a module to add a user to a group after a specific product type purchase. This was working fine, until I added Events to the mix. From what I understand, Events don't have variants so now I'm ...
user avatar
  • 337
1 vote
1 answer
26 views

How to convert currency is there any way or any plugin available?

I am working on E-commerce website and I am using craft commerce for that.Is there any way or any plugin available for that?
user avatar
1 vote
1 answer
60 views

Commerce: Is there any way to give a discount for Product A if the costumer buy 3 Product B?

In Craft Commerce 3, there is a Order Condition Formula that allow us to condition for the discount. So here is my Case. I have product A and Product B, so I will give a discount to Product A if the ...
user avatar
  • 437
1 vote
1 answer
82 views

Can't register custom adjuster with Craft CMS commerce

following https://craftcms.com/docs/commerce/3.x/extend/adjusters.html#writing-an-adjuster I am trying to make a custom adjuster: I placed class myPlugin extends Plugin{ Event::on( ...
user avatar
1 vote
2 answers
57 views

How can I check if a product has any variant that is on Sale?

I want to check if any variants (not the default variant) have any active sales applied. How can I do this at a product level when looping through products (think teasers).
user avatar
  • 1,824
1 vote
1 answer
36 views

Showing and hiding details (price, sale price, sku etc)when product variant is selected on details page

I currently have price, sku and variant title swapping when clicking between variants on a products details page. This works with AlpineJS and looks something this. https://codepen.io/amasci/pen/...
user avatar
  • 1,824
1 vote
1 answer
36 views

Manually Set Craft Commerce Currency

Is it possible to manually set the currency during the checkout process? Right now Im trying the following (set currency to CAD for Canadian buyers), which seems to break the cart array.... {% if cart....
user avatar
1 vote
1 answer
24 views

Set Default Shipping Option for specific User Group

I need to set the default shipping option for one specific usergroup but I cannot figure out how to do that. What I currently have that is not working is: <label> <input type="...
user avatar
  • 1,897

1
2 3 4 5
17