Questions tagged [plugin-craftcommerce]
Use this tag for questions relating to the Craft Commerce product.
834
questions
1
vote
1
answer
107
views
Commerce element query on custom field in console command
I'm on Craft 3.4.30 (latest 3.4) and Commerce 2.2.25 (latest 2.2):
My product type "ticket" has a custom date field with handle productStartDate.
E.g. the following query in TWIG works:
{% ...
1
vote
1
answer
73
views
Update a remote stock database
I am building an online store with craft commerce, but I have a problem, I need to update a remote stock on every purchase, this stock is located in a remote server, do you know if exist a plugin ...
1
vote
1
answer
45
views
Craft commerce 3 - Module - Lineitem - Get usergroup
I have the following code working. The only thing i have to do is to check which usergroup is the customer in. Is there a simple way to check what usergroup is the customer in? This is my first custom ...
1
vote
1
answer
146
views
Craft Commerce: Checkout without email / address
Is it possible for Users to checkout without an email or address?
I want to give users the option to switch to a payment provider in the cart and fetch the address later via the provider.
...
1
vote
1
answer
162
views
Commerce Subscription Prices
I need to be able to output the price of a subscription after the user has subscribed. I'm using the Stripe Gateway. This post indicates to use {{ subscriptionPlanData.plan.amount }} but that doesn't ...
1
vote
0
answers
225
views
Craft Commerce 3 calling commerce/payments/pay from Axios returns errors
I have headless Craft CMS + Craft Commerce 3 + Mollie for Craft Commerce as backend and decoupled Nuxt.js frontend
I'm trying to use POST request to "?action=commerce/payments/pay¬e=from+...
1
vote
1
answer
62
views
Swapping currency when swapping languages
Folks:
I have a multilingual and multicurrency site. All works fine when switching currencies or languages independent of one another. But is there a way to have the currency switch when the language ...
1
vote
1
answer
93
views
Is it possible to show commerce product id's in the control panel?
For entries you can show the ID in control panel listings.
I can't find a way to show craft commerce product ID's in a similar way in the control panel.
Commerce 3
1
vote
1
answer
14
views
Is it possible to image upload on a particular size using a control panel?
I am using the commerce plugin. I want to display an image of the specific size without CSS is there any specific way in the commerce plugin?
1
vote
1
answer
40
views
Want to add a custom field in craft commerce plugin
Is it possible to add a custom field in craft commerce plugin and is it a good idea to add it?
1
vote
1
answer
171
views
How can I get the cart total item? I tried using a “length” filter but it’s not working with that
I am using the craft commerce plugin and I want to fetch total qty of the cart items. I have tried the length filter but its not working. Is there any other filter that can help in it?
1
vote
0
answers
144
views
Running garbage collection with commerce errors
Anybody know how to resolve the following when using Craft Commerce?
Running the command craft gc/run throws an error.
Next yii\db\Exception: SQLSTATE[HY000]: General error: 1093 You can't specify ...
2
votes
1
answer
569
views
Remove item from cart
Ok, I'm getting pretty crazy here. I'm trying to remove a variant from the cart. Adding works fine, like this:
<input type="hidden" name="purchasableId" value="{{ variant....
1
vote
2
answers
113
views
Trouble with twig syntax for discount conditions
I'm trying to add a condition for a discount. It involves a custom date field. I want to discount anything that falls on Tuesday. I can't seem to get the twig syntax right. I've tried these two:
((...
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 ...
1
vote
1
answer
60
views
Commerce - add new tab to order page in control panel
I'm am creating module that provides integration with shipping service for Craft commerce.
UX wise, it would be best if I could put module functionality in separate tab on order page. Mind you, I know ...
1
vote
1
answer
101
views
Can I apply adjustments (discounts) through a controller?
I have a controller which when called (actions/some-module/discount-link/apply?code=abc) associates abc with an entry and based on some stuff in that entry populates the cart with some specific ...
1
vote
1
answer
138
views
Commerce - show description of discount without coupon applied to cart
We can retrieve description of discount applied to cart that has its own coupon like this:
craft.commerce.discounts.getDiscountByCode(cart.couponCode).description
Is it possible for discount that do ...
1
vote
1
answer
26
views
Plug-In Store doesn't have the option for adding / trying plugins (post upgrade 2.6 -> 3.5)
Having recently upgraded a dev instance of CraftCMS 2.6 to 3.5, I'm trying to add the plugins via the store. I can find all the plug-ins I want to add, however there's no option on the page to add / ...
2
votes
1
answer
68
views
Partially pay for an order
Is there any way of partially paying for an order, so if the order total amount was $100, how can I programmatically set the payment amount to $50, and then pay the other $50 using another payment ...
1
vote
2
answers
269
views
Feedme plugin - importing users into craft commerce
I have few questions about importing users into Craft CMS using feedme. These users would be also Craft Commerce customers.
Users will be imported without passwords. Would this provide some kind of ...
2
votes
1
answer
359
views
Update billing details for a subscription
The Craft Commerce config allows you to set updatebillingdetailsurl. The docs say,
The URL for a user to resolve billing issues with their subscription.
There’s an example of this in the example ...
1
vote
1
answer
185
views
Commerce removing customers
Is it possible to remove commerce customers? I removed users, but customers stay and I don't see any options to remove them in the control panel.
1
vote
0
answers
139
views
Eager loading for fields attached to commerce variants when listing products
Let's say that I perform element query for commerce products and want to display an image that is attached to the default variant of each product.
How can I eager load these images, if they are not ...
1
vote
1
answer
60
views
Get All Line Items Checkout Event
I'm looking to fetch all line items and send it as a POST request to an endpoint. I've had a look through the class references but can't seem to find a way to get all the line items that are currently ...
1
vote
1
answer
220
views
Craft Commerce - explain transaction types and statuses to me
Commerce transactions have multiple possible types and statuses:
const TYPE_AUTHORIZE = 'authorize';
const TYPE_CAPTURE = 'capture';
const TYPE_PURCHASE = 'purchase';
const TYPE_REFUND ...
1
vote
1
answer
101
views
Eager load commerce order data in custom ElementExporter for Users
I have a custom ElementExporter for users and I'd like to include commerce order data. The below code works, but it's a ton of queries. I don't have a ton of experience with SQL queries, how can this ...
1
vote
1
answer
78
views
How to update the lineItemStatus of an order on the front end with twig?
I'm building a simplified interface that is only going to be used by employees preparing the orders. They are in a usergroup that has the right permissions to update orders.
I'm building this because ...
2
votes
0
answers
110
views
How to send automated Commerce Subscription related emails?
What’s the best way to send automated Commerce Subscription related emails? For example, if a user sets up a new subscription they would get sent a confirmation email with details about it, how to ...
1
vote
1
answer
43
views
Multiple Stocks levels
I was wondering if Craft supported having multiple stocks for one product.
Something that Magento for example would call stock source.
I'm looking at having one set of stock associated to trade ...
1
vote
1
answer
961
views
What is a Webhook Signing Secret?
I could not find any documentation on the 'Webhook Signing Secret' used in Commerce Settings > Gateway > Stripe Gateway. Can someone tell me what this is, what it's used for and typically what I ...
1
vote
1
answer
196
views
Error on functions in queue: “Session does not exist in a console request.”
I already experienced this same problem with Craft Commerce a while ago (Error on functions in queue: "Session does not exist in a console request.") and got a solution that solved the ...
1
vote
1
answer
203
views
Craft Commerce Upgrade Stuck
My installation of Craft Commerce seems stuck after purchasing the Pro license. Im getting similar errors throughout the site:
Base table or view not found: 1146 Table 'craft_xxx....
1
vote
0
answers
47
views
Paypal Express Redirecting to Undefined
I'm moving a site from craftcms/commerce-paypal to craft/commerce-paypal-checkout but I'm having an issue with the redirect after payment.
Steps to reproduce:
Choose Paypal as my gateway
I choose pay ...
1
vote
1
answer
54
views
LineItems not showing in CMS
I'm scratching my head. My orders are shown perfectly except for one product. I have no idea why so I looked at the Order object before saving and I can't seem to figure out why he won't show the ...
1
vote
2
answers
771
views
Add product to cart using code in Craft Commerce plugin
I want to add a specific product to a cart using its ID. I have created a module which runs on Order::EVENT_BEFORE_ADD_LINE_ITEM event. Here I am able to capture the current cart using the below code
$...
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....
1
vote
1
answer
207
views
Empty cart should remove coupon discounts in commerce
Is there anyway to remove all the discounts if cart becomes empty?
2
votes
2
answers
279
views
Guest user registration using Commerce 3
I have just started using Craft Commerce (only Lite version currently) and I'm currently trying to get to grips with what is possible. My question is regarding subscriptions.
The site that I'm working ...
1
vote
0
answers
24
views
Is there a way to react to Control Panel changes to an order?
One of the major issues I have been having with my current project is how to reconcile changes to an order in the control panel (product amounts and the like). I thought I might be able to react to ...
1
vote
1
answer
150
views
Free shipping discount on whole order doesn't appear as adjustment
TL;DR : Free shipping on order discounts don't appear as a discount (or any type of) adjuster. So how do I check if a free shipping discount has been applied?
Sorry for the long post - hopefully it ...
2
votes
1
answer
120
views
Force donation purchasable to replace donation of the same amount in cart
I'm using Craft Commerce Lite and the donation purchasable. I don't want users to ever be able to add more than one donation to the cart. Using the Lite edition stops users from being able to add ...
1
vote
1
answer
69
views
Restricting Payment Gatways by User Group using Commerce Pro?
Is it possible to restrict payment gateways on a per user group basis?
e.g. Say you want a user group to assign users into from a certain country that cannot use PayPal, so you can offer them a ...
1
vote
1
answer
127
views
Commerce Order Status History
I am trying to bring some of the order status history from my clients commerce shop orders into a web page. I seem to be able to get the Current/Previous Status (prevStatus/newStatus.name), but cannot ...
3
votes
0
answers
155
views
Add billing address to user on registration
I am working on a craftcms + commerce project and I need to add a billing address to new user during its registration process. The idea is to have a billing address added to any newly registered user ...
1
vote
1
answer
98
views
Is there a Zendesk plugin to fetch order information from Craft Commerce?
I'm looking for the same functionality as https://wordpress.org/plugins/mwb-zendesk-woo-order-sync/ but for craftCMS's Commerce plugin and not Wordpress's Woocommerce plugin.
Basically, it would use ...
2
votes
1
answer
147
views
Error on functions in queue: "Session does not exist in a console request."
I get the following error on multiple order mails from Craft Commerce. The error points out to the lines where a macro is called:
Email template parse error for email “New order”. Order: “e35f244”. ...
1
vote
1
answer
201
views
Craft Commerce "state" dropdown field fails to populate with states for new customer addresses
I'm having an issue with addresses on Craft Commerce 3 (specifically the State field).
When a new customer adds an address, the State field defaults to a text field (not the expected Select field).
If ...
1
vote
2
answers
43
views
Commerce Product - show shipping category in template
I have setup some Shipping Categories (8 weeks, 4 weeks etc) and these appear down the side bar of a product when editing in admin next to 'Shipping' . How do i bring this value out via a tag on a ...
1
vote
1
answer
86
views
How to differentiate EVENT_BEFORE_UPDATE_SUBSCRIPTION events in Commerce 2/3
I'm listening for various subscription events to send emails to members. Right now, I'm dealing with subscriptions where a renewal payment fails. I'm specifically listening for ...