WordPress.org

Ready to get started?Download WordPress

Forums

TablePress
[resolved] Empty Space from one row to the next (17 posts)

  1. soitis524
    Member
    Posted 9 months ago #

    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/

  2. TobiasBg
    Member
    Plugin Author

    Posted 9 months ago #

    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

  3. soitis524
    Member
    Posted 9 months ago #

    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.

  4. soitis524
    Member
    Posted 9 months ago #

    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

  5. soitis524
    Member
    Posted 9 months ago #

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

    http://whiskeynrye.com/store/

  6. esmi
    Forum Moderator
    Posted 9 months ago #

  7. soitis524
    Member
    Posted 9 months ago #

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

  8. esmi
    Forum Moderator
    Posted 9 months ago #

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

  9. soitis524
    Member
    Posted 9 months ago #

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

  10. soitis524
    Member
    Posted 9 months ago #

    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!

  11. Haoxian
    Member
    Posted 9 months ago #

    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

  12. Haoxian
    Member
    Posted 9 months ago #

    @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.

  13. soitis524
    Member
    Posted 9 months ago #

    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!

  14. Haoxian
    Member
    Posted 9 months ago #

    @soitis524,

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

  15. TobiasBg
    Member
    Plugin Author

    Posted 9 months ago #

    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

  16. soitis524
    Member
    Posted 9 months ago #

    Thank you, Tobias! Makes perfect sense now.

  17. TobiasBg
    Member
    Plugin Author

    Posted 9 months ago #

    Hi,

    no problem, you are very welcome! :-) Good to hear that this helped!

    Best wishes,
    Tobias

    P.S.: In case you haven't, please rate TablePress here in the plugin directory. Thanks!

Reply

You must log in to post.

About this Plugin

About this Topic