Stack Exchange Network

Stack Exchange network consists of 175 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
24 views

Localization - “not found” in CP on language selection

Folks: I'm creating a localized site on Craft2 and CraftCommerce. I have followed the instructions for creating a localized site but none of the content shows at the localized URL and the homepage ...
1
vote
1answer
21 views

Get only enabled variants of a product

I would like to get all enabled variants for a product. I refer to the following question, where a method for limiting a for-loop is given: Disabled product variant still shows in {% for %} loop In ...
1
vote
1answer
21 views

How to set Commerce 2 confirmation email in .env file?

We're just in the process of upgrading from Craft 2 with Commerce 1 to Craft 3 and Commerce 2. One of the issues we had before was that the client was getting confirmation emails for test orders. Is ...
0
votes
0answers
16 views

Commerce 1 create a new order programmatically

How can this be done in PHP? I can't find anything in the docs.
1
vote
2answers
15 views

Commerce 1 get customer from user model

In PHP, is it possible to grab the customer model from a user model? EDIT: I just noticed that it is possible to attach a customer info field to the user. How do we achieve this?
1
vote
1answer
15 views

Upgrading Commerce 1 to Commerce 2

Folks: I've got an e-commerce site that I'm upgrading. I've upgraded to Craft 3 and can reach the CP and the home page. This site is tightly integrated with Commerce 1. When I visit the plug-in page,...
1
vote
0answers
17 views

Commerce 2 Subscriptions (Using Stripe API)

I'm currently trying to implement and understand how Subscriptions work on Commerce 2. I'm using Stripe API and have created the subscriptions on their CP. I've listed them on my shop page and added ...
2
votes
1answer
48 views

Simple webshop solution (Craft Commerce)?

I am looking for a simple shopping solution for one of my customers. Since their website is already running with CraftCMS, I am looking if there is any integrated solution available. However, so far ...
1
vote
1answer
40 views

Craft Commerce multisite, different tax rates

In Craft 3, Commerce 2 is there a way to set a different tax category or rate on a cart/site when using commerce in a multi site environment? Site A (b2c website) has tax rate 1 (21% with tax included ...
1
vote
1answer
37 views

Get all variants from multiple products

I need to get a list of variants from multiple products, but in a way that allows us to show the results in Craft's handy {% paginate %} tags. So far we have this less-than-appealing markup: {% set ...
1
vote
0answers
22 views

Get field type of product or variant with element api

Trying to get type of a field (dropdown, checkbox, etc) to render those fields in app, there is all sorts of info available in $variant->fieldLayout->fields like handles, values, ids except type ...
1
vote
1answer
18 views

How to get instance of DiscountModel in Commerce 2?

In Commerce i got an instance of DiscountModel Class as follows: $discount = new Commerce_DiscountModel(); Is this the right way in Commerce 2? use craft\commerce\models\Discount as DiscountModel; ....
1
vote
2answers
39 views

Can I set a Commerce order custom field from a plugin

On a site with Commerce 1, I have set up some custom fields for order related data. I can set them using form inputs like so: <input type="hidden" name="fields[myCustomField]" value="1"> I'd ...
-1
votes
1answer
17 views

Craft Commerce - empty cart.adjustments data

I'm having a Craft Commerce issue receiving cart.adjustments data in my twig templates. I've created a shipping category and shipping method with a rule to add a base rate of $10 to every order, but ...
1
vote
0answers
23 views

Shipping and billing addresses dissapear when close and open the page

I have the following problem. When I set shipping and billing address on my cart and exit the page, the addresses are cleared once I open the page again. Is it possible to disable this behavior? ...
1
vote
0answers
8 views

Paginate a list of product variants with categories parameters

I have got a category multi-select feature that allows users to filter variants by more than one category. On selection the URL is concatenated as a new category as follows: ?cat=blue ?cat=blue+...
1
vote
1answer
44 views

Same-page checkout

I'm having a very hard time making a one-page checkout. What I actually want is: automatically add the item to the cart. The cart can only contain one item. On the product page (that automatically ...
1
vote
1answer
32 views

Trying to automatically add a product in Commerce

I'm trying to add a product to a cart (and emptying the cart first) if a user just visits a template. My goal is to make a one-page checkout: so I want the address info on the product page itself. ...
1
vote
1answer
31 views

Modify Order table in Control Panel

I need to add and/or change an attribute in the order table on /admin/commerce/orders. The Order Element itself does not have a EVENT_SET_TABLE_ATTRIBUTE_HTML, and I've tried with variations like ...
0
votes
1answer
148 views

Need somebody to help us with our existing Craft web page [duplicate]

Our developer has disappeared and we need some help in changing and adding a few things on our website (www.fincarosablanca.com)? Would like to have somebody in Costa Rica but it doesn't really matter....
1
vote
1answer
20 views

AuthorizeNet CIM gateway in Commerce 1

Is there any barrier to using AuthorizeNet CIM gateway in Commerce 1? The vendor/omnipay/authorizenet folder has a CIMGateway class but there doesn't appear to be a corresponding ...
1
vote
1answer
26 views

Accessing Commerce product variant dimensions in the template

I have been unable to locate anything in the docs or any questions on here regarding how to print the dimensions associated with a variant in the template. All I have managed to find is how to print ...
1
vote
2answers
29 views

Possible to paginate product variants in Craft Commerce 2?

I am currently in the process of building a commerce 2 site with a very detailed level of nesting in the product options so we're looking to list all variants for a product. (Sounds silly, but it ...
1
vote
0answers
36 views

Adjustables - Tax and VAT

I'm working on a custom payment gateway, and the concept of tax adjustments are giving me some headache. How is this adjustment system, especially regarding tax, supposed to be used? Would it be ...
1
vote
2answers
56 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 ...
1
vote
1answer
23 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
23 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
29 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
1answer
58 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
47 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
127 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
0answers
30 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
1answer
23 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
45 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
24 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
83 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
31 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
2answers
74 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
29 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
49 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
57 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
35 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
28 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
24 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
61 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
53 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
193 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
24 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 ...