Jump to content

  • You cannot start a new topic
  • You cannot reply to this topic

Creating An If Statement Using The Document Editor. Rate Topic   - - - - -

 

Posted 20 September 2019 - 03:44 PM #1

Hi everyone!!!

 

I am trying to edit our packing slip so that if a customer specifies a different shipping address email to the email they use to place the order, it is displayed instead of the main email address on our packing slips.

 

So effectively I would like a statement to say - IF s_shipping_email field is used during checkout then display that field on the packing slip. If that field is left blank then use email instead.

 

Would someone be able to help with this at all?

 

Thank you ever so much in advance  :grin:

 

 



 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 19794 posts

Posted 23 September 2019 - 05:26 AM #2

Looks like it is required to extend document editor at first to use your custom profile field in the list of available variables


GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration | UniTheme and YOUPI
CS-Cart                USD 345     Multi-Vendor              USD 1250    CS-Cart RU                         24500 руб.
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      CS-Cart RU + UniTheme    36000 руб.


 
  • ikoshkin
  • Tech Writer
  • CS-Cart Architects
  • Join Date: 25-Nov 15
  • 442 posts

Posted 23 September 2019 - 07:09 AM #3

Looks like it is required to extend document editor at first to use your custom profile field in the list of available variables


I don't think it's necessary.

A profile field’s identifier (Field name) will appear among available variables only if the profile field appears on the checkout page. To show a profile field on the checkout page or make it required there, go to Design → Layouts and switch to the Checkout tab. You’ll be able to add them in the settings of blocks, such as Address and Customer information.

 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 19794 posts

Posted 23 September 2019 - 01:46 PM #4

I don't think it's necessary.

A profile field’s identifier (Field name) will appear among available variables only if the profile field appears on the checkout page. To show a profile field on the checkout page or make it required there, go to Design → Layouts and switch to the Checkout tab. You’ll be able to add them in the settings of blocks, such as Address and Customer information.

 

Do you mean that custom fields will be automatically available in the document editor?


GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration | UniTheme and YOUPI
CS-Cart                USD 345     Multi-Vendor              USD 1250    CS-Cart RU                         24500 руб.
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      CS-Cart RU + UniTheme    36000 руб.


 
  • ikoshkin
  • Tech Writer
  • CS-Cart Architects
  • Join Date: 25-Nov 15
  • 442 posts

Posted 24 September 2019 - 05:30 AM #5

Do you mean that custom fields will be automatically available in the document editor?


Yes, as long as you add this field to a block at the checkout page. i've attached a screenshot from http://demo.cs-cart.com.

 

 

Attached Thumbnails

  • demo-fields.png


 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 19794 posts

Posted 24 September 2019 - 02:03 PM #6

Yes, as long as you add this field to a block at the checkout page. i've attached a screenshot from http://demo.cs-cart.com.

 

Thank you. I did not know that


GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration | UniTheme and YOUPI
CS-Cart                USD 345     Multi-Vendor              USD 1250    CS-Cart RU                         24500 руб.
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      CS-Cart RU + UniTheme    36000 руб.