I am new to magento and now I have a problem.

Using Magento

I need to add to the products two date attributes,

From xxxx/xx/xx
To xxx/xx/xx

It's for a hotel booking, and yes, the products are hotel rooms.

These attributes need to appear in the product description, and are required to add product to the cart.

It also need to be added and showed up in the order, and so in the order e-mail. Thanks.

1 Answer 1


That's easy & available in default Magento

  • Create two custom options for your product as From and To & set input type as date & set Is Required Yes.

    These options will be required to add product to the cart & will also display in order.

  • I will try that. Thank You. But my order email are not displaying ordered products, only payment method and customer info. Any clue about that? Nov 20, 2015 at 9:57
  • Ordered products in email comes from layout "sales_email_order_items" that is available in layout section. If you using some custom theme set default theme for testing purpose. Nov 20, 2015 at 10:03
  • Much thank you! Now another problem, how can I set the 'To' date to be always greater than 'From' Date? Is there a default Magento option to do it? Nov 20, 2015 at 11:49
  • No, You could use jQuery for that. Nov 20, 2015 at 11:53
  • Ok, thanks again! About the email thing, I have edited it through app/locale/pt_BR/template/email/sales, and thats probably the reason the e-mail don't show ordered product, it's not in order_new.html, what can I do to solve this? Can you give me the paths? Nov 20, 2015 at 12:00

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.