Questions tagged [plugin-craftcommerce2]

Questions related to the Craft Commerce v2 plugin.

38 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
3
votes
0answers
101 views

Craft Commerce: Create new shipping zone by excluding other zones

I need to create 3 shipping zones in Craft Commerce 2 (currently on v2.1.7): UK Europe Rest Of The World Having to manually add the countries to the UK and Europe zones isn't too much of an issue, ...
3
votes
0answers
541 views

Searching for Multiple Categories and Tags

I've been pulling my head for the past day on how to filter products with multiple categories. After a long search, I found and implemented on my project, Advanced Search with tags and categories It ...
2
votes
0answers
73 views

Is it possible to pass metadata to Stripe from Craft Commerce

With Craft 3 and Craft Commerce 2 with the P&T Stripe gateway is it possible to pass metadata to Stripe? I've tried various combinations of hidden fields but without success so far. I was hoping ...
2
votes
0answers
28 views

What are the replacements for the order events onBeforeAddToCart and onBeforeGatewayRequestSend in Commerce 2

I'm looking for replacements for the events onBeforeAddToCart and onBeforeGatewayRequestSend. I used onBeforeAddToCart to prevent the user from adding an article from different article groups to the ...
2
votes
0answers
102 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
0answers
171 views

How best to add price tiers based on user group

I'm new to Craft Commerce. I wish to add around 10 price tiers to each product. Users are in groups and the group determines which price tier they pay. All the data is to be imported (and kept up to ...
2
votes
0answers
75 views

Add custom column to the orders list page

Does anybody know if it is possible to add a column to the orders list page? I can choose the 'Foo' label, but when the page want to show the orders list I get the following error: "{"error":"An ...
2
votes
0answers
106 views

Commerce 2 Multi-site Support

I'm currently working on a multi-market Craft3 project with Commerce2. Each product can and will have a different fixed price on each page. Product A project.tld/de-de - € 120 project.tld/en-gb - £ ...
1
vote
0answers
29 views

How can I search for Craft Commerce orders with a specific product?

Is it possible to narrow the order query from the default order listview in the CP from Craft Commerce? Because I’ll want to show all orders with a specific product so I can export them.
1
vote
0answers
23 views

How to fetch products related to every product within an array?

I’ve got products which are related to various products of another type (product.accessories). Now I’m trying to fetch all products related to every single product within a given array. My first ...
1
vote
0answers
33 views

How can I show only the sale discount applied to a completed order

I have two orders for the same product. One placed with a sale on the product enabled and the other with the same sale on the product disabled. On the order details template for customers I have the ...
1
vote
0answers
40 views

Getting value from response (Craft Commerce)

I'm in the process of adapting the old RealEx gateway to work in Commerce 2 since that's what we're using and there isn't native support in V2. I've got payments and 3D secure working, now I'm trying ...
1
vote
0answers
25 views

Order history access item/cart totals in payment currency

I'm a bit confused at how to show previous orders taken in another currency. For example, if I take a payment in EUR but my default currency is GBP the order price (eg subtotal, tax, total, etc) are ...
1
vote
0answers
71 views

Craft Commerce Adjuster API/PHP questions

I've got a module set up to add discounts based on criteria defined in a category group (handle 'productPacks') -> category (which is a "pack"). Now, everything works great for one type of pack, and ...
1
vote
0answers
25 views

EagerLoading on category pages with different product types

I have a category template like so; {% extends '_layouts/_site' %} {% set products = craft.products .with( [ 'department', 'productImage', 'finish', 'pcd', 'variants', 'thread', '...
1
vote
0answers
131 views

Adding Product Variant and Related Product to the cart together on Craft Commerce 2

I want to add a product variant as well as a related product (chosen from a select list) together when the user clicks the add to cart button. I can see you can add multiple products together with ...
1
vote
0answers
256 views

Is it possible to take a partial payment of an order in Craft Commerce?

I have a request from a client to be able to take deposits for events purchased through craft commerce. These are high ticket items and customers would like to spread the cost of payment over several ...
1
vote
0answers
46 views

Is it possible to change the group that a user belongs in the front-end?

A little background: The website runs on Craft v.3 Pro and Commerce v.2 Pro The user can register as a member from the front-end. They will be able to select only one of 3 different groups to ...
1
vote
0answers
74 views

Create Manual Order for another customer

Is there any way for an admin to use the Manual gateway and create an order for another customer in the system? Or is the only option for the admin to Log In as User feature and go through the ...
1
vote
0answers
61 views

Looping over categories, product variants, and subsequently applying adjuster(s)?

Using the Craft 3 and Commerce 2 APIs, how would one go about looping through products in the cart to apply adjusters, looking at the following example; A category, "Product Packs" is set up where ...
1
vote
0answers
224 views

XMLHttpRequest Craft Commerce Cart Update Issues

When using XMLHttpRequest to update cart like the following, I get a 500 error for 'lineItems': {[lineitem]: {'qty': value}} (and also {[lineitem]: {'remove': true}}, any other submission works); var ...
1
vote
0answers
46 views

How to keep a users cart active after logout - Craft Commerce 2

How do I set the cart to save / stay active in a users account. When I add some products to my cart (when logged in) and logout or close my browser the next time I come back my cart is empty. I'd like ...
1
vote
0answers
27 views

How to modifyPaymentRequest() in Commerce 2?

Looks that I really used every functionality in my plugin that changed or has been removed in Commerce 2. :( I need to modify paypal transactionId and description what i did as follows in Commerce 1: ...
1
vote
0answers
25 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
0answers
172 views

Extending Craft Commerce Purchasable Nav Items

I'm looking to extend Craft Commerce with a custom Purchasable. I'd like to implement this using a module if possible. I've implemented the base class for my new Purchasable and that's all good. ...
1
vote
0answers
44 views

Commerce Discount Issue/Discepancy

In Craft 2 Commerce 1 one could apply a coupon code with "per email limit" during checkout, without having the email added to the order/cart model(s). In Craft 3 Commerce 2 the same scenario yields ...
1
vote
0answers
38 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
0answers
91 views

Craft Commerce 2: Get products which are availableForPurchase

I try to get all the products of a certain category which have availableForPurchase set to true. {% set criteria = craft.products.type( 'weine' ).relatedTo( cat ).search( 'availableForPurchase:1' )....
1
vote
0answers
64 views

Complex shipping logics

In Craft Commerce 2, we have two shipping categories: PostNL, which is one of the Dutch main shipping methods, which we use for packages that fit in the mailbox. For this category we use the weight ...
0
votes
0answers
41 views

Why does a cart get added with no Order Number?

Sometimes, the cart gets added without the id as below. Any ideas, please? (Craft Commerce version is 2.2.19)
0
votes
0answers
43 views

Changing URL format in craft commerce products error 502

I have more than 150k products on craft commerce, and i need to do some changes in the URL format, but when i click save, the server returns a 502 error. I think that is because craft is trying yo re-...
0
votes
0answers
14 views

Error when trying to access 'variables' inside the PDF template in Craft Commerce

I'm trying to include the custom image field inside the PDF file of Craft Commerce. I added the following code to the module: use craft\commerce\events\PdfEvent; use craft\commerce\services\Pdfs; ...
0
votes
0answers
11 views

Lineitem language not correct

I have a multisite and it seems that the lineitems are always saved in the default site's language. When I loop over order.lineitems the item.description isn't translated. When I look at the order in ...
0
votes
0answers
25 views

Commerce payment currencies

admin/commerce/store-settings/paymentcurrencies There is no Croatia on currency list HRK How to solve that... Is it possible (in Craft Commerce V2) to have multi STOCK location fields for products ...
0
votes
0answers
68 views

Payment gateways are not synced

Craft Solo : 3.1.25 Craft Commerce : Lite (2.1.12.1) I am trying to integrate it with Commerce Lite for a subscription plan. I Created 1 product at stripe account. Added stripe keys to my local ...
0
votes
1answer
698 views

ERR_EMPTY_RESPONSE when accessing order data (MAMP)

I've got a local installation of Craft 3.0.37 and Craft Commerce 2.0.0-beta.15 running on MAMP. When completing an order, an empty response is given by the browser. The same thing happens when trying ...
0
votes
0answers
22 views

Duplicate products to subdomain

I can't find this anywhere so I'm going to assume it hasn't been asked. Is there a way to duplicate my products from my primary site to my subdomain? It seems like it should have done it ...
0
votes
0answers
120 views

Custom Commerce product type URL from custom field

I've run into a dead end when trying to create custom URL's for a product type in Commerce 2. I want to create the URL from a custom field -- a Commerce Product field to be exact. This product does ...