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 [plugin-craftcommerce]

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

1
vote
2answers
22 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 ...
2
votes
1answer
31 views

Craft Commerce - Different confirmation email address for different product types or category

On a website I will be setting up there will be different ranges/types of products. Basically purchased from different departments within the organisation. I can filter the products in different ways ...
1
vote
1answer
44 views

Craft Commerce with WordPress

I have a content site and I want to launch a department store, but I have over 5000 products. I want to launch a department store with Craft CMS; of course, my blog's section is WordPress. Is this ...
2
votes
1answer
42 views

How to get all available tax rates in a Commerce site?

Is there a way to retrieve and loop through all the available tax rates that have been set up in Commerce 1? I had thought I could loop through the adjusters like so; {% for adjustment in cart....
3
votes
1answer
294 views

Currency switcher

Folks: I'm setting up a multi-currency site (CAD, USD, EUR). I'd like the user to be able to select their currency before they actually put anything in the cart. And once selected, prices throughout ...
1
vote
0answers
172 views

Craft Commerce 2: Adding subscriptions to cart

I am porting a Shopify "multi-site" to CraftCMS using Commerce and I need to be able to add subscriptions to the shopping cart (customers can subscribe to a monthly box), together with other products. ...
0
votes
0answers
17 views

Craft Commerce - Ability to create product options

We're hoping to develop a new ecommerce website for our client. They're a printing company (not the one referenced in the link). We'd like to develop on Craft Commerce but before we convince our ...
1
vote
1answer
12 views

Discounts applied based on cart total

Our client would like to run a promotion which would require a user to spend at least £30 in order to get a certain product for free. We have setup a ‘codeless’ discount that has: the product that ...
1
vote
1answer
17 views

Get discount data from adjustment object

Is it possible to get, from one of the cart.adjustments of type discount, whether the discount was added with a coupon code, and if so, what that coupon code is?
1
vote
1answer
20 views

Craft Commerce Digital Products delete multiples

Craft Commerce Digital Products: Why aren't there checkboxes next to the product names so I can delete multiple items at once? It exists in regular Craft Commerce Products.
1
vote
2answers
155 views

Craft Commerce returned orders stock and refund handling

Is there a simple way to handle returned or partially returned orders in Craft Commerce? I'm building a site for a shop that has to deal with a lot of returned orders (woman's dresses). A very common ...
1
vote
1answer
22 views

Commerce discount promotions as a fieldtype?

I'd like to create an entry in Craft that talks about a new discount, and then choose that discount via a field (so a bit like you can choose an entry or a product). That way, should the parameters of ...
3
votes
2answers
454 views

Get sale price in Commerce

How does one get the sale price of a product in Craft Commerce on a product page? I'm new to Craft and Twig and the sale section of the Commerce docs is.. well, not really there (page under ...
1
vote
1answer
26 views

Get to get all users with active Commerce 2 subscription

How do I get all the users with an active subscription in Commerce 2? I want to be able to filter entries by subscribed users.
1
vote
1answer
45 views

Craft Commerce 2 Ajax Add to Cart

Trying to ajax add to cart but each submit returns a https://www.website.com/commerce/cart/updateCart 404 (Not Found) I have this in my twig template: {% for book in craft.products().type('books')....
1
vote
1answer
36 views

Adding file uploads to commerce product line items?

Does anyone have any experience with adding file uploads to the add to cart forms on product pages within commerce? I've seen some examples of users attaching them to orders (didn't work for me), but ...
1
vote
1answer
194 views

Subscription with Craft Commerce

I am using Craft Commerce v2 plugin with Craft CMS v3 with one of my site which basically sells kid products. It's a subscription website and ones some parent subscribe for any kids package, they ...
0
votes
2answers
67 views

How can I embed Image into Craft Commerce 2 PDF Receipt

How do I embed an image (PNG,SVG or JPG) into a CraftCMS Commerce 2 PDF receipt? I tried importing the svg using an includes. I tried using an img tag and referencing a local file. Nothing seems to ...
2
votes
1answer
32 views

Is it safe to move Craft Commerce Templates out of Plugin

I installed Craft Commerce 2 and the templates are in vendor/craftcms/commerce/templates/shop. Is it safe to move these to my craft templates folder like this? ├── storage ... │   └── runtime ├── ...
1
vote
2answers
233 views

How can I install Craft Commerce 2 alpha release?

I tried following the installation instructions here: https://docs.craftcms.com/commerce/v2/installation.html When I run composer install craftcms/commerce, it says: Invalid argument craftcms/...
1
vote
2answers
47 views

Custom-created or personalized products with Craft Commerce?

I’m building a webshop with Craft Commerce where customers will be able to customize/personalize parts of clothes based on a predefined set of options. With a pullover for example, customers should ...
1
vote
0answers
28 views

404 error on entry template in dev tools, but layout template loads

I created a Shop page here: https://www.intermountaincleaning.net/shop/products/diamond-magic. The rest of the site is just static HTML (not Craft), and the Shop page is in a Shop folder within the ...
1
vote
1answer
17 views

Add a method to an existing element

Trying to get my head around plugin development. Sorry if this is a super basic question. How do you add a method to an existing element? I’m trying to get any active Commerce 2 subscriptions for a ...
1
vote
2answers
31 views

Craft Commerce: where to modify data sent to gateway (need to send customer data)?

I'm using Braintree with Craft Commerce using this Omnipay Braintree Gateway for Craft Commerce https://github.com/samuelbirch/craftcommerce-braintree It's working well, but I noticed that some ...
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
22 views

Product variant association

On my Products details page I have 2 selects. The 1st select list out the Primary variants. Based on the selected Primary variant the 2nd select is auto-completed in with Secondary variants that have ...
1
vote
2answers
61 views

