• Resolved feedmeastraycat

    (@feedmeastraycat)


    This is somewhat related to this topic. But our friendly neighbourhood moderator closed it and removed some info so I’m starting this new topic to see if we can get a fix.

    This is not really a bug but maybe a improvement request. 🙂

    So there was a bug, which you guys fixed, that removed some variation attributes. The issue now is purely with formatting.

    I have not fully investigated myself but some extras are printed in the HTML like this:

    <dl class="extras">
    <dt>Name:</dt>
    <dd>Value</dd>
    </dl>

    But some attributes are printed with just <br> and no space between the name + “:” and the value. The full “<td class=”product-name”>” looks like this:

    <td class="product-name">
    <div class="name">Oxford - Täckplugg med M8 &amp; M10 Gänga För Backspegel</div>.
    <br>
    Name1:Value1
    <dl class="extras">
    <dt>Name2:</dt>
    <dd>Value2</dd>
    </dl> </td>

    You can see it in this screenshot from a removed replied @priyankajagtap wrote:
    https://prnt.sc/YBx8nQtU5p5L
    https://prnt.sc/qU0FVPBcvghH

    You can see that it outputs “Extra Accessories:Extra RAM”

    Here is a screenshot from an actual PDF from an actual order:
    https://prnt.sc/I4wr4FACpb_y

    You can see that “Artikelnr” (article number) has a nice format but “Gängstorlek” does not.

    So basically it would be nice if the extra attributes also was formatted with a <dl> tag or similar.

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

    (@priyankajagtap)

    Hi @feedmeastraycat,

    I have replied to you with the patch for this styling issue in that original forum thread. But since the moderator has closed the forum, you are not able to see the patch we have provided there.

    However, below I am sharing the updated file of our plugin containing the necessary patch below:
    https://www.dropbox.com/scl/fi/knix52ebjmevhinyp71y1/print-content.php?rlkey=crza10xv61o07z36of7tdbk9s&st=mgrxwumz&dl=0

    Please download the file and replace the existing one in your site’s directory at the following path:
    / wp-content / plugins / woocommerce-delivery-notes / templates / print-order / <HERE>

    After replacing the file, kindly verify if the variation details are correctly displayed on the invoice.

    Please check and let us know the results.

    Thread Starter feedmeastraycat

    (@feedmeastraycat)

    @priyankajagtap Excellent! I will test it out and get back to you!

    Thread Starter feedmeastraycat

    (@feedmeastraycat)

    @priyankajagtap I did a test now. It’s an improvement but its not fully what I hoped for.

    The HTML now looks like this:

    <td class="product-name">
    <span class="name">
    Oxford - Täckplugg med M8 &amp; M10 Gänga För Backspegel
    </span>
    <br>
    <strong>Gängstorlek : </strong>M10
    <dl class="extras">
    <dt>Artikelnr:</dt>
    <dd>OX756</dd>
    </dl> </td>

    Or here is an example with two extra attributes:

    <td class="product-name">
    <span class="name">
    Puig - Touring Vindruta till Triumph Tiger 1200
    </span>
    <br>
    <strong>Färg : </strong>Tonad
    <br>
    <strong>Leveranstid 3-8 arbetsdagar : </strong>1
    <dl class="extras">
    <dt>Artikelnr:</dt>
    <dd>21336H</dd>
    </dl> </td>

    So its still much harder to format the “Gängstorlek” part then the “<dl class=extras>”-part. And there is still an extra space between the name and “:”.

    Would be super if these variant names and what not could be printed in a <dl> type element as well?! 🙂

    Plugin Author priyankajagtap

    (@priyankajagtap)

    Hi @feedmeastraycat,

    Thank you for your detailed feedback. We appreciate your insights on the formatting and understand the importance of achieving a cleaner and more consistent appearance.

    I have forwarded your response to our development team, and they will take the necessary action on this. I will get back to you with an update on the same.

    Please let us know if you have any further queries.

    Thread Starter feedmeastraycat

    (@feedmeastraycat)

    @priyankajagtap I understand that its summer and people might be away. So no rush. Just wanted to check in to see if there might be an ETA on if you will be able to fix/improve this or if I should try to go another route. 🙂

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Attribute formatting issue’ is closed to new replies.