What is the use of item meta on cart_details?

This topic contains 6 replies, has 3 voices, and was last updated by  Patrik 4 years, 9 months ago.

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
  • Author
    Posts
  • #4081

    Arshad Ali
    Full Member
    Post count: 27

    Please enlighten me on “meta” field on cart items. Can I use it to provide some additional information regarding cart invoice item here? For example I want to add some dynamic description for the item while adding it to the invoice. Can I use it in some way?

    
    
    'cart_details'      => array(
            array(
                'id'            => 2118,
                'quantity'      => 1,
                'custom_price'  => '100.00',
                'meta'          => array(
                    'post_id'   => 1239
                )
            )
    #4082

    Alex Rollin
    Moderator
    Post count: 27815

    I will ask the developers to take a look at your question

    #4083

    Patrik
    Moderator
    Post count: 1971

    Hi,

    This array contains all items and invoice details in the cart. You can add a description to the item but it will be saved in the item and so when you will add the same item to another invoice you have to modify the description at the time of adding an item into invoice otherwise it will take the previous description.

    Regards,
    Patrik

    #4084

    Arshad Ali
    Full Member
    Post count: 27

    Hey Patrik,

    Good to know that the item description can be added/updated while adding the item to the invoice. However, what is that description field name? I don’t see any such field.

    Besides, will this description be visible on an invoice?

    I am also looking forward to buying the pdf invoice extention, However, I want to be sure that it can be styled according to my requirements. Also, where can I see the detailed documentation for styling it?

    Thank you.
    Arhsad

    #4085

    Patrik
    Moderator
    Post count: 1971

    Hi,

    The description is an excerpt ‘post_excerpt’ from the item post.

    You can style the invoice as per your requirements by overriding the templates in your theme.

    Regards,
    Patrik

    #4086

    Arshad Ali
    Full Member
    Post count: 27

    Hello Patrik,

    I tried ‘post_excerpt’, but this is not visible on the invoice. It just shows the title of the item.Is there anything I am missing?

    Warm regards,
    Arshad.

    #4087

    Patrik
    Moderator
    Post count: 1971

    Hi,

    You can manually add item description in the item from admin side and add the item in the invoice and then check on the view invoice page which will show the item description below item name. I am not sure what you are doing with the run time but we don’t provide support for the customization here.

    Regards,
    Patrik

Viewing 7 posts - 1 through 7 (of 7 total)

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket