Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Trouble making link SSL


Guest

Recommended Posts

I am trying to add the SSL or NONSSL function to the following link, and cannot get it to work. Any ideas are appreciated. - Hal

 

<?php echo '<a href="' . tep_href_link(DIR_WS_IMAGES . $product_info['products_image']) . '" target="_blank" rel="lytebox" title="'.$product_info['products_name'].'" >' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], $product_info['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '<\/a>'; ?>

Link to comment
Share on other sites

you need to edit the configure.php to enable the SSL

Please read this line: Do you want to find all the answers to your questions? click here. As for contribution database it's located here!

8 people out of 10 don't bother to read installation manuals. I can recommend: if you can't read the installation manual, don't bother to install any contribution yourself.

Before installing contribution or editing/updating/deleting any files, do the full backup, it will save to you & everyone here on the forum time to fix your issues.

Any issues with oscommerce, I am here to help you.

Link to comment
Share on other sites

<?php echo '<a href="' . tep_href_link(DIR_WS_IMAGES . $product_info['products_image'],'','SSL') . '" target="_blank" '.$product_info['products_name'].'" >' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], $product_info['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?> 

That works.

 

osC uses 'NONSSL' by default so I used 'SSL' in the code.

 

Although why you'd want an image link to be SSL escapes me...

:blush:

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Link to comment
Share on other sites

Jim,

 

Thank you, of course it worked perfectly... I thought that I had tried that earlier and it wouldn't work, but I must of had something wrong when I attempted it, but it does work and I appreciate your help. To let you know why I needed it... I have the log in page SSL, and I noticed that if a customer comes along and is not logged in, and clicks to write a review, they are taken to the log in page which is SSL, oscommerce logs them in and delivers them to the product_reviews_write.php as an SSL page, why, I don't know. Then, the link to enlarge the image is by default a non ssl link, which brings up an IE warning about secure and non-secure content. No biggy, but it bugs me. My thinking is that I can use an IF / ELSE statement to bring up either a non-ssl or ssl link for the pop up image dependng on if the user is on the ssl page or not. I would prefer to simply make it so that after they get logged in, they would be redirected automatically to product_reviews_write.php as a non-ssl page, but I haven't figured out how to do that either.

 

Tell me I'm nuts, or anal, I won't mind at all.

 

Regards, Hal

Link to comment
Share on other sites

<?php echo '<a href="' . tep_href_link(DIR_WS_IMAGES . $product_info['products_image'],'','SSL') . '" target="_blank" rel="lytebox" title="'.$product_info['products_name'].'" >' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], $product_info['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?>

My bad!!

 

Use that instead.

 

I modified it slightly and forgot to change it back.

 

Stupid should hurt...

>_<

 

About the secure and non-secure content warning, try replacing this code:

 

'SSL'

 

With:

 

$request_type

Then if the page is visited in SSL mode, the popup is as well.

:thumbsup:

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...