开发者

MAGENTO: complex custom options

I am trying to create a complex custom option and am having difficulty figuring it ou开发者_StackOverflow中文版t. What I want is a list of radio buttons with labels next to each showing height and width (ex. label would look like 1.5' x 3'. Thats the easy part.

Now, if a user clicks one of those radio buttons I want to display a text input (right next to the radio button label) to accept a value for length so that when the product is sent to the cart it shows something like 1.5' x 3' x 60'.

I figure jquery will get me down the road with hide/show part. It's the combination of inputs and pushing that concatenated data to the cart where I'm confused.


I haven't really dug around in the magento source, but I think a relatively easy way to do this would be if you created some custom options. If you had a custom option for the item that was for the various lengths and widths in the backend that are radios and then create a text box for the height for each item. Then you'd just have to look around with firebug and find where those element are and write some javascript, which jquery would work fine, to control the hiding and showing of the textbox. You'd only want 1 textbox and then use js to position it next to the appropriate radio button. Then when the user submits the set length and widths will be sent along with a corresponding height

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