Jump to content

ISBN in delivery-slip.product-tab.tpl PDF


Recommended Posts

Hi,

I try to explain my needs:

We use the ISBN field in products options for adding packing size information. So far, so good when the order was passed in Prestashop. But when we import orders from Amazon via the module of Common-Services, the value of ISBN in the order-detail table leaves blank, this information is obviously not imported or blocked.

I already made changes to the delivery-slip.product-tap.tpl:

{if empty($order_detail.product_isbn)}
                        ---
                    {else}
                        {$order_detail.product_isbn}
                    {/if}

Like I said, this is perfect for Presatshop orders only.

Right now, I have to acces directly the value of ISBN from the product table instead of the order-detail table but using {$product.isbn} does not work.

Which code do I have to add and where do Ihave to add (I guess in HTMLTemplateDeliverySlip.php)  in order to acces data directly from the products table?

Thank you in advance.

Willi

Edited by WilliT (see edit history)
Link to comment
Share on other sites

  • WilliT changed the title to ISBN in delivery-slip.product-tab.tpl PDF

I confirm you have it in $order_detail.product_isbn (not display on orders slips before enter ISBN in product because info saved in order_detail). If you want to access of original add this in overridden template

		{assign var=pattribute value=Product::getAttributesParams($order_detail.product_id, $order_detail.product_attribute_id)}
		{$pattribute[0].isbn} {*contains actual ISBN*}

 

Link to comment
Share on other sites

Yes, thank you, I know that the ISBN ist stored in order_detail when an order is passed. But in my case ONLY when it it an order directly in Prestashop. But every order imported from Amazon does not have this entry in order_details. That is why I need to access the ISBN stored in the product table.

I already use

{if empty($order_detail.product_isbn)}
                        ---
                    {else}
                        {$order_detail.product_isbn}
                    {/if}

to get the ISBN from the order_detail table. But I have to get the ISBN from products.

Link to comment
Share on other sites

OK. But I don't have any ISBN in the table ps_product_attribute. All ISBN values are in the table ps_products. That is why I need to get the values from there.

Where do you put this part in? Into HTMLTemplateDeliverySlip.php? Which line? :

{assign var=pattribute value=Product::getAttributesParams($order_detail.product_id, $order_detail.product_attribute_id)}

This part goes into delivery-slip.product-tab.tpl?

{$pattribute[0].isbn} {*contains actual ISBN*}

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...