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
64 views

How to display the last 4 digits of the credit card used for a Craft Commerce purchase

I'd like to display the last 4 digits of the credit card used for a purchase in a front-end template. It appears the data is in the db in the craft_commerce_transactions table reference column in JSON ...
1
vote
1answer
49 views

Does Craft Commerce support Worldpay refunds?

If anyone else is using Worldpay with Craft Commerce (am starting to feel like I'm one of a very small number), do you have order refund functionality? As in, the Refund button that exists on the ...
1
vote
1answer
45 views

CSRF Token not verified with actual gateway in Craft Commerce

My payment page form works just fine with the dummy gateway, but once I change it to use my authorize.net gateway it says that the CSRF token isn't verified. The code below isn't complete, but I ...
0
votes
0answers
33 views

Billing address in email receipt difference from admin

I have an email set up to go to the client when a transaction completes. This email includes the shipping and billing addresses. The client forwarded me a transaction email that included a billing ...
3
votes
1answer
100 views

query orders by date AND time in craft commerce

How can I query all completed orders within the last hour? It seems craft is only comparing a date by YYYY-MM-DD. Following query collects all orders from the same day, as {{dateFrom}} would output ...
1
vote
1answer
42 views

Craft Commerce Worldpay 302 error

I'm having problems with Worldpay and their notorious dislike of 302 redirects with the payment response. I remember this problem last year and Luke fixed it but it seems to have returned. Within ...
1
vote
0answers
80 views

commerce_orders onOrderComplete not triggered?

Problem: I want to trigger an action (Instant Analytics plugin) whenever a payment (Craft Commerce plugin) is successful (webhook). Payment provider is Mollie. So far I created a plugin that listens ...
1
vote
1answer
181 views

Modifying Commerce line items after order is complete

I am in the process of building a gift card system for a Craft Commerce site. The current process is that the customer will order a gift card and proceed through checkout as with any other item. The ...
1
vote
1answer
61 views

Craft Commerce carts containing out-of-stock products

Customer 1 adds a product to their cart. Does not complete their order. Customer 2 purchases the remaining stock of that product, completing their order. Customer 1 returns to the store the next day, ...
2
votes
1answer
205 views

Commerce product order/sort options

What are all the available options that products can be ordered by? craft.commerce.products({ order: '???' }) I have found this reference https://craftcommerce.com/docs/products-fields#templating ...
2
votes
1answer
90 views

Address form not redirecting to payment form in Craft Commerce

I've had this working before but with the billing address as well. Do both the billing and shipping addresses need to be filled out in the same form for this to work? I get this error when I click the ...
1
vote
1answer
39 views

Show all discounts at checkout with Craft Commerce

I've taken the difference between the actual price and sale price of items and created a variable to hold the total value to give me a total discount at my checkout. I am curious if there is a way to ...
1
vote
0answers
43 views

How do you apply a sale/discount to digital products?

When using the digital products plugin, is there a way to apply a sale or discount to these products? This answer mentions a digital product only has a price property and not a salePrice property. ...
1
vote
1answer
161 views

Using the coupon code from Craft Commerce site

I got this code off of Craft Commerce, I had caught an error on the site previously so I'm thinking there might be an error here? I've put it in my file but when I input anything in the form I don't ...
0
votes
0answers
58 views

set slug from entry in custom field as a variable

My products have a custom field that allows the client to assign a 'designer' entry to it. (each designer has their own article page) I then need to use the slug from these 'designer' entries, to ...
1
vote
1answer
64 views

Product price format in euro

I have a Craft/Commerce set up with Euro is base (and only) currency and 3 locales are defined in the site (nl_be, fr_be and en_be). Prices are showing up as: 0,99 € instead of €0,99 When I ...
1
vote
1answer
42 views

Craft Commerce: Geo Location, and option select dropdown to switch between currencies

I would like the user to be able to switch between currencies (and tax), but I haven't figured out how to pull the currencies defined in Craft Commerce into a for loop. (I am pretty new to this ...
0
votes
1answer
70 views

How to use promotable Boolean in Craft Commerce?

I'm sure this is somewhere in Craft documentation but I cannot find anything on it. There is that checkbox in the product area that says "Promotable". I'm assuming this is so I can reference it later ...
1
vote
1answer
28 views

How can I break up a product into two page templates?

I have a product overview page, with images and some text, then a call to action that launches a product customiser for that particular product. (the customiser is requiring some bespoke JSON using ...
1
vote
1answer
60 views

Craft Commerce eWAY payment error

I am having some problems on integrating Craft Commerce with eWAY. When I submit the payment form, I get this error: Error: [Payment error: EWAY_CARDNAME Required, EWAY_CARDNUMBER Required, Invalid ...
0
votes
1answer
329 views

Is it possible to search in Craft Commerce by product type?

I am building an API that takes all products from the Craft Commerce Commerce_ProductModel. In this I am using the Element API plugin to build it out. I am running on Craft 2 latest version. I have ...
0
votes
0answers
34 views

Apply dynamic pricing with discount

I've built a plugin that calculates dynamic pricing by multiplying width by length and then by the price. This updates the lineitem great but not with a sale applied. I've created a sale that ...
3
votes
1answer
173 views

Set Entries field in Commerce order on completion

I'm trying to set an Entries field within a Commerce Order once the order completes. I've tried using the onOrderComplete event like so; craft()->on('commerce_orders.onOrderComplete',function($...
2
votes
1answer
314 views

POS integration with Craft Commerce

My client has an online store that we are building with 10 or so products. They will also have a high street store which sells the exact same products. Is it possible to integrate Craft Commerce with ...
1
vote
2answers
195 views

Update Commerce Cart using Fetch

Hi this is a variation of the question asked here on updating the cart using ajax, instead I'm attempting to use the Fetch API. As a test the form submits properly when submitting in the usual way ...
2
votes
1answer
246 views

Craft Commerce: How do I handle quantity based discounts on a product level?

I'm curious what the best way to handle quantity discounts would be on a product/variant level. For example: The base price of a variant is $3 each, but if you buy 10-19 they're $2 each, and if you ...
2
votes
1answer
20 views

How to change/discount total amount before payment

I want to change the total amount programatically before the payments are processed. If the total amount is $1000 I want to give a discount based on a point system in the users profile. You can add ...
1
vote
0answers
31 views

Is it possible to ask a user arbitrary, changing questions at checkout with Craft Commerce?

Craft Commerce allows us to have one set of custom Order Fields associated with a checkout process. I have a situation where we are selling tickets to a yearly event and I need to ask two questions of ...
1
vote
2answers
68 views

Get product type on event handler

I'm working on a plugin to calculate price based on width and height but struggling to get the product type of each product into the 'onPopulateLineItem' event. So far, I've looked into the ...
1
vote
1answer
173 views

Getting line items + shipping and their tax rates in a plugin

I'm working with an external system that requires me to send line items + their tax rate, and the shipping as it's own line item + any tax applied to the shipping. The format expected looks something ...
1
vote
1answer
51 views

Width, length and dynamic pricing - Commerce

We've built quite a few sites in Craft CMS and have been waiting for a project to get stuck into Craft Commerce - that time is here! BUT, one thing - it's for a carpet company so allowing the user to ...
1
vote
1answer
70 views

Stripe Bitcoin Support for Craft Commerce

Curious if anyone knows how we would setup Bitcoin support for Craft Commerce. We know how to handle it on the user and Stripe site to enable the checkout but will we need a custom payment handler ...
0
votes
1answer
70 views

Authorize.net not connecting in Craft Commerce?

I'm very lost with the gateway. It seems that Authorize.net is highly supported with Craft Commerce but the gateway isn't working. I had the dummy gateway working perfectly fine so that when I'd go ...
1
vote
1answer
39 views

How to detect the model type of an item in an array of query results

When querying multiple model types (entries, Commerce products and Commerce variants) I want to be able to detect the model type of each item as I iterate over the results array. Ideally to avoid ...
1
vote
1answer
90 views

Including customer details in Stripe emails

I have one of those questions that I have no idea how to phrase… Basically Stripe is sending an email notification to my client's ‘accounts department’ on successful payment, but it only includes ...
1
vote
1answer
60 views

Decimal value for quantity

I need to accept a decimal value for the quantity of a line item and for the total quantity. I understand this is not a normal request for most products but my client sells items by the foot and needs ...
1
vote
1answer
199 views

Can Craft Commerce products be filtered with multiple query params?

I am using Craft CMS 2.6.2987 and the Craft Commerce plugin. I am building a list of products on a page using query params. The idea is that there are 2 approaches. 1) A user clicks a set of ...
1
vote
1answer
68 views

Craft Commerce: Bakery site with multiple bakeries (How to handle product types and variants)

Alright, so I am trying to persuade a client to switch to Craft Commerce for their bakery shop. Thing is, their current setup is kinda messy, and I just cant figure out how to convert it properly to ...
1
vote
2answers
73 views

How do I view / output the gateway response message?

I'm working through the integration of a new Authorize.net gateway and bumping into errors trying to successfully process payments. How do I view / output the response that's coming back from ...
1
vote
1answer
85 views

Error updating programmatically a plugin's setting

I want to update programatically a plugin's setting: public function init() { craft()->on('commerce_orders.onBeforeOrderComplete', function($event){ // Set InvoiceNumber $...
1
vote
0answers
51 views

Remove discount from Commerce

Basically, a client needs to provide a discount that offers free shipping over a certain item total. Easy enough. But the discount needs to only apply to one shipping method, not all. I can easily ...
1
vote
0answers
126 views

Craft Commerce: Sort products by Sale price

Trying to sort products by price. {% set products = craft.commerce.products({ type: 'footwear', limit: shopSettings.productsPerPage, order: 'defaultPrice asc', }) %} It works fine. Please ...
1
vote
1answer
133 views

List applied discounts that have codes

So on a cart page, I need to list out the discounts that have been applied to a cart. I need to list them one by one, but only discounts that are applied with a code. I'm having trouble figuring out ...
1
vote
0answers
45 views

Showing products from many categories becomes very slow

We have 8000 products imported in the database, with a few 100 categories, sometimes up to 4 levels deep. What we try to do is that when a user clicks a main category, we show 4 random products of ...
1
vote
1answer
239 views

Product Variant Detail Page

I guess this is no big issue, but I'm pretty new to Craft Commerce :) I'm trying to code a dynamic template for the product variants page. This is the scenario: In the shop overview you see every ...
1
vote
2answers
41 views

SVOD and Social capabilities

I represent a leading online music tuition platform. We are considering using Craft to develop our new platform. We have a couple of questions about the capabilities of the platform. 1 - Can we ...
0
votes
0answers
20 views

Huge text field breaks the whole entry

I'm synchronizing Commerce products with an external software The images sent from that software are base64 string I'm trying to save them in an Rich Text field, to later convert them back into ...
1
vote
1answer
45 views

What is the best to find a developer to create a Craft plugin?

I have the Craft Commerce based webshop and need a developer to create plugin for Klarna Checkout (https://knowledge.klarna.com).
1
vote
1answer
40 views

Is it possible to use images as variant selectors when choosing products?

I am fleshing out all the main parts of my commerce site and going through all the requirements needed. I have installed the Craft Commerce plugin and set it up with required shipping, delivery, etc. ...
0
votes
1answer
92 views

Anyway to programmatically add default fields to a layout?

So I've been building my plugin to import product listings directly from Salesforce. So far I've been making progress. However, I've approached another roadblock and I was wondering how I would ...