Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7052989
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T03:27:00+00:00 2026-05-28T03:27:00+00:00

I am working on a Magento store that has a custom embroidery option for

  • 0

I am working on a Magento store that has a custom embroidery option for clothing products. Adding embroidery is optional (not required.) HOWEVER, if you do choose the embroidery option, there are a number of options which then become required, such as the name, font, etc.

I thought I could accomplish this by using javascript to remove the embroidery option fields if the checkbox to “Add embroidery” was not checked, and then using this code in an the overloaded Checkout/CartController.php:

/* Options #23-40 are the embroidery details */

foreach($product->getOptions() as $_option){
    if($_option->option_id >= 23 && $_option->option_id <= 40){
        $_option->setIsRequire(false);
    }
}

This ALMOST did the trick, however when I get to the view cart page, there is this error at the top:

“Some of the products below do not have all the required options. Please edit them and configure all the required options.”

Can someone suggest a different approach, or at least let me know if I’m on the right track? And I’m not interested in buying another module to accomplish this.

Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T03:27:01+00:00Added an answer on May 28, 2026 at 3:27 am

    The easy “hack” would be to not make them required but add the “required” css class to the input fields in your javascript. This will make Magento complain when you click the “Add to cart” button.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

How is working with Magento when it comes to adding custom functionality? From an
I am currently working on a Magento store (ver. 1.6.2.0) however when i click
I am working with Magento bundle products that contain hidden bundle options that need
I have been working on a custom module for Magento (ver. 1.8.0.0) that shows
Im working on a custom admin module for magento, and trying to learn the
I'm working on an extension for Magento (1.4 CE) that needs to be triggered
I'm working on an extension that will receive product information from Magento when saved
I'm working on developing a category roll-up report for a Magento (1.6) store. To
I am working on Magento CE 1.6.2 and would like to display 'New' Products
Im currently working on a custom product list in the Magento backend. Heres the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.