Commerce 2 Subscription Prices

We've currently got Subscriptions setup on a site which works a charm, but my main issue is outputting the price of the subscription, after the user has subscribed. From the docs/templates I can even ...
1
vote
2answers
15 views

Tax Exempt Adjuster

I'm attempting to add a very basic tax adjuster to specific users based on a custom lightswitch field. I currently have a simple plugin with two classes for the plugin and adjuster that mirror the ...
4
votes
2answers
184 views

Get 'purchasable' from ElementAPI

The elementApi docs state you can use custom elementTypes via plugins. I am using craft commerce which states it creates the custom elementType 'purchasable' I've tried: return [ 'endpoints' => [...
1
vote
0answers
49 views

Some orders recieve double amount of products

I have a pretty critical issue with one of my clients websites. The site, running Craft CMS 2.7.2 and craft commerce 1.2.1364, uses a event/tickets plugin and uses Mollie as the payment provider. ...
2
votes
0answers
41 views

Creating customer records and saving cards during Stripe checkout?

My client is looking to, on occasion, assign a recurring Stripe plan to a one-time donor (most donations on this site are one-time). The best way to do this would be to create a customer in Stripe (...
1
vote
0answers
46 views

Making discounts gives error on payment gateway

When i applied discounts, my payment gateway gives an error. It says that Basket items price must be greater than zero. Here is the section that takes items in cart: // Add items $basketItems = [ ...
1
vote
2answers
99 views

Unable to set cart currency in index.php

Craft: 2.6.2976 Commerce: 1.2.1341 I want to force currency depending on language (en_us and no). The user should not be allowed to choose. I've added two currencies 1) EUR - base, 2) NOK. Putting ...
1
vote
1answer
24 views

How to get the name of a product's sale

I am still new to craft commerce and I have 5 sales, some are flat and others are percent. When i loop through my products, I am trying to get the type of the sale for the current product. How do i ...
1
vote
1answer
48 views

Extend a Commerce (v2) order template in the control panel

Is there a way to extend (extend, not replace) the default Commerce order templates in the control panel? I'd like to display important custom fields in a prominent way on the first tab. (and not ...
1
vote
1answer
70 views

Worldpay Offsite Gateway not redirecting to Customer Order screen on successful transaction

I am having issues with Craft Commerce and Worldpay's Offsite Payment Gateway. The way my clients accounts are set up with Worldpay, I cannot use the Worldpay JSON option so this I have to use the ...
1
vote
1answer
21 views

Commerce 1 find if Discount object is valid based on start/end dates (Twig)

In Twig, I want to find out if a discount is valid based on start/end date. startDate and endDate don't seem to exist and I can't inspect the discount object by using the json_encode filter (returns {...
2
votes
1answer
449 views

How to integrate Craft Commerce with Salesforce?

We're looking for a way to integrate Craft Commerce with Salesforce. What are the options there? Is there a Craft API to talk to? (I can't seem to be able to find it...) And the other option is to ...
1
vote
1answer
16 views

Payment Method and Discount elements query by ID in Twig

In Craft 2, is it possible to query a specific element by ID in Twig? They aren't mentioned in the docs. I was trying things like these but without success: {{ craft.commerce.paymentMethods.id(1)....
1
vote
0answers
11 views

Shop setup for subscribed members

Before I start to build this store on my own, I would like to ask if anyone can provide some guidelines on the following setup. I am trying to build a store with a member area for subscribed members ...
2
votes
1answer
33 views

Mark a Commerce Order as Paid, via a custom plugin

Checkout / Payment is being handled entirely by a 3rd Party. What would be the correct process to mark an Order as Paid via a custom Craft plugin? The Order will already have been converted from a ...
1
vote
1answer
33 views

add text or image to Craft Commerce confirmation email through the CMS

I have a customer that wants to modify the order confirmation email. I set up a new Entry for order confirmation to include a content block that goes to the email/email_confirmation file. When I ...
2
votes
1answer
93 views

How do you reset a cart under Craft Commerce 2?

How do you reset or empty the cart, in Commerce 2? There is no mention of this in the documentation. In Commerce 1, it was possible to issue a request to the commerce/cart/removeAllLineItems action ...
1
vote
2answers
438 views

Any examples of Craft Commerce checkout process for PayPal or any other gateway?

I'm unable to find much documentation nor examples for how to actually utilize Craft Commerce and successfully convert a cart to a completed order. Any help would be greatly appreciated!
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 ...
0
votes
0answers
19 views

Craft Commerce Discounts - Promo code for one free item if there are five items in cart

Our site will offer only one product. Can we create a promo code that will apply 100% discount on 1 product if there are at least 5 products in the cart? I was playing with the conditions and had: ...
0
votes
1answer
19 views

Commerce Stripe Authorize Only - Capture partial amount in Craft admin panel

It doesn't look possible but can you capture partial amounts using the Craft admin panel? E.g. Authorize $1000, then capture $700. Also, when performing Captures in the Stripe panel, these ...
3
votes
1answer
246 views

Authorize and charge later with Stripe

I know Commerce allows you to just authorize and pay later but the 'pay later' scenario requires re-entering the credit card details. We have a flow that requires the admin to be able to charge a user ...
2
votes
2answers
102 views

Getting products with Craft 3 and Craft Commerce 2

I've never had success using Craft 3 with Commerce 2 beta. I always get an error that ".find()" is not recognized, and ".all()" doesn't work either. My latest attempt has given me this error: Twig ...
2
votes
1answer
42 views

How can I show a list of product options as checkboxes in the cart?

In my cart (Craft3/Commerce2), I need to show a line item's possible options from a checkbox field called "productOptions", and allow the user to select the desired options. Based on the Craft Docs, ...