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.

2
votes
1answer
700 views

Display custom product field in cart

How would I access a custom product field in the cart. I did it with the snapshot attribute like so: {# cart.html #} {% for item in cart.lineItems %} {{ craft.commerce.products.id(item.snapshot....
0
votes
0answers
143 views

Email not working with additional content in Craft Commerce

The following email will work. {{ order.id }} However if I add any additional text such as below the email will no longer process. Any suggestions on what I am doing wrong. Your Order {{ ...
3
votes
1answer
68 views

How can I relate a FK back to the purchasable ID?

First off, HUGE thank you to Lindsey for opening this door for me. Opened up a whole new layer! I have (another) plugin that is listening to the commerce_orders.onOrderComplete event. My plugin ...
4
votes
1answer
948 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....
1
vote
1answer
561 views

Purchase Order in Craft Commerce

I read through the docs for Commerce, but could not figure out how to use Purchase Orders with Commerce. I am still working through the trial version to make sure Commerce can do what the client is ...
4
votes
1answer
88 views

Commerce - How do I add the purchaser of a specific product to a user group?

I want all buyers of a specific product to automatically be added to a specific user group. How do I do this?
1
vote
1answer
201 views

Using elementSelect for third-party elements

I'm writing plugin to extend Craft Commerce and I want to present a good way to select products in CP. I know I could use dropdown select for this, but using Craft's elementSelect would make the UI ...
2
votes
1answer
572 views

Craft Commerce: Sort Products By Price

Trying to sort products by price. Since the price of a product in Commerce isn't a textual custom field it's attached to a variant, I'm having trouble working out the syntax to make this happen. {% ...
1
vote
1answer
798 views

Search Form with Craft Commerce

I am using the following form in Craft <div class="parts-search"> <form class="parts-search-block" action="{{ url('parts/results') }}" method="get"> {#-- CATEGORY SEARCH --#}...
1
vote
0answers
300 views

Commerce - Get Model via Custom Field

I have the following $criteria = craft()->elements->getCriteria('Commerce_Product'); $criteria->search = 'unquieId:' . $result['id']; $criteria->status = null; $product = $criteria->...
4
votes
1answer
444 views

How can I create a States drop down?

Working with the Commerce example templates. The example template uses javascript to populate the States which is based on the selected Country. The code for the Country and State select field: <...
1
vote
1answer
105 views

How to use a note from the Line Item Model

Working with the example Commerce templates. In the cart template there is an example for adding a note. https://craftcommerce.com/docs/line-item-model#note The code for this form: <form class="...
2
votes
1answer
605 views

How do I make use of the order fields In Commerce?

Building on top of the Commerce Example Templates. I've made an order field called 'Customer Reference'. I'm submitting data like this: <form class="shopForm" method="POST"> <input type="...
0
votes
2answers
463 views

Limit variants In Craft Commerce

I am new to Craft Commerce and trying to get a handle on how to display variants on the Product Page. I want to display only the variants which have a specific SKU. I have the following code. (I ...
1
vote
1answer
305 views

How can I get a specific product via plugin?

I am able to inspect my cart using commerce_orders.onOrderComplete. Next I loop through each line item & check for a specific product type. I need to be able to get the specific product, as there ...
2
votes
2answers
301 views

Output coupon in the code back end using Craft Commerce

I use the plugin Craft Commerce. I can not find how to output the coupon code used by the customer in the back end on the order page. Anyone would know how to? Thanks a lot!
1
vote
2answers
339 views

How To Accept Payments By Check

I have a client that will only be accepting payments by check at this time. It is a larger company that has same clients and they bill the client and check is mailed. However they want to be able to ...
3
votes
1answer
464 views

Multiple Prices based on User in Craft Commerce

This is my first time using Craft Commerce. I have a client which needs to have multiple prices for a product. Customers are in one of three price level groups. Each price level group has a price ...
2
votes
0answers
390 views

Craft Commerce Product Reveiws

For those who have implemented Craft Commerce and needed product reviews, what has been a good solution for you?
1
vote
1answer
683 views

How do I import existing products into Craft Commerce with the FeedMe or Import plugins?

I get it that there are hooks, but i can't get enough inside the differences between entries and product, and actually hack together an extension for either of those plugins.
1
vote
1answer
582 views

Can the Element API export Craft Commerce orders as the element?

Background: We are considering using Craft Commerce to replace Shopify for more custom fields. However Craft Commerce does not have simple export buttons for exporting orders, so we are looking at the ...
3
votes
1answer
259 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
638 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?
2
votes
2answers
389 views

Does Craft Commerce support multi-currency?

After looking at the Features page for Craft Commerce, I didn't see anything regarding multi-currency support. Is this something that's available for certain payment processors?
1
vote
2answers
844 views

Craft Commerce - Handling Product Types

I am using Craft Commerce for the first time and am trying to dynamically generate a dropdown menu that contains links to each product type. I thought the best way to accomplish this would be by using ...
2
votes
2answers
532 views

Emails not being sent when transaction complete

Folks: I'm wondering if this is a bug or something else. Essentially, test emails from the system work fine but emails that are supposed to be sent when the order moves to "Processing" do not. The ...
2
votes
2answers
821 views

Customizing Craft Commerce Template Paths

Let me apologize right now that my inexperience with Craft is likely the issue here and that my question might be more general to Craft's routing features and not so specific to Craft Commerce. I'm ...
3
votes
1answer
488 views

Adding items to cart from related entry not working

Folks: I have a list of accessories related to a main product. After adding the main product to the cart, the user can then add accessories related to that product. The code seems to check out. The ...
10
votes
2answers
704 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 ...
3
votes
2answers
295 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?
1
vote
1answer
71 views

Displaying image from related CraftCommerce entry

Folks: I'm using CraftCommerce. I have a main product and several accessories related to that product. Accessories have a title, description, price, and image. Now, I have no problem pulling the ...
0
votes
1answer
70 views

How can I specify order when getting all products of a given type?

I am getting a list of all products for a specific type within commerce. All is well & working great. I would like to know how I can dictate order. In my case, I always want the cheapest product ...
3
votes
1answer
113 views

With Craft Commerce, how can I call getAllStates from my own plugin via ajax?

I am trying to call $states = craft()->commerce_states->getAllStates(); from within my own plugin, via an ajax request. MyPlugin.php if (craft()->request->isAjaxRequest()) { return $...
0
votes
1answer
280 views

How to setup the Craft Commerce store both front and back end [closed]

We've a requirement to setup Craft Commerce store as part of our testing, in this process we've gone through the documentation and found that we need to use HTML, CSS or JS code to complete the store ...
1
vote
1answer
77 views

Why does MultiAdd think I am not sending any items?

I am trying (and failing miserably) to send multipule products to my cart using MultiAdd I can see the data getting sent - it looks ok? I get a 200 response back, so I know its working, but I'm ...
1
vote
0answers
61 views

How can I pass a null value to commerce? [closed]

I am populating a drop-down with product variants like this: <select name="mySelect" class="form-control"> <option value="">Select</option> {% for purchasable in product.variants %} ...
0
votes
1answer
836 views

How can I get/check the contents of a cart via javascript (cookie)?

Within my application, I would like to only show a link to the the user's cart only if there are products in it. I was going to use javascript to check the cookie I can see getting set. ...
3
votes
1answer
359 views

Why would Craft Commerce only be using the dummy gateway?

This maybe an obvious one but I thought I should document it here. After purchasing Craft Commerce and enabling your payment gateway of choice after disabling the dummy gateway, payments are still ...
9
votes
1answer
358 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 ...
5
votes
1answer
1k 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:...
0
votes
1answer
171 views

How can I make a product field required?

I have a drop-down of variants of a product. For example t-shirts: {% for purchasable in product.variants %} <option value="">Select</option> <option {% if purchasable.stock &...
0
votes
1answer
569 views

How can I have more than one product on the same page?

Using Craft Commerce, I would like to offer more than one product on my _entry template. For example, let's say I am selling a wagon. I have a drop down of variants for color: <label>Choose ...
1
vote
1answer
53 views

How can I pre-select a product variant based on user profile?

I have a product variant that a user can choose from. It looks like this: <select name="purchasableId" class="form-control"> {% for purchasable in product.variants %} <option {% ...
1
vote
1answer
350 views

Custom Labels for Address Fields Craft Commerce

I need to be able to assign and output my own custom labels for the fields that are in the shipping/billing addresses during checkout in Craft Commerce. I've already done so on the form like so: {% ...
0
votes
1answer
296 views

Test for specific or multiple product variants

I'm trying to test if a product has multiple variants AND/OR test for specific product variants. {% if product.variants|length > 1 %} That does not seem to work, even if it is a non-variant ...
0
votes
1answer
420 views

How can I get the current user who purchased a product from the onOrderComplete event?

I have a plugin that is listening to the onOrderComplete event within commerce. I am able to get the email address like this: craft()->on('commerce_orders.onOrderComplete', function (Event $event) ...
1
vote
0answers
175 views

Dynamics Nav 2015 (Navision) integration

I'm looking for advise and a strategy for integrating Dynamics Nav 2015 with Craft Commerce. I realise this is a broad question and a hard one, certainly since Craft Commerce has only been recently ...
3
votes
1answer
191 views

Edit order from backend

Is it possible to add products and discounts to an order from backend? From what I see it's only possible to edit the orders custom fields.
1
vote
2answers
851 views

How do I select a specific product variant by element/field/entry?

Excuse my new-ness, but I'm having an issue with product variants. Scenario I have a product with multiple variants (up to 30 in fact). Based on the URL, I want to choose a specific variant so that ...
1
vote
1answer
278 views

Can't duplicate a product in Craft Commerce?

I can't seem to find a way to duplicate a product in Craft Commerce. I've duplicated articles before, with the "save as new" feature... But can't find anything similar for products. Does such a ...