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
23 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
19 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 ...
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 ...
2
votes
2answers
506 views

Craft Commerce Required Address fields

I need to make the address fields in craft commerce required, as well as the phone number, etc. I tried to add the 'required' tag to the input element, but it breaks the form so you can't submit it -- ...
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?
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
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
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
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
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
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
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? ...
2
votes
1answer
39 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
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 ...
3
votes
1answer
345 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
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
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
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
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
55 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
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 ...
2
votes
1answer
78 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....
2
votes
0answers
232 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. ...
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
2answers
187 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
57 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
516 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
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
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
1answer
39 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
263 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
85 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
37 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
264 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
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
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
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
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
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 ...