Is it possible to pass info from the content display to the cart?

Let me explain my situation so I can show why I need this. Maybe there is a better solution.

I am trying to develop a site for a photographer. He wants many options available to purchase. Different print styles, types of paper, styles of mounting, all of which will have size options as well.
Dealing with these attributes on Ubercart was a nightmare. There was no good way to organize them. After seeing the demo with the coffee mug, Commerce seemed like it would offer me a solution to my problem.

Posted: Apr 25, 2014

Rendering Add to Cart Buttons in Drupal Custom tpls: A How-to Guide

Rendering Add to Cart buttons causes a lot of confusion, it seems. I recently needed to do it on a ctools plugin content type and I wanted to share my experience (and victory) with the community:

WRONG approach - I was attempting to use drupal_get_form() to create the add-to-cart button like this in my template_preprocess function:

Posted: Mar 13, 2014

Remove "Add to Cart" /Sell external products

How is it possible to sell external products via affiliate links without using the DC cart?

I want to remove the "Add to cart link" on some products (not on all products). There should be only a link directly to the product on a external vendors homepage.

The link format is:

Posted: Dec 25, 2013

In Drupal Commerce, How to generate order using “Add to Cart” button in Custom PHP page

In Drupal Commerce Kickstart, I used custom PHP page in Drupal root folder. As per the requirement I choosed custom PHP Code to show products in different logic pattern. I am getting product id value for each product in that page. Now, I need "Add to cart" button which should generate order number and redirect it to checkout page directly. Please suggest.

Posted: Aug 10, 2013

Add to cart, validate custom line item field using rules

Hi all,

I am trying to compare a field in the custom line item i created against a field in the product display using Rules

I have tried creating a new rule and used " Before adding a product to the cart" as event but when i try to set the condition, "Entity has field" , i cannot find Node listed there..

Is there any way to do this?


Posted: Jul 30, 2013

How to re-position 'add to cart' button in kickstart?

i am using commerce kickstart 2. and trying to reposition "add to cart" button.
there is no option for this button in 'manage fields'.
tried to find the source code in 'firebug' so that i can edit, but failed.
Here is what i need to do

Please guide me through. Thank you.

Posted: Jun 29, 2013

Detect in javascript when add to cart widget updates product fields

I have a carousel of images for each product style. When the add to cart form refreshes the product images when the form fields are changed I need to setup the carousel for the new product images that have been loaded in.

Is there a way to hook into this using Drupal javascript or a special event drupal fires when adding in new content via js?


Posted: May 21, 2013


Subscribe to RSS - add to cart