Questions tagged [plugin-craftcommerce]

Use this tag for questions relating to the Craft Commerce product.

Filter by
Sorted by
Tagged with
14
votes
1answer
956 views

Issues with Craft Commerce and VAT taxes

We've just completed our first Craft Commerce website at Base Design. Overall everything went well but we encountered issues with taxes and the way VAT works on online sales in the EU. Craft Commerce ...
9
votes
2answers
776 views

3 for 2 etc with Craft Commerce

I'm looking for a way to offer "3 for 2 / 2 for 1" type options with Commerce. I've been able to achieve this just by adding a default value to a coupon code input. It works, kinda. If we need to ...
9
votes
1answer
281 views

How do you gain PCI compliance without certifying your server for Craft, with or without Commerce?

This is going to be informational, as we had a good conversation over this area on Craft Slack. And good fun trying to get around the idiotic StackExchange 'subjective' monitor to publish it here -- ...
8
votes
1answer
383 views

Using Commerce to pay for posting entry

I'm trying to figure out how to do the following: Person registers as new user User creates a new entry with a front-end entry form Entry is saved as disabled so it's not publicly visible User has ...
7
votes
1answer
1k views

Craft Commerce: Dynamic Product Price

Rather than a static price for each product, I need the price to be dynamic based on two other fields of that product. Here's an example of what I need to accomplish: Product Field 1: Wholesale Cost ...
7
votes
2answers
231 views

Notify users when item is back in stock

Is it possible to let customers enter their email on individual product pages if the stock is 0, and then automatically send them an email when the stock goes above 0 again?
6
votes
2answers
3k views

Why choose Craft Commerce over Magento

We have 2 clients that want to have an online shop website. One with 100 products, with 10,000 products. We've built 100's of websites, but no e-commerce sites yet. We're in the stage of writing the ...
6
votes
1answer
2k views

How can I update custom order fields in the frontend

I am struggling with using additional custom order fields. (Added in the Craft Commerce settings at "order fields", in the field layout manager) I try to update them like this in the checkout process:...
6
votes
3answers
1k views

Craft Commerce: Validation on Address Fields

Can someone break down how I should validate empty address fields as a plugin for Craft Commerce and take the following answer further? The Craft Commerce documentation provides the following example ...
5
votes
2answers
593 views

Craft Commerce: Displaying Individual Product Options in the Cart?

In the cart example code the selected options are displayed in an unformatted list like so: {{ item.options|json_encode }} I noticed that the note field text could be outputted individually like so: ...
5
votes
1answer
463 views

Commerce & PayPal - What does “Solution Type” mean?

Our site is using the Craft Commerce plugin, and within that we've enabled the PayPal Express gateway. However, there is a very cryptic dropdown menu on the gateway settings page... So my question is,...
5
votes
1answer
2k views

Update Commerce Cart using Ajax

Is there a way to update the cart using ajax? I've tried something like: $('span.quick-cart-add>p>a').click(function(e){ e.preventDefault(); var data = {}; ...
5
votes
2answers
263 views

List only Orders containing specific Products

Each Product has a Merchant field which is standard Craft User. What I'd like to do is list out all Orders which contain one or more Products relating to the currentUser. I was hoping I'd be able to ...
5
votes
1answer
817 views

One-Page Commerce Checkout

Does anyone have any recommendation on how to reformat the Commerce checkout workflow to be on one page? More specifically, how to pass the address/customer info before the payment info without having ...
5
votes
1answer
907 views

Managing a large number of Variants in Craft Commerce

I'm currently building a site for a client who's products vary in price depending on the width / height selected. Essentially what this means is each product has around 70 possible variations, each ...
4
votes
2answers
466 views

Craft Commerce: Detecting & Styling Flash Messages?

I'm styling my flash messages in Craft Commerce - I added if statements to detect the type of flash message. I noticed however that the message no longer displays but the styling does get picked up. ...
4
votes
3answers
1k views

Setting Shipping Country and Method for the Cart screen

I want to set the default countryId and a default shipping method (there is only one shipping method but contain several rules), so that the cart screen shows this and we can then present a shipping ...
4
votes
1answer
1k views

Order Confirmation Email in Craft Commerce

I am having trouble with emails being sent by Commerce. Checked my settings in Craft and sent test email. Works. Followed Commerce docs in setting up email. Double checked, but still does not work....
4
votes
1answer
551 views

Changing base currency

I set up a new shop and the base currency is US dollars. However I want to change this to Euro's. How can I do this? In Commerce --> Settings --> Payment Currencies I can add new currencies but I can'...
4
votes
1answer
200 views

Check if an order has been refunded in a template?

What’s the best way to check if an order has been refunded in a template? For example, you may want to: Add a message to the order/invoice template if a refund has been successful. Determine the ...
4
votes
1answer
1k views

Ordering of products?

What is the best method to organise products, and subsequently the order of these products within a group? Currently I have setup a product type of Canine. I can access each of these products via a ...
4
votes
2answers
525 views

Include tax in price on product page

Is it possible to include any tax values in the price on the products page (not just the cart)?
4
votes
1answer
226 views

Default price in Craft Commerce

I have a Product Type where every product has the same price. What are some good ways to avoid having to enter this same price for every product?
4
votes
1answer
337 views

How do I actually add a Digital Product to an order?

I'm trying to use the fresh new Digital Products plugin in my website. I managed to create some products and assigned licenses, I see some licenses when I log in as an end user - but the last link ...
3
votes
1answer
214 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($...
3
votes
2answers
80 views

How do I query for all users that bought a license?

I’m trying to use Craft Commerce with the Digital Products plugin for a site where users can pay for being listed on that site. Therefore I need to query for all users with certain criterias plus a ...
3
votes
3answers
280 views

Duplicate an existing Order as a new Cart in Commerce

Orders can not be edited in Commerce. Makes sense. What we want to do however is make it very easy for someone to re-order a previous order. So for example they've had an order that contains "two ...
3
votes
2answers
478 views

Check if cart contains valid products for discount code

I am trying to setup some error trapping on the discount code to output an error message if there are no products that qualify for the discount code the user enters. Here is the code I have; {% ...
3
votes
1answer
661 views

Transaction Error Message in Template

When a payment is made and something is incorrect e.g. card number is invalid, expiry date is in the past etc. The form just refreshes with no warning / notification of what's happened. I've noticed ...
3
votes
2answers
895 views

Have the country in craft.commerce.countriesList default

Is there a way I can have the array from craft.commerce.countriesList automatically default to the country my store is in?
3
votes
2answers
332 views

How can I notify store owners when stock levels are getting low?

For a Craft Commerce site, the store owners wish to be notified automatically when a stock is starting to get low. Can this be achieved with a plugin, and if so, how?
3
votes
3answers
487 views

Option and notes fields after cart at checkout for order, not just line items

My client has gift wrapping services but they apply to the entire order, not one single line item. How would I add notes or custom fields to the entire order, at the shipping stage of checkout? is ...
3
votes
1answer
294 views

Add custom fields to variant snapshot

How would I add more information (custom fields) to a variant's snapshot? The custom field I'm adding will change over time, but I need it to stay consistent on invoices etc.
3
votes
2answers
656 views

Getting started with Order Adjuster plugin

Starting with the Business Logic plugin from https://github.com/lindseydiloreto/craft-businesslogic I'm following 3 for 2 etc with Craft Commerce to get started. I have my main plugin file containing:...
3
votes
2answers
978 views

Register a user as part of a Commerce checkout?

Is it possible to register a user for a Craft user account as part of a Craft Commerce checkout flow? Ideally something where you can ask if the user wants to create an account and save their details ...
3
votes
1answer
858 views

How do I check if a product has stock in any of it's variants?

Basically, I'm trying to show "Out of stock" and disable a button for when none of the variants have stock, and unlimited stock is unchecked. I've tried this, which isn't working: {% if product....
3
votes
1answer
246 views

What is the correct syntax to check if a user has permission?

In my plugin, I am checking to see if the current logged in user has permission to save a commerce product. $user = craft()->userSession->getUser(); if (craft()->userPermissions->...
3
votes
1answer
338 views

How can I set a BOGOF (Buy One, Get One Free) promotion using Craft Commerce?

Under Commerce > Promotions there are the two options: Sales & Discounts. Sales is a flat rate with little conditions, so that leaves Discounts. Discounts have a bit more flexibility, but only ...
3
votes
1answer
453 views

Craft Commerce: Sub total before tax in cart?

I'm looking to get the sub total of all items in the car before and tax is added on. The example shop code doesn't seem to have this implemented. Is it possible to do? Total Discount: {{ cart....
3
votes
1answer
570 views

Is it possible to separate variant options on a front end add to cart form?

Is it possible to have separate variant option fields on a front end add to cart form? For example… have a separate select field for Color and a separate select field for Size?
3
votes
1answer
288 views

Can notes on line items be updated on checkout?

Currently, a user has to click update on each line item to save changes to quantity or a note. The quantity might make sense to the user as it updates the price, but a user could assume that the note ...
3
votes
2answers
364 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: ...
3
votes
1answer
160 views

Commerce: How to implement/save 'Use shipping for billing' field for future orders

There is a 'Use shipping for billing' field in the Craft Commerce sample templates but it is unclear to me how to use that in the CP or for an account user in their account or for a future checkout. ...
3
votes
1answer
371 views

How to apply a discount or sale to a variant?

The sale and discount menus only discount at the product level. However, I need the ability to apply discounts and sales at the variant level. How would I do this? Example: I sell a piece of software ...
3
votes
2answers
249 views

Get 'purchasable' from ElementAPI

The elementApi docs state you can use custom elementTypes via plugins. I am using craft commerce which states it creates the custom elementType 'purchasable' I've tried: return [ 'endpoints' => [...
3
votes
1answer
735 views

Are categories the best way to organize Commerce product filters?

The Commerce site I'm working on (my first Craft project) will have a product listing page with filters. These will function as you would expect, but clicking a filter name will link to another ...
3
votes
1answer
1k views

Craft Commerce: Creating Customer Accounts?

I just want to confirm how accounts are created for customers in Craft Commerce. Currently in the the Craft Commerce download the checkout processes provides the option to "login" or proceed with as ...
3
votes
1answer
845 views

Craft Commerce: Product Options

I'm trying to get my head round how Craft Commerce manages product options. My Product has the following (multiple) options. Material Type Distance between design No. of designs per metre No. of ...
3
votes
1answer
272 views

(Commerce) Multiple line items with the same purchasable ID?

I'm using onPopulateLineItem in my plugin to dynamically set the price of products added to the cart based on user input on the front-end - $lineItem = $event->params['lineItem']; $size = craft()-...
3
votes
1answer
537 views

Look up a specific Variant, using the variant's ID?

When looking up a specific product by ID, you'd do something like this: {% set product = craft.commerce.products.id(productId).first() %} If you instead have a variant ID and want to find a specific ...

1
2 3 4 5
14