Jump to content

Getting "no" choices in tick-box option to appear on invoice


rodolphe

Recommended Posts

Hi all,

 

I have a product which includes free options - in the Custom Fields tab - in tick-box format, so "on" or "off" answers.

 

When selected, it appears correctly on the recap/invoice. It displays "option name: on". When not selected, however, it doesn't show at all.

 

I would like to display "option name: off", so that clients are reminded that they can avail themselves of more services.

 

So far I haven't found a way to do this, it doesn't appear to be in the invoicepdf.tpl file...

 

Any help appreciated!

 

Regards,

Rodolphe

Link to comment
Share on other sites

Hi Rodolphe,

 

if unticked, then the tickbox customfield answer is not added to the appropriate database table - only positive answers (e.g if ticked) are added... there is no option to allow negative (unticked) answers to be added.

 

therefore, I can think of two ways to get around this - one simple, and another more complex.

 

the simple way would be to change the custom field from using a tickbox to a dropdown with two options: on,off (or off,on - whichever you feel if more appropriate for your site) - if you do this, then it will show either "option name: on" or "option name: off" on the invoice without the need for any template modifications.

 

the other way would involve template modification and/or action hook to determine if the product is using this custom field and if the invoice description already contains "option name:on" - if it does, it does nothing - otherwise it adds "option name: off" to the description.

 

of the two suggestions, changing to a dropdown would be the simpler solution! :)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated