• Resolved milanouser

    (@milanouser)


    Hi Paul,

    first: thanks for this very nice plugin. Saves me a lot of headache learning the Amazon API.

    Just a little question: is it possible to retrieve from Amazon the “list price” (or original price” of items, so that you could show something like:
    Now EUR 10.00 instead of EUR 15.00(or the typical strikeout in red)

    I am pretty sure that Amazon API does provide this original price, but have no idea how to retrieve it. Would be great if that could be included in your plugin, like, say:
    %ORIGINALPRICE% or something alike.

    Thanks

    http://wordpress.org/extend/plugins/amazon-link/

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author paulstuttard

    (@paulstuttard)

    If the API provides the list price then I’m sure I can add it to the plugin. I should be doing an update soon so I’ll make sure that’s one of the changes I put in.

    Cheers,

    Paul

    Thread Starter milanouser

    (@milanouser)

    Paul, thanks a lot. Looking forward to that!

    Having another little hiccup now with the plugin (please forgive me for asking):

    I am trying to wrap the shortcode into a responsive table. Simplified it looks like this:

    <div width="90%"> //table 90% of content width
    <table width="100%">
    [amazon asin=... ]     //item 1
    [amazon asin=... ]     //item 2
    </table></div>

    using a template like:

    <tr>
      <td width="50%">%LINK_OPEN%%TEXT%%LINK_CLOSE%</td>
      <td width="20%">%PRICE%</td>
      <td width="30%">%LINK_OPEN%Buy it%LINK_CLOSE%</td>
    </tr>

    As a result, however, for some reason I have two <br> line breaks inserted in between the <div> and the <table> tags!
    They do not seem to be from WP, as the wpautop functions inserts <br /> tags, not `
    .

    That makes me wonder if it could be your plugin inserting these line breaks, maybe because the template functions “realizes” that the table markup is “incomplete” (as the <table> and </table> tags are outside the template?

    If so, can I somehow, somewhere change that – or even better: override it, so that I do not need to temper with the plugin code directly?

    Thanks a million

    Thread Starter milanouser

    (@milanouser)

    sorry, that messed up sentence was to be:
    They do not seem to be from WP, as the wpautop function inserts <br /> tags, not <br>, i.e. without slash. Here we get the <br>, slash-less!

    Plugin Author paulstuttard

    (@paulstuttard)

    Hi,

    The plugin shouldn’t affect anything in the post other than replacing the [amazon…] content. I had a search through the code just in case and could not find any <br> tags in the code apart from innocuous javascript.

    Similarly the Template parser only changes the %…% items. What you are trying to do should just work, very odd.

    Just tried doing the same on my site and if I ‘inspect’ the page using Chrome, I too see the double <br>. However if I ‘view source’ they are not there, just the html as you put in the post (Also the other ‘br’ tags in the rest of my post are rendered as <br\>when ‘viewing source’ but rendered as <br> when ‘inspecting elements’.

    So the double <br> being inserted might be to do with some other unrelated part of the table? I noticed Chrome has also added ‘tbody’ tags as well.

    Hope this helps…

    Paul

    Thread Starter milanouser

    (@milanouser)

    OK, found the culprit: it’s the usual suspect: wpautop function!

    So WP thinks it should “space things out a little” (wp-includes\formatting.php, line 223), and table is such a “spacable” item.
    Have no how to get WP not to do it, don’t want to mess with WP code directly, and generally disabling the wpautop function is no option either, so all I can do is work with negative margins to “lift” the table up again. What a mess…

    As for the ‘tbody’: have not found out where that comes from, but as long as it does not disturb my layout I can live with it.

    Anyway, thanks again for all your help – and the speed of it! 5 stars from me!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘[Plugin: Amazon Link] Showing list price, not just live price’ is closed to new replies.