• Resolved soitis524

    (@soitis524)


    I have seen similar posts discussing the narrowness of a given row, but nothing that discusses how to get rid of empty space between rows. I have setup a Paypal-based merch store for my band, and have a ton of space between each row, item, that makes the store look awkward and unnecessarily spaced out. Something is happening between the Paypal code and the table code. I list the Paypal button code below for the first row, where the space if particularly egregious. Please help! I’d like to send this out to our fanbase asap. Thank you for an excellent plugin, by the way. Very useful.

    <form target="paypal" action="https://www.paypal.com/cgi-bin/webscr" method="post" >
    <input type="hidden" name="cmd" value="_cart">
    <input type="hidden" name="business" value="7Q5SWNH3MJHF6">
    <input type="hidden" name="lc" value="US">
    <input type="hidden" name="item_name" value="T-Shirts">
    <input type="hidden" name="button_subtype" value="products">
    <input type="hidden" name="tax_rate" value="9.400">
    <input type="hidden" name="shipping" value="1.99">
    <input type="hidden" name="add" value="1">
    <input type="hidden" name="bn" value="PP-ShopCartBF:btn_cart_LG.gif:NonHosted">
    <table>
    <tr><td><input type="hidden" name="on0" value="Colors">Colors</td></tr><tr><td><select name="os0">
    	<option value="Option 1">Option 1 $12.99 USD</option>
    	<option value="Ash-Gray">Ash-Gray $15.99 USD</option>
    	<option value="Black">Black $17.99 USD</option>
    </select> </td></tr>
    <tr><td><input type="hidden" name="on1" value="Sizes">Sizes</td></tr><tr><td><select name="os1">
    	<option value="Men's Small">Men's Small </option>
    	<option value="Men's Medium">Men's Medium </option>
    	<option value="Men's Large">Men's Large </option>
    	<option value="Men's X-Large">Men's X-Large </option>
    	<option value="Men's XX-Large">Men's XX-Large </option>
    	<option value="Women's Small">Women's Small </option>
    	<option value="Women's Medium">Women's Medium </option>
    	<option value="Women's Large">Women's Large </option>
    	<option value="Women's X-Large">Women's X-Large </option>
    	<option value="Women's XX-Large">Women's XX-Large </option>
    </select> </td></tr>
    </table>
    <input type="hidden" name="currency_code" value="USD">
    <input type="hidden" name="option_select0" value="Option 1">
    <input type="hidden" name="option_amount0" value="12.99">
    <input type="hidden" name="option_select1" value="Ash-Gray">
    <input type="hidden" name="option_amount1" value="15.99">
    <input type="hidden" name="option_select2" value="Black">
    <input type="hidden" name="option_amount2" value="17.99">
    <input type="hidden" name="option_index" value="0">
    <input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_cart_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
    <img alt="" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1">
    </form>

    [Moderator Note: Please post code & markup between backticks or use the code button. Your posted code may now have been permanently damaged by the forum’s parser.]

    http://wordpress.org/plugins/tablepress/

Viewing 15 replies - 1 through 15 (of 16 total)
  • Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    thanks for your question, and sorry for the trouble.

    The problem here are the line breaks in your code. Those get transformed to HTML <br /> tags automatically, and that creates the empty space.
    You could either remove all of them (which would be tedious and kind of ugly here, as your code is pretty long), or add a parameter to the table Shortcode:

    [table id=123 convert_line_breaks=false /]

    Regards,
    Tobias

    Thread Starter soitis524

    (@soitis524)

    Forgive my ignorance, but when you say add that shortcut to my table shortcode, am I just pasting it under <table> or changing the table id= to the name of my table, or both?

    Thanks, Tobias. You’re a superstar.

    Thread Starter soitis524

    (@soitis524)

    I just pasted that code above <table> with the table ID and got this error:

    Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 40031 bytes) in /home/content/25/5353825/html/whiskeynrye/wp-content/plugins/tablepress/models/model-table.php on line 161

    Thread Starter soitis524

    (@soitis524)

    By the way, the table I’m working with can be found at

    http://whiskeynrye.com/store/

    Thread Starter soitis524

    (@soitis524)

    I downloaded the memory bump plugin, but am still having the problem.

    Remove that plugin. It was integrated into WordPress many versions ago. Please see the post at the link I gave above.

    Thread Starter soitis524

    (@soitis524)

    I have added the line your link suggests in the wpconfig file and am trying to upload it now. Hope that works.

    Thread Starter soitis524

    (@soitis524)

    Still getting the same error after updating the wpconfig file.

    What code do I need to delete to get rid of the page breaks? At this point, that sounds easier.

    Thank you for your help!

    Hi,

    If you want to do it manually, you could do it this way. Like the code you posted ( just a part of it),

    <input type="hidden" name="cmd" value="_cart">
    <input type="hidden" name="business" value="7Q5SWNH3MJHF6">

    should be changed to,

    <input type="hidden" name="cmd" value="_cart"><input type="hidden" name="business" value="7Q5SWNH3MJHF6">

    As you can see from this, there is no line break between the two <input …> statements. Do the same to all the cell content may solve your problem.

    Ragards,
    Haoxian

    @soitis524

    P.S. But I think you should figure out the memory problem and apply the solution provided by Tobias, or you would run into this eventually.

    Thread Starter soitis524

    (@soitis524)

    Thank you! Getting rid of the line breaks worked. I’ve tried both plugins and altering the wpconfig file to increase the PHP memory. Neither worked, but I’d love to do it if there was an easier way.

    Thank you all for your help!

    @soitis524,

    No problem. Wish you make the other way works sooner!

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    you should actually not need to increase the PHP Memory limit, if you remove that Shortcode again from the table. By adding it to the table, you basically created an infinite loop, as you embedded table 1 into table 1.

    So, please remove that Shortcode from the table. Instead, modify the Shortcode that you used to actually put the TablePress table into the page. That’s what I meant above.
    You should have a post or page with this Shortcode, and that needs to be extended with that new Shortcode parameter. With that, you will then not have to remove all line breaks from the PayPal HTML code.

    Regards,
    Tobias

    Thread Starter soitis524

    (@soitis524)

    Thank you, Tobias! Makes perfect sense now.

Viewing 15 replies - 1 through 15 (of 16 total)
  • The topic ‘Empty Space from one row to the next’ is closed to new replies.