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

Any examples of Craft Commerce checkout process for PayPal or any other gateway?

I'm unable to find much documentation nor examples for how to actually utilize Craft Commerce and successfully convert a cart to a completed order. Any help would be greatly appreciated!
2
votes
1answer
58 views

View all discounts applied to a cart and remove discounts from cart

On my cart page I have the coupon code form to apply discounts to the order. Underneath the form I want to list all the coupons applied to the cart with an button to remove each discount. As in the ...
1
vote
2answers
264 views

Craft Plugin Variable 'Undefined Index'

I'm currently adapting a shipping plugin that has a form for people to submit their tracking number and shipping company. The template checks the variable, and if it exists, it generates the proper ...
1
vote
1answer
112 views

Looking to export product listings from Salesforce and importing into Craft Commerce?

I've been trying to find an approach where one could import product listings from Salesforce directly into one of my product types in Craft Commerce. It seems like my only option at this point is to ...
2
votes
1answer
449 views

How to integrate Craft Commerce with Salesforce?

We're looking for a way to integrate Craft Commerce with Salesforce. What are the options there? Is there a Craft API to talk to? (I can't seem to be able to find it...) And the other option is to ...
1
vote
1answer
60 views

Add Adjuster after Order is completed?

I need to add an adjuster after the order is completed, but can't get it working. The reason is that the customer can order a individual picture, after that he get's a preview of the picture where ...
2
votes
1answer
135 views

Disabled product variant still shows in {% for %} loop

Disabling a product variant doesn't remove it from a {% for purchasable in product.variants %} loop I have set up. It still renders an image associated with it, as well as a color swatch. Essentially ...
1
vote
1answer
194 views

How can I filter Craft Commerce products by the current price

