Chat with us, powered by LiveChat

WCMp bundle is available at a slashed price

Grab It Now

Invoice requires vendor name (part 2)

Invoice requires vendor name (part 2)2019-03-18T07:44:52-05:00

Home Support Forum WCMp PDF Invoice Invoice requires vendor name (part 2)

WCMp PDF Invoice

Invoice requires vendor name (part 2) Open

  • Author
    Posts
  • Matt
    Participant
    Post count: 12

    Hi there,
    I’m following up on the previous submitted ticket (https://wc-marketplace.com/support-forum/topic/invoice-requires-vendor-name-display-issues/) as I’m still having issues with this. The “Vendor” name is not displaying, and in its place is the website companies name (Riviera Cbay). Can you please tell me how I can display the vendors name (person selling/attached to product) and address in the invoice.

    I have the following in my child theme:
    /wcmp-pdf-invoices/wcmp_pdf_invoice_second_template.php

    The above file shows:

    <p class="invoice-text"><strong><?php _e('Sold By:', 'wcmp-pdf_invoices'); ?> <?php echo $WCMp_PDF_Invoices->utils->company_name($user_id, 'vendor', $order) ?></strong></p>

    Attachments:
  • NerdySupportExpert Moumita
    Keymaster
    Post count: 3848

    Hello,

    Thanks for your query. Kindly use the code below to display vendor name instead of company name

    
    if($user_type == 'customer'){
                       $vendor_info = get_user_by("ID", $user_id);
                       ?>
                       <p class="invoice-text"><strong><?php _e('Sold By:', 'wcmp-pdf_invoices'); ?> <?php echo $vendor_info->data->display_name; ?></strong></p>
    
  • Matt
    Participant
    Post count: 12

    Hi there,
    I’ve tried the code however this only gives me the buyers details, when I need to add the vendors details.

    So in essence the invoice will show the following details.

    Seller: Vendor display name
    Seller address: Vendor address
    Receipt to: Buyer name (this part works fine)
    Buyer address (this part works fine)

    How do I insert the vendors information like this? Thanks in advance.

  • NerdySupportExpert Moumita
    Keymaster
    Post count: 3848

    @mattbingham, can you please explain which invoice are you referring to i.e. vendor invoice/ customer invoice/admin invoice?

    Also, please do share a temporary admin, vendor and ftp access so we can check.

    While sharing the access, don’t forget to mark the response as private.

  • Matt
    Participant
    Post count: 12

    Hi,
    This is for the customer/buyer. We need the seller/vendor name on the invoice.

  • NerdySupportExpert Moumita
    Keymaster
    Post count: 3848

    The code we have given is working in our end, as you can see here – https://prnt.sc/n5pmno.

    So, in order to check why this code is not working, please do share a temporary admin, vendor and ftp access so we can check.

    While sharing the access, don’t forget to mark the response as private.

  • Matt
    Participant
    Post count: 12
    This reply has been marked as private.
  • Aditya Hazra
    Moderator
    Post count: 29
    This reply has been marked as private.
    • Matt
      Participant
      Post count: 12
      This reply has been marked as private.
    • Matt
      Participant
      Post count: 12
      This reply has been marked as private.
  • Aditya Hazra
    Moderator
    Post count: 29
    This reply has been marked as private.
    • Matt
      Participant
      Post count: 12

      Okay thanks for taking a look at that. I’ll check this out and see whether the issue is now resolved.

  • NerdySupportExpert Moumita
    Keymaster
    Post count: 3848

    Sure, Keep us posted.

Please LOGIN to reply to this topic