v2.2.3: fix error showing Gift Wrap on the pdf invoice when the Gift Wrap disabled in the backend

Created by Support Agent, Modified on Sun, 19 Apr at 1:14 AM by Support Agent

QUESTION: 


I go to the backend Configurable > Bss_OneStepCheckout > disable the Giff Wrap:

 

Then, go to frontend to place an order.


However, when I print the invoice, it still shows the Gift Wrap = 0 on the PDF invoice.

I would like not to show this information on the pdf invoice when this feature disabled.


Please tell me how to achieve it?


ANSWER:


To achieve the requirement, please edit files as below:  


+ app/code/Bss/OneStepCheckout/Plugin/Model/Order/Pdf/Total/DefaultTotal.php

+ app/code/Bss/OneStepCheckout/etc/di.xml





Or download the attached files below and overwrite the current file on your site.


If you need further assistance, please don't hesitate to contact us. Don't forget that BSS Commerce is a full-service ecommerce agency with 14+ years of experience, supporting 75,000+ customers worldwide. As an Adobe Commerce Solution Bronze Partner and Select Magento Extensions Builder, we deliver trusted end-to-end solutions.


Our core strength is Magento, with 150+ extensions designed to enhance store performance and drive growth. With deep expertise from years of working on Magento websites, we deliver scalable, high-impact solutions backed by strong client trust.


Our most powerful extensions are BSS Commerce’s Magento 2 B2B Extension & BSS Commerce’s Magento 2 SEO Extension


Please visit our site for more useful Magento 2 Extensions: https://bsscommerce.com/magento-2-extensions.html

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article