Custom Sized Products

Last modified by Mark_Kimsal on Mon, December 17, 2007 10:52
Source|Old Revisions  |  Back To Group

This is an old revision of the document!

This article will detail an approach to taking custom sized orders from customers and attaching the specific information to an order invoice.

The steps involved are:

  • Create a product attribute in an attribute_set for your products that need a custom size. We will call this attribute “custom_size’ for the remainder of this article.
  • Alter the product info page to show specific form controls to the user for entering their size information.
  • Alter the cart procedure to attach the customer’s information to the product
  • Alter the order processing procedure to pass the product information into the order (sales_quote_item in Magento speak)

Product Attributes

You will need to create a product attribute called “custom_size” and attach this to any attribute set required for each product that can accept a custom size. This attribute will not be shown to the front end. It will act as a container and pass messages through-out the Magento system.

User Input

Altering the product info page to include specific size form controls is different for each organization’s needs. For this article we will create 2 input fields, one to ask for width information as whole inches, and one to get fractional width information down to the 1/8th of an inch.

Cart Procedure

As the first step, we will hard code in a valid of 23 & 1/8” into the custom field for testing purposes.

in app/code/core/Mage/Checkout/controllers/CartController.php around line: 89

$product→setData(’custom_size’, ‘32 1/8”‘);

Add the above line just above the line: $cart→addProduct($product, $qty);


Magento 2 GitHub Repository

Magento Job Board - Some sort of tag line goes here

Latest Posts| View all Jobs