Tips and Tricks HQ Support

Support site for Tips and Tricks HQ premium products

  • Home
  • Contact Us
  • Documentation
  • Forum Home
    • Forum
    • Forum Search
    • Forum Login
    • Forum Registration

How can I remove line_break between the Quantity and Add To Cart button

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

  • This topic has 6 replies, 3 voices, and was last updated 10 years, 3 months ago by lgsito.
Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • April 8, 2015 at 11:05 am #12467
    lgsito
    Member

    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

    April 8, 2015 at 1:50 pm #69496
    wzp
    Moderator

    Please provide a link to a test page.

    April 8, 2015 at 4:22 pm #69497
    lgsito
    Member

    [http://threevintage.com/1950s-girl-card-retro-card-card-for-her-gift-for-her/]

    April 9, 2015 at 12:24 am #69498
    wpCommerce
    Moderator

    @lgsito, Thanks. Which shortcode are you using?

    April 9, 2015 at 1:23 am #69499
    lgsito
    Member

    [wp_eStore_add_to_cart id=1]

    April 9, 2015 at 1:34 am #69500
    wpCommerce
    Moderator

    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.

    April 9, 2015 at 9:37 am #69501
    lgsito
    Member

    Thank you so much it worked great. You guys or girls are the best. I really appreciate quick response.

  • Author
    Posts
Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.
Log In

Forum Related

  • Forum Home
  • Forum Search
  • Forum Registration
  • Forum Login

Support Related Forms

  • Contact Us
  • Customer Support
  • Request a Plugin Update
  • Request Fresh Download Links

Useful Links

  • Plugin Upgrade Instructions
  • WP eStore Documentation
  • WP eMember Documentation
  • WP Affiliate Platform Documentation
  • Tips and Tricks HQ Home Page
  • Our Projects

Quick Setup Video Tutorials

  • WP eStore Video Tutorial
  • WP eMember Video Tutorial
  • WP Affiliate Platform Video Tutorial
  • Lightbox Ultimate Video Tutorial

Our Other Plugins

  • WP Express Checkout
  • Stripe Payments Plugin
  • Simple Shopping Cart Plugin
  • Simple Download Monitor

Copyright © 2025 | Tips and Tricks HQ