- This topic has 6 replies, 3 voices, and was last updated 9 years, 8 months ago by .
Viewing 7 posts - 1 through 7 (of 7 total)
Viewing 7 posts - 1 through 7 (of 7 total)
- You must be logged in to reply to this topic.
Support site for Tips and Tricks HQ premium products
by
Tips and Tricks HQ Support Portal › Forums › WP eStore Forum › WP eStore Tweaks › How can I remove line_break between the Quantity and Add To Cart button
Hello I was wondering if you could help me by directing me to the correct PHP file where I could remove line_break between the quantity and the add to cart button.
I am using [wp_eStore_add_to_cart id=1] to place the add to cart with the ability to dd a quantity on a product page that I’ve created.
<–> HTML
<span class=”eStore_item_default_qty_data”>
<span class=”eStore_item_default_qty_data_label”>Quantity: </span>
<span class=”eStore_item_default_qty_data_input”>
<input name=”add_qty” size=”2″ value=”1″ type=”text”>
</span>
</span>
(line_break)<—-I would like to remove
<input value=”Add to Cart” class=”eStore_button eStore_add_to_cart_button” type=”submit”>
I searched some of the PHP files and found this
($line_break = true,
and
if ($line_break)
$var_output .= ”;
But I am not sure which php file needs to be changed Thanks for your help
Please provide a link to a test page.
[http://threevintage.com/1950s-girl-card-retro-card-card-for-her-gift-for-her/]
@lgsito, Thanks. Which shortcode are you using?
[wp_eStore_add_to_cart id=1]
1) Open eStore_misc_functions.php
2) Look for the function (Around line 230)
function get_button_code_for_element($ret_product, $line_break = true, $nggImage = '', $buttonImage = '') {
3) Inside the function look for this piece of code:
if ($ret_product->show_qty == '1') {
$replacement .= eStore_get_default_purchase_qty_input_data();
if ($line_break)
$replacement .= '<br />';
}
else {
$replacement .= '<input type="hidden" name="add_qty" value="1" />';
}
4) Once you have found it replace with the following:
if ($ret_product->show_qty == '1') {
$replacement .= eStore_get_default_purchase_qty_input_data();
}
else {
$replacement .= '<input type="hidden" name="add_qty" value="1" />';
}
Please make sure to keep a backup of the original file before you edit it.
Thank you so much it worked great. You guys or girls are the best. I really appreciate quick response.