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.

0
votes
0answers
9 views

Craft Commerce Digital Products delete multiples

Craft Commerce Digital Products: How come there isn't a checkbox next to the product name so I can delete multiple items at once? It exists in regular Craft Commerce Products.
1
vote
1answer
17 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 ...
1
vote
1answer
28 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 ...
1
vote
1answer
32 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')....
0
votes
0answers
16 views

Error when creating product in Craft 3 module

The error I get is Call to a member function getProductTypes() on null in /vendor/craftcms/commerce/src/elements/Product.php:272 $productType = Plugin::getInstance()->getProductTypes()->...
1
vote
0answers
27 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
16 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 ...
0
votes
0answers
16 views

Trouble with Ajax call to the Cart: CSRF token could not be verified [*SOLVED*]

[UPDATE] I've simply forget the url parameter -__-' Thanks in advance and sorry for the disturb, Davide I'm in trouble with a simple Ajax call to the cart of Craft Commerce v.1. I'm trying to delete ...
1
vote
1answer
15 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
2answers
28 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
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
54 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
1answer
22 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
votes
0answers
20 views

Omnipay Mollie not redirecting during checkout

We are currently trying to get Mollie payments up and running on one of our craft2 sites. The payment method is created, it has a valid API-key. The markup is currently craft's own payment markup, ...
1
vote
2answers
44 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
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 ...
2
votes
0answers
36 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
48 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. ...
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
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 {...
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
1answer
43 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
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
28 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 ...
2
votes
1answer
72 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
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
15 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
18 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 ...
0
votes
2answers
58 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
2answers
89 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
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 ├── ...
2
votes
1answer
21 views

Override “sameAddress” option when updating cart

I'm working on a new checkout process which involves taking the shipping address first. To do this I am setting sameAddress to 1 in my shippingAddress form. Then, at a later stage I want to offer ...
2
votes
1answer
40 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, ...
1
vote
1answer
92 views

Craft Commerce 2 — Remove Line Item (and other actions)

Knowing that all other actions besides update-cart has been deprecated I'm curious what needs to be passed with the action to remove a line item from the cart using a button as opposed to check a ...
3
votes
2answers
89 views

commerce/cart/updateCart throws page not found

Adding products to the cart throws a page not found (404) error that has this header; Page not found. ↵ Caused by: Invalid Route – yii\base\InvalidRouteException Unable to resolve the request: ...
1
vote
0answers
20 views

Add optional segment to Craft Commerce product Url

I currently have a Craft Commerce site where the product url is setup like this: {productCategory.level(1).first().slug}/{productCategory.level(2).first().slug}/{productCategory.level(3).first().slug}...
2
votes
1answer
32 views

Craft 2: Is there a hook for Craft Commerce Orders admin page?

My plugin is sort of an extension for the Craft Commerce, where I need to provide custom data on the craft commerce orders page. So I'm wondering is there a way to listen for an event, which fires ...
1
vote
1answer
25 views

How can we use TaxJar with CraftCommerce?

Is there anything akin to a presave event or postsave event where we can make a call to TaxJar API to get calculate and report sales tax? I find the integrated tax system impractical at the moment. I ...
0
votes
0answers
18 views

Craft Commerce: Validation on custom variant field

This is a Craft Commerce question and it's very similar to this question, but I believe it's different. I need to validate some custom fields inside product variant before saving, so I added ...
1
vote
1answer
77 views

Commerce PDF error: Image not found or type unknown

In the order template, this error shows up in the generated PDFs when adding standard JPG images. We're running Commerce 1.2.x on PHP70. It could be related to this dompdf issue, but how do we fix ...
2
votes
1answer
39 views

Need to access each item's converted price from payment gateway

I am trying to implement multi currency to my payment gateway plugin. I need to get converted price of the line item. Each item from Omnipay\Common\Item has the price of non converted, main price of ...
1
vote
1answer
20 views

Can I add a billing address while updating the cart?

I'm designing a donation form right now for what will be a Craft Commerce site, and I want to collect the donator's billing name, address, etc in the product form which adds the donation to the cart. ...
1
vote
1answer
83 views

Craft Commerce Shipping Total Order Price rule

I have a webshop where you can get free shipping when the minimum total order price is €150. Product prices are set up so they include VAT (21%). VAT is removed when orders are shipped outside the ...
0
votes
0answers
46 views

Craft Commerce Plugin - How to refresh/reload/redirect page in onStatusChange

I need some help in a craft backend plugin. I use this plugin in a commerce order page. I'm using it to handle onStatusChange (commerce_orderHistories). In this event, i'm testing a custom variable ...
2
votes
1answer
23 views

How to get all available tax rates in a Commerce 1 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....
1
vote
1answer
70 views

302 redirect when updating the cart via Ajax using Craft Commerce 2

I'm working on a site that has recently migrated from Craft v2 with Commerce v1 to Craft v3 with Commerce v2. Using Commerce v1 I was able to update the cart via Ajax and get a data object with the ...
1
vote
1answer
43 views

Commerce - how to display order address in email to customer?

I'm new to commerce but almost I've cracked all I need to my project but one piece still left. I can't display order shipping address. I've tried {{ order.shippingAddressId(shippingAddress) }} but it ...
1
vote
1answer
25 views

Is there a way to retrieve discounts for a product in Craft Commerce v2?

I would like to retrieve all available discounts for an eshop using the Craft Commerce v2. In Craft Commerce v1, I could use the following: craft.commerce.discounts.all() However, I can't find an ...
1
vote
0answers
7 views

Select products that have stock and products where showWhenNoStock is true

We've been working on a sneaker shop and the product overview page is only showing the products that are in stock. Now the client also wants to show some selected products on the overview even if ...
1
vote
2answers
38 views

Is it possible to update multiple cart items?

To be more specific I would like to add an "update cart" button so that the visitor can adjust the quantity of multiple cart items without having to click on "update" for each cart item.