I’d like to sell domain names, my products named with its extensions (.uk, fr …). When the user checks the validity of this dn, he can add it to the cart with the “add_to_cart_button” button. I’d like to retrieve the field entered by the user in my cart. Is it possible to change the name of the product by adding dn before the extension and this just in the basket or by adding an attribute to my products? Here is my code:
JS:
[…]
var dom =domaine.replace(/.[^\.]+$/,''); //Domain name without extension
[…]
'<button type="submit" data-quantity="1" data-product_id=" '+ jsonObj[key[i]]['ID'] +'"'+'class="button alt add_to_cart_button product_type_simple">Add To Cart</button>'
[…]