Forums / General Questions / SSL link WITHIN a product description or EZ Page

SSL link WITHIN a product description or EZ Page

Locked

Views: 952

Results 1 to 5 of 5
This thread is locked. New replies are disabled.
15 Aug 2007, 12:50 AM
#1
mygreygoose avatar

mygreygoose

New Zenner

Join Date:
Jun 2007
Posts:
91
Plugin Contributions:
0

SSL link WITHIN a product description or EZ Page

I normally know how to create links to ssl pages (https://...). But how do I create a link to a secure page within a product description or EZ Page? AFAICT, since the html/code is stored in the database, the php code doesn't work when the page is displayed. For example,

<php echo zen_ez_pages_link(21, 0, true, false, false); ?> or

<a href="<?php echo zen_href_link(FILENAME_CONTACT_US, '','SSL'); ?>">Contact Us </a>

They don't work b/c the php isn't allowed to work. So, how do I create a link to a secure page without hardcoding it to the https:// URL ?

15 Aug 2007, 12:52 AM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,515
Plugin Contributions:
176

Re: SSL link WITHIN a product description or EZ Page

If that page is supposed to be accessed via SSL, why don't you want to hard-code it to be an SSL link ?
What's it linking to ?

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

15 Aug 2007, 2:22 AM
#3
mygreygoose avatar

mygreygoose

New Zenner

Join Date:
Jun 2007
Posts:
91
Plugin Contributions:
0

Re: SSL link WITHIN a product description or EZ Page

for when I switch domains and servers. For example, right now I'm using shop.mydomain.com. But I may want to switch to www.mydomain.com or someotherdomain.com. Plus, I test on my local machine and then ftp everything up to the live site... so hard coding would not work when it's on my test machine.

And just to make sure I'm stating it correctly, I don't mind hard coding it to something like https:// . some_variables . or_some_functions or something like that. But I don't want to hard code it to https://shop.mydomain.com/index.php?main_main=contact_us

15 Aug 2007, 2:53 AM
#4
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,515
Plugin Contributions:
176

Re: SSL link WITHIN a product description or EZ Page

You'll likely need to follow something like what swguy has mentioned here:
http://www.zen-cart.com/forum/showthread.php?p=337619#post337619

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

15 Aug 2007, 4:00 PM
#5
mygreygoose avatar

mygreygoose

New Zenner

Join Date:
Jun 2007
Posts:
91
Plugin Contributions:
0

Re: SSL link WITHIN a product description or EZ Page

Thanks, that worked perfectly! And it's much easier to set up then the daunting long page of instructions that may scare one off.

For others' benefits, the way I created the define to get a secure SSL link from within a product description (after adding the prescribed, little bit of custom code to tpl_product_info_display.php):

 define('SSL_LINK_CONTACT_US', '<a href="' . HTTPS_SERVER . DIR_WS_HTTPS_CATALOG . 'index.php?main_page=contact_us">' . 'email us' . '</a>');