Lord_Azure Posted July 3, 2009 Share Posted July 3, 2009 I print products, but customers can specify a name to add in. Is it possible to be able to create a link and for this link to add the product to the cart and have the name as an option? Link to comment Share on other sites More sharing options...
♥ecartz Posted July 3, 2009 Share Posted July 3, 2009 Is it possible to be able to create a link and for this link to add the product to the cart and have the name as an option?Yes. If you want to support file uploads as well (e.g. for logos on business cards), use Option Types v2 If you only want text attributes, you can use Product Attributes - Option Type Feature. Always back up before making changes. Link to comment Share on other sites More sharing options...
Lord_Azure Posted July 5, 2009 Author Share Posted July 5, 2009 Yes. If you want to support file uploads as well (e.g. for logos on business cards), use Option Types v2 If you only want text attributes, you can use Product Attributes - Option Type Feature. Is there a way to bring the information into the Add to Cart using the product and the option tag from another part of the site? I.e. If you look at my Coat of Arms web site, www.yeoldeblazoner.co.uk If you enter a name, it will search the name and give you the options of what you can purchase. Link to comment Share on other sites More sharing options...
♥ecartz Posted July 5, 2009 Share Posted July 5, 2009 <form method="post" name="cart_quantity" action="product_info.php?cPath=21&products_id=29&action=add_product"> <input id="id[txt_6]" name="id[txt_6]" type="text"> <input name="products_id" value="29" type="hidden"> <input value=" Add to Cart " type="image"> <form> will do it. You need to replace the 21, 29, and the 6 with the appropriate values for your product in your store. Always back up before making changes. Link to comment Share on other sites More sharing options...
Lord_Azure Posted July 5, 2009 Author Share Posted July 5, 2009 <form method="post" name="cart_quantity" action="product_info.php?cPath=21&products_id=29&action=add_product"> <input id="id[txt_6]" name="id[txt_6]" type="text"> <input name="products_id" value="29" type="hidden"> <input value=" Add to Cart " type="image"> <form> will do it. You need to replace the 21, 29, and the 6 with the appropriate values for your product in your store. Fantastic Thank you, i will sort this out and let you know. Thank you. Link to comment Share on other sites More sharing options...
Lord_Azure Posted July 9, 2009 Author Share Posted July 9, 2009 <form method="post" name="cart_quantity" action="product_info.php?cPath=21&products_id=29&action=add_product"> <input id="id[txt_6]" name="id[txt_6]" type="text"> <input name="products_id" value="29" type="hidden"> <input value=" Add to Cart " type="image"> <form> will do it. You need to replace the 21, 29, and the 6 with the appropriate values for your product in your store. I got the products_id and the cPath working, cant seem to get the add_product working, but it goes to the product_info page anyway, they can choose other options there. I cant get the id[txt_6] to work, which part of the attributes does this point to, and how can i find the number? Link to comment Share on other sites More sharing options...
♥ecartz Posted July 9, 2009 Share Posted July 9, 2009 I cant get the id[txt_6] to work, which part of the attributes does this point to, and how can i find the number?First, did you install either Option Types V2 or the Option Type Feature so that you would have text boxes? If so, then look at the HTML for the text input -- the number should be there. Always back up before making changes. Link to comment Share on other sites More sharing options...
Lord_Azure Posted July 11, 2009 Author Share Posted July 11, 2009 First, did you install either Option Types V2 or the Option Type Feature so that you would have text boxes? If so, then look at the HTML for the text input -- the number should be there. I think I have the option type feature, i have text boxes on screen, could you look and see if its the one i should have, www.yeoldeblazoner.co.uk Enter a name at the top, search and click on the first option to buy now I want the surname to go into the text box. Link to comment Share on other sites More sharing options...
♥ecartz Posted July 11, 2009 Share Posted July 11, 2009 Looking in the HTML on that page, I see <input id="id[txt_1]" name="id[txt_1]" value="My_Name" type="My_Name"> That's incorrect, the type should be text, not My_Name. I.e. <input id="id[txt_1]" name="id[txt_1]" value="My_Name" type="text"> If I click through to the next page, I see <textarea onkeydown="textCounter(this,'progressbar1',20)" onkeyup="textCounter(this,'progressbar1',20)" onfocus="textCounter(this,'progressbar1',20)" wrap="soft" name="id[txt_1]" rows="5" id="id[txt_1]" value=""></textarea> You could change the html page to match this page, but as this is a surname field, I would actually change the option type in admin. You currently have it producing a textarea (supports multiple lines) when I think that you only want a regular text box. You might have to delete the attribute and add a new one with a new option. Always back up before making changes. Link to comment Share on other sites More sharing options...
Lord_Azure Posted July 12, 2009 Author Share Posted July 12, 2009 Looking in the HTML on that page, I see <input id="id[txt_1]" name="id[txt_1]" value="My_Name" type="My_Name"> That's incorrect, the type should be text, not My_Name. I.e. <input id="id[txt_1]" name="id[txt_1]" value="My_Name" type="text"> If I click through to the next page, I see <textarea onkeydown="textCounter(this,'progressbar1',20)" onkeyup="textCounter(this,'progressbar1',20)" onfocus="textCounter(this,'progressbar1',20)" wrap="soft" name="id[txt_1]" rows="5" id="id[txt_1]" value=""></textarea> You could change the html page to match this page, but as this is a surname field, I would actually change the option type in admin. You currently have it producing a textarea (supports multiple lines) when I think that you only want a regular text box. You might have to delete the attribute and add a new one with a new option. OK I'm getting there slowly. It works if i add the add_product to the form line in searchresult which adds it straight to the cart. Is it possible to place the surname straight into the text box on product info so it gives other options too, such as orientation and also i will be adding frame designs. You have been a great help so far. Thank you for that. Link to comment Share on other sites More sharing options...
♥ecartz Posted July 12, 2009 Share Posted July 12, 2009 Is it possible to place the surname straight into the text box on product info so it gives other options too, such as orientation and also i will be adding frame designs.Ironicly enough, that's easier than what you originally said you were trying to do. If you search for a name, click the add to cart button next to the name, re-enter the name on the product info page, add to cart (for real this time), then click on the product link in the cart, it takes you to a URL like http://www.yeoldeblazoner.co.uk/catalog/pr...t_1}My_Name{2}1 A simple link can go to that. However, you'd lose the ability to have a text box on the previous page where they could change the name. You could regain it with some javascript which built the URL on the fly or by modifying the PHP in the contribution to look for a another variable that you could pass. By the way, that URL will change if you add additional attributes. I tried it without the {2}1 and it broke. This is a fragile solution because you're mimicking osCommerce outside of the osCommerce framework. However, it can work. It's just not robust under change. Always back up before making changes. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.