E-commerce

Doing this for a particular order is pretty straightforward. All you need to have is the ID of the coupon code: // This is the ID of the coupon code you want to add to the order. $coupon_id = 1; /** @var \Drupal\commerce_order\Entity\OrderInterface $order */ $order = \Drupal\commerce_order\Entity\Order::load(1); $order->get('coupons')->appendItem($coupon_id); $order->save()...
Read more
Most e-commerce platforms support offering multiple product variations on a single product display page. These variations are often differentiated by named attributes, e.g. size, colour, etc. In Drupal Commerce, we support all of this through Product and ProductVariation entities paired with ProductAttribute and ProductAttributeValue entities that define those differentiating attributes...
Read more
When we talk about e-commerce or electronic commerce we refer to the purchase or sale of a product through an electronic medium such as a web or app. E-commerce is consolidating as an alternative to traditional commerce due to its diffusion power that exceeds that of traditional methods. With fewer...
Read more

Have Any Project in Mind?

If you want to do something in Drupal maybe you can hire me.

Either for consulting, development or maintenance of Drupal websites.