Building on from this question How can I filter Craft Commerce products by price I have a price filter in the store Using this code works fine for the normal price {% set queryParams = { ...
1
vote
2answers
200 views

Output currency symbols

Is there a way to output the currency symbols for each accepted payment currency in a Craft Commerce site? Consider the following simplified example; {% set currencies = craft.commerce....
1
vote
2answers
374 views

Craft Commerce - Edit Complete Order Address from frontend

We are trying to give our clients the ability to update an order's shipping address before the order has been actually shipped. We've created a members area where they can list their orders and ...
1
vote
1answer
53 views

Commerce Manage Settings for User Groups

When setting User Group permissions for users for Craft Commerce, there are explicit options for: Manage Orders Manage Products Manage Promotions But nothing is listed for Manage Settings. Is this ...
1
vote
0answers
106 views

Importing User Orders into Craft Commerce with Sprout Import?

I'm attempting to migrate customer orders from a Wordpress website using Woocommerce to an out-of-the-box install of Craft Pro + Craft Commerce. I've been able to export the user orders as a CSV file, ...
1
vote
0answers
52 views

Commerce Plugin Unintentionally Rewriting Past Orders - Commerce Bug or Something Else?

We are experiencing very unexpected behaviour with a very simple plugin we wrote and are stymied as to whether this is revealing a bug in Commerce or whether we have completed missed something. Here ...
2
votes
1answer
159 views

How to import user addresses?

I have an existing database full of users with their addresses. I'd like to import this into Craft (Commerce), and have their addresses saved as their billing address. The user import part is fine, I ...
1
vote
1answer
71 views

How to apply a discount on cart weight ?

I'd like to create a discount that is applied based on the weight of a cart. I'm working with bottles & boxes of wine, so a bottle of wine has a weight of 1kg & a box of wine can have a ...
3
votes
1answer
136 views

How do I query for orders that were completed between two dates?

I am attempting to get orders that were completed between two dates and the "before" and "after" criteria parameters don't seem to work. Perhaps I am using the wrong syntax? Example of how I am using ...
1
vote
1answer
83 views

Selling products with a digital variant using Craft Commerce

Is it possible to sell products using Craft Commerce, where the product may have digital AND non-digital variants? For example, a greeting card, might be available as a printed card but also as a ...
1
vote
1answer
40 views

craft.commerce.products.ids() possible bug?

I'm using the following code on a category listing page to list the sub-categories that contain products: {% set entryIds = craft.commerce.products.ids() %} {% if category is defined %} {% set ...
2
votes
1answer
1k views

Craft Commerce - Bad Request The CSRF token could not be verified

I've been following the Craft Commerce tutorials at Mijingo, (running on CraftPro 2.6.2983) all good so far, except when I go add a product to my cart. I'm getting a "CSRF token could not be found" ...
2
votes
1answer
233 views

Commerce Stripe Card Declined shows white screen with no error

I've got an issue when cards are declined and only a white screen is shown to the user without any feedback. The url has not changed at all either. This is happening on the live Stripe account so I ...
1
vote
1answer
34 views

Overriding Craft Commerce config files

Is there a way to override the Craft Commerce config files ? I'm specifically talking about this one, deep inside the plugin craft/plugins/commerce/etc/currencies.php I'd like to change the default ...
2
votes
1answer
93 views

How do I query multiple element types in one query

I have Craft Commerce installed, and I wanted to search title against both product title and variant title. I looked up in the database, I noticed that products and variants are of two element types, ...
1
vote
1answer
55 views

User group discount not applied when user has existing cart

I've run accross an issue that seems like a bug to me and I'm desperately looking for some help to solve it. I've created user groups in Craft & Discounts applicable to those user groups in ...
0
votes
1answer
44 views

Apply discount on login during commerce checkout process

I assign users to specific user groups and then I created discounts that are applied to orders based on the user groups that the users are in. I have a scenario where users add items to their cart ...
12
votes
0answers
534 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 ...
0
votes
0answers
34 views

Variable Deposits within one Product in Craft Commmerce

I would like to have a Shopping Cart that allows customizable Deposit Payments: As generally speaking, in our industry - a lot of us take deposits (which is our commission) and the balance is payable,...
1
vote
1answer
35 views

Same shipping rule name in different methods not allowed?

We are setting up shipping methods and rules as follows: Methods: FedEx Standard, FedEx Priority, FedEx Overnight For each method we wanted to add the following rules: US, Canada, International ...
0
votes
0answers
26 views

Notify Customer When Product is in stock [duplicate]

When a product is out of stock, I have a button instead of "add to cart" says "Notify me when in stock". This will bring up a model if the customer is a quest, where they can fill in their email ...
1
vote
1answer
92 views

no element type exists with getCriteria and custom element type

I am working on a plugin using the getCriteria function, but for every Element Type I put, I always get an error: No element type exists by the type “Comerce_Group”. $criteria = craft()->...
1
vote
1answer
55 views

onBeforeSendEmail event triggered from Commerce_EmailsService

I'm trying to access the order and orderHistory model via onBeforeSendEmail event. I can see that in Commerce_EmailsService.php file on line 311 the event is created with those params and passed to ...
1
vote
2answers
271 views

Is it possible to subscribe a user to Mailchimp during checkout in Craft Commerce?

Our checkout is only for registered users. Ideally you'd just provide a checkbox that says: Subscribe to Mailchimp? Any ideas?
3
votes
1answer
90 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
295 views

Error when trying to generate a PDF in Craft Commerce

I am getting an error when trying to generate a PDF in Craft Commerce. The error is: Undefined index: (/srv/data/web/vhosts/www.nihonshu-sake.lu/craft/plugins/commerce/vendor/dompdf/dompdf/lib/...
0
votes
0answers
327 views

Creating a product and it's variants programmatically

I'm really at a loss at what do. I'm already past my deadline for this so I'm kind of in a panic. I've created a task to take rows of a CSV file and create products and variants from them. Since I ...
1
vote
1answer
152 views

Saving a variant with new stock from plugin

Has anyone had any luck trying to save a variant via a plugin? I'm trying to integrate with a 3rd party inventory system and want to grab the current stock information and update my variants. ...
1
vote
2answers
131 views

Changing product type for products in Craft Commerce

At the moment there seems to be no UI / function for changing the product type for an existing product? I see theres a typeId column in the products table. Would it be as simply to change this? Would ...
1
vote
2answers
318 views

Commerce: Payment does not get completed

I am having trouble getting a payment completed (SaferPay, offsite gateway). After coming back from the payment provider I get redirected to the unchanged payment page again with the following error ...
1
vote
2answers
115 views

Can Craft Commerce receive back the address used in paypal express checkout?

When I checkout via Paypal express if I don't already have an address added to the cart model, when the paypal checkout process returns back there will be no address attached to the order. The ...
1
vote
1answer
37 views

Order product without gateway

I would like "buy" product without the use of a gateway. The reason for this is that the customer will have the option to apply for a loan at the bank and when the loan it approved we'll get a ...
2
votes
1answer
43 views

Automatically add an insurrance for a product

What would be the best way to automatically add a product when another product is added to the cart? For example, if I where to add a TV to the cart, I would like to automatically add a HDMI cable as ...
1
vote
1answer
170 views

Craft Commerce: Export each order to a specific CSV file and send it throught email

Although I don't like this for some reasons, my client wants Craft Commerce to directly send specific formatted CSV file to their CRM system for each order. Is it possible to write a Craft Commerce ...
3
votes
1answer
81 views

Tax and Commerce

I'm having some issues with the tax in the Craft Commerce plugin. All prices typed in the CP are without tax and I need to show the price in the front-end with a 25% tax included. If a product cost ...
3
votes
1answer
119 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
104 views

Stop currency translation in Craft Commerce

I’m creating a multi language site (Arabic/English) with Craft Commerce. On the Arabic cart page I output item.total with the help of {{ item.total|commerceCurrency(cart.paymentCurrency, convert=...
1
vote
1answer
82 views

How do I change a cart into an order?

I'm building a site that is driven by Craft Commerce but does not take payment online. Rather, the customer adds what they need to a cart and submits to the company for a quote. I need to build a ...
1
vote
0answers
92 views

When is the order email sent out in Craft Commerce?

I'm updating a custom field within a product to contain a discount code. The code is generated and the custom field updated using the onBeforeOrderComplete event. All works well, apart from the order ...
0
votes
1answer
84 views

Craft Commerce Cart

Whenever a customer puts items into their cart and logs out their email disappears until they log back in. Is there a way to view the email and info in commerce of the person when they log out?
1
vote
2answers
99 views

Unable to set cart currency in index.php

Craft: 2.6.2976 Commerce: 1.2.1341 I want to force currency depending on language (en_us and no). The user should not be allowed to choose. I've added two currencies 1) EUR - base, 2) NOK. Putting ...
1
vote
1answer
68 views

Edit custom field value inside “commerce_orders.onBeforeSaveOrder” event

I would like to edit custom Lightswitch field value to true inside of event on order save $order = $event->params["order"]; $order->setContentFromPost(array( '...
1
vote
1answer
293 views

Craft Commerce - For a discount, can we include all products in the product count but not include the sale items that receive the discount?

What I would like is for a 10% discount to be applied to non sale items after the total cart quantity reaches 10 total items. I would ONLY like this discount on non sale items. Is that possible? So, ...