Magento Forum

How Can I change “Qty” to “Feet” for a specific product? 
 
JamieD
Jr. Member
 
Total Posts:  30
Joined:  2009-09-08
 

I have a bundled product which has items that are ordered by the foot.  Some of my customers are confused that entering a “Qty” is actually selecting the number of “Feet” they want to order.  Is it possible on a product page to change the field that says “Qty” to the word “Feet” for a specific product?  My fear is this is a global value and cannot be changed for just one catalog item.

If this can be done, can someone point me to where I can find the code to modify?

If it can’t be done, is there a way to add the word “Feet” below the Qty field using HTML?  Thanks.

Image Attachments
Qty_to_Feet.png
 
Magento Community Magento Community
Magento Community
Magento Community
 
louislgf
Jr. Member
 
Total Posts:  16
Joined:  2009-09-11
 

You can find the file here

\app\design\frontend\default\yourtheme\template\catalog\product\view\addtocart.phtml

 
Magento Community Magento Community
Magento Community
Magento Community
 
JamieD
Jr. Member
 
Total Posts:  30
Joined:  2009-09-08
 

louis,

Thanks for showing me where the code is.  Do you know how I can change this label for just a few specific products and not all products?  Thanks!

Update:  OK, I tried modifying the Qty text in the code mentioned above, but it alters only the Qty text for the field at the bottom of the Bundled product page next to the Add To Cart button.  I need to find how to change it for a specific SKU as shown in the screencapture.  Any suggestions?  I’m getting close!  Thanks.

 
Magento Community Magento Community
Magento Community
Magento Community
 
JamieD
Jr. Member
 
Total Posts:  30
Joined:  2009-09-08
 

Thanks for the tip.  I got the hints turned on as you suggested, but I am not 100% certain where to see the hint.? I navigated in the backend to the product page, and saw a more detailed path in the url window.  Is this where you see the path?  If this is correct, this is what my screenshot shows.  Thanks.

Image Attachments
Product_Path_Hint.png
 
Magento Community Magento Community
Magento Community
Magento Community
 
JamieD
Jr. Member
 
Total Posts:  30
Joined:  2009-09-08
 

Sorry to be so slow about this, but in the frontend nothing looks different to me.  Where exactly do you see the hints?  In the URL field of the browser?  Mine looks the same with hint turned on or off.  It does look different on the backend though?

 
Magento Community Magento Community
Magento Community
Magento Community
 
JamieD
Jr. Member
 
Total Posts:  30
Joined:  2009-09-08
 

Ok, I finally got hints to show up on the front end.(had to turn off cache).  First screenshot is of a single bulk cable SKU that is the first item in my bundled SKU.  The second screenshot shows the bundled product page.

I have gone into appdesign/frontend/default/mytheme/template/catalog/product/view/addtocart.phtml and changed the value from ‘Qty’ to ‘Feet’ but when I go to my bundled product page, it only says feet down at the very bottom next to the Add To Cart field.  It still says Qty for the items that make up the bundled product.

I need to find a way to change this value only for specific SKU’s and not globally.

Can you explain in more detail the yes/no attribute?  How would this change the Qty text to Feet?  Thanks.

Image Attachments
Cable_Hints.pngBundled_Qty_Hints.png
 
Magento Community Magento Community
Magento Community
Magento Community
 
JamieD
Jr. Member
 
Total Posts:  30
Joined:  2009-09-08
 

In your template’s bundle/catalog/product/view/type/bundle/option/radio.phtml, ]

Thanks so much for this great information.  I think this will work for me. I am getting close but…

I am having trouble finding bundle/catalog/product/view/type/bundle/option/radio.phtml, that you mention.

is it in app/code/core/Mage/Bundle/catalog/product/view/type/bundle/option/ (once here I find a file called Radio.php, not Radio.phtml?)

if I look in app/design/frontend/default/my_theme/template/ (I have nothing called bundle here)

Thanks again for sticking with me on this.  I have spent the last two hours reading all of your posts.  You are very knowledgeable about Magento.  Thanks for your patience with a newbie.

Update:  I currently have 3 themes installed called

1. default
2.  CCW01 (one I created by copying the default)
3.  f001 (one that I downloaded from Magento Connect from Template Masters)

f001 is the theme I have active in Admin at the moment.  After doing a search of my server for radio.phtml it returned 2 instances with the path you mention above to themes default and CCW01.  f001 does not seem to have this file.

 
Magento Community Magento Community
Magento Community
Magento Community
 
JamieD
Jr. Member
 
Total Posts:  30
Joined:  2009-09-08
 

I figured that since my current theme f001 does not have the file in question, then Magento must look back to the default theme for this file.  So I edited the default theme radio.phtml file as you suggested.  It sort of works but has some glitches.  When I first go to the bundled product page the field still says Qty:

Once I click on the radio button, it changes to Feet:

However, when I click on the next radio button for cable in inches, it changes the label above to Inches, and the label for cable in inches stays on Qty:

See screenshots.

Image Attachments
Still_says_Qty_.pngChanges_to_Feet.pngChanges_to_Inches.png
 
Magento Community Magento Community
Magento Community
Magento Community
 
JamieD
Jr. Member
 
Total Posts:  30
Joined:  2009-09-08
 

Thanks for the new code to try!  But now you have me thinking, perhaps I really don’t need to use the radio button option for this product?  I only did it because I couldn’t figure out any other way to do it.  If the field can say “Feet” all the time for the “Cable in Feet SKU” and “Inches” for the “Cable in Inches SKU”, I could just have it set up like a simple product with the default qty of 0 in the field?  Could this work?

My goal is to allow the client to build a custom audio or video cable to the exact length they want in feet and inches.  I need them to be able to make an 8” cable or a 150 foot cable if they want.  Or a cable that is 38”.  3 feet plus 2 inches etc.  Then I want them to be able to pick the connectors they want for each end and add a wire label.  I want the process to be as intuitive as possible.  Right now, I think I am making the customer work too hard to figure out how to build the cable.

You can see how I have this set up at https://www.customcableworx.com under the catagory “Build Your Own Cable”

I have been experimenting with your code on my staging site that has a duplicate of my live store. Let me know your thoughts on this scenario vs the way we are doing it now?  Again, I can’t tell you how much I appreciate your time helping me with this riddle.

Update:  I tried experimenting with the different Input Types allowed for Bundled product:s Drop Down, Radio Button, Checkbox and Multi-Select. Only Radio button has a field for “User Defined Qty” which I need so the customer can enter in the length they want, so it looks like it will have to be Radio Button for the Input Type.

 
Magento Community Magento Community
Magento Community
Magento Community
 
JamieD
Jr. Member
 
Total Posts:  30
Joined:  2009-09-08
 

You Da Man!  This looks awesome!

I have played around with this a bit and Magento still does some unusual things.

In the bundled product, I have tried “Is Required” in both the yes and no positions for the Cable In Feet option Even if you have a qty of 0 in the field and it is set to “Is Required”, it automatically adds Qty 1 Foot when you add the SKU to the cart.

Notes: for the simple SKU of Cable In Feet I have “Minimum Qty Required in Cart” set to 0.
I have default qty for this SKU in the bundled product set to 0.

If I set “Is Required” to No, then it does the same thing unless you select the None radio button for that item.  If you Add To Cart with 0 Feet, it still automatically adds one foot.

The scenario I want to prevent is someone selecting 0 for both Cable in Feet and Cable in Inches and then only selecting connectors.  This ends up not building a cable, only selling connectors, which I don’t want to do.  Any thoughts on how to fix this behavior?  Thanks!

 
Magento Community Magento Community
Magento Community
Magento Community
 
JamieD
Jr. Member
 
Total Posts:  30
Joined:  2009-09-08
 

I have tried quite a few scenarios and this is what ends up working the best for me. (See screenshot) It is not perfect, but if I put default qty 1.00 for cable in feet, it will not allow them to enter a 0 in the field.  They have to click the None radio button to select 0.

Image Attachments
Bundle_Config.pngFront_End_Cable_in_Feet.png
 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top