1

I have a gift card application where minimum price of any gift card is already set. eg: 5$ But I want to give an option to the user so that they can add more money to their card eg: 50$. So I will charge them for 50$ now. How to add an input field so that user can add the amount from product page.

2 Answers 2

2

simply To add text box you have to create product custom option,,,from catalog>manage product

For reference Click here

5
  • Thanks for your answer, that's exactly what I want. Is there any way to add the same custom option for all of my products? I have almost thousands of products. Hope you understand. Commented Jun 25, 2015 at 4:58
  • @SandeepGupta for that you can ask new question,,, and if you find my answer helpful then accept it
    – Keyur Shah
    Commented Jun 25, 2015 at 5:02
  • @SandeepGupta i think there is free extension avaulable for that magentocommerce.com/magento-connect/custom-option-manager.html
    – Keyur Shah
    Commented Jun 25, 2015 at 5:03
  • I installed this extension but there is no way to add a new custom option from manage custom options screen? :( Commented Jun 25, 2015 at 6:03
  • you can check demo or contact extension developr for that @SandeepGupta
    – Keyur Shah
    Commented Jun 25, 2015 at 6:09
2

In order to do so, you should add a custom option as a text field and create an observer that will change the price accordingly.

How to create a custom price using an observer:

stackoverflow.com/questions/22638328/magento-add-product-to-cart-with-custom-price-using-observer

5
  • This should be a comment. beware of the downvote functionality.! Commented Jun 24, 2015 at 12:14
  • Thanks for your help, I already created an observer which can change the price of the product. What I am not able to do is, to create the input field to fill the desired amount on product page. Commented Jun 24, 2015 at 12:35
  • then just add product custom option @SandeepGupta
    – Keyur Shah
    Commented Jun 24, 2015 at 12:57
  • @Manashvibirla I changed my answer so it looks more like an answer
    – Aphroz
    Commented Jun 24, 2015 at 13:41
  • Image which is shown in the given link, edits the price that's absolutely fine for me. But I am really not sure what this function (convertPricespanToInput) does and also this line $block = new WebDirect_CustomPrice_Block_priceSpanToInput(); Commented Jun 25, 2015 at 5:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.