Magento: Add textboxx on product details page for custom size

Magento: Add textboxx on product details page for custom size

October 19, 2026 · Illustrated author avatarBy Stefan Bogdanescu
Magento: Add textboxx on product details page for custom size

Adding a Textbox for Custom Size on Magento Product Details Page

When working with Magento, one of the challenges is extending its core functionality to meet specific business requirements. In your case, you need to add a textbox on the product details page for customers to enter size-related information without affecting the price.

Understanding the Requirements

The key points in your request are:

  1. The textbox should appear on the product details page of ring products.
  2. The textbox is purely for customer reference and does not impact the product’s price.
  3. Magento doesn’t natively support a textbox on configurable products.
  4. You’re looking for an extension or custom code solution.

Why Custom Code is the Best Approach

While there are many third-party extensions available, using custom code allows you to maintain full control over your website and ensure it meets your specific needs without any conflicts or hidden fees.

Implementing a Custom Size Textbox in Magento 1.7

Step 1: Create an Attribute for the Size Field

First, create a new attribute called “Size Details” under Catalog -> Attributes -> Manage Attributes.

  • Set the data type to Text.
  • Make it visible on frontend and set the input type as text box.
  • Save the attribute.

Step 2: Add the Attribute to Your Product

Edit your ring product:

  • Go to Catalog -> Manage Products and select your ring product.
  • In the ‘Attributes’ section, find the “Size Details” field you just created.
  • Enter some default value (e.g., Size as per customer’s requirement) or leave it blank.

Step 3: Display the Textbox on the Product Page

To display the textbox on the product details page, you need to modify a Magento template file. Navigate to your theme directory and look for the file templates/catalog/product/view.phtml.

Add the following code just above the “Add to Cart” button:

<div class="custom-size-field">
    <label for="size-details"><?php echo $this->__('Size Details'); ?></label>
    <input type="text" id="size-details" name="size_details" />
</div>

Save the file.

Step 4: Capture the Textbox Data (Optional)

If you want to save the size details entered by customers, you can use an observer. However, this requires advanced Magento development knowledge and is beyond the scope of this guide.

Conclusion

By following these steps, you should now have a textbox for custom size details on your Magento product page without any conflicts or hidden fees from third-party extensions.

Remember that while Magento offers extensive out-of-the-box functionality, sometimes you need to dive into its core files to extend it further. Always back up your code and test changes thoroughly before deploying them to your live site.

For more advanced customizations like this, consider hiring a professional Magento developer or reaching out to LaravelCompany.com for expert assistance in extending your e-commerce platform’s capabilities.

Magento 1 Catalog Extensions Configuration

Our network