Tagged: woocommerce
Hi, how do I add text between the quantity elements (i.e. just after the ‘+’ sign) and the ‘Add to cart’ button? I need to specify the unit for the item that is sold.
Thanks
Hey koszachos!
Please edit your product and go to “Inventory” tab and check “manage stock” and it should look like this – http://i.imgur.com/IAf9ucV.png
Regards,
Yigit
Thanks Yigit, but what I meant is a bit different – between the plus sign and the ‘Add to Cart’ button i need to squeeze in some text such as ‘meter’. Does this make sense?
Hi,
Could you provide us with a link to the site in question so that we can take a closer look please?
Regards,
Rikard
see private message. Thanks
Hi,
Thanks for the login, do you mean that you would like a selector of some kind there? The quantity is already meters though?
Regards,
Rikard
Hi Rikard, the ‘m’ in the quantity text box is currently not functioning properly because when the user deletes the content and enters a number, the ‘m’ disappears. So, I will probably get rid of the ‘m’ and rather have a label called ‘Meter’ in between to simplify matters, similar to how it is shown here https://www.dropbox.com/s/v5lcm5eunglyvrm/Screenshot%202015-11-09%2009.20.23.png?dl=0
Thats what I am trying to figure out
Thanks
Hi!
Please add following code to functions.php file in Appearance > Editor
function add_custom_tooltip(){
?>
<script>
jQuery(window).load(function(){
jQuery('.single .quantity').append('<span class="custom-attr"> Meter</span>');
});
</script>
<?php
}
add_action('wp_footer', 'add_custom_tooltip');
Regards,
Yigit
Thanks Yigit, but the text appears below the quantity area – see here https://www.dropbox.com/s/y2ke0s15acvpnqu/Screenshot%202015-11-09%2016.19.34.png?dl=0
It is possible to have it exactly between the quantity area and the cart button?
Thanks again
Hey!
Please add following code to Quick CSS in Enfold theme options under General Styling tab
.custom-attr {
position: relative;
top: -122px;
left: 140px;
}
.single form.cart .button {
margin-left: 40px;
}
Regards,
Yigit
Perfect! thats works great
Much appreciated!