Jump to content


Corporate Sponsors


Latest News: (loading..)

- - - - -

please help me with a simple PHP problem:


3 replies to this topic

#1 AndreD

  • Community Member
  • 149 posts
  • Real Name:AndrĂ© Kjellstrup

Posted 25 August 2011, 12:59

I attached a part of checkout_process.php below. (where the email confirmation is sent)
I'd like to add a simple HTTP link to a static .pdf file on my site (In Norway we are required to mention that customer have 14days refund/return right, or else he got 6 months.)

so - in the line *** I'd like to publish a php line like :
your rights<a href="http://server.no/rights.php"> Download here</a><br>
how to do it right ?



 $email_order = STORE_NAME . "\n" . 
                 EMAIL_SEPARATOR . "\n" . 
                 EMAIL_TEXT_ORDER_NUMBER . ' ' . $insert_id . "\n" .
                 EMAIL_TEXT_INVOICE_URL . ' ' . tep_href_link(FILENAME_ACCOUNT_HISTORY_INFO, 'order_id=' . $insert_id, 'SSL', false) . "\n" .
                 *** link to PDF goes here***
                 EMAIL_TEXT_DATE_ORDERED . ' ' . strftime(DATE_FORMAT_LONG) . "\n\n";


#2 Mort-lemur

  • Community Member
  • 1,045 posts
  • Real Name:Heather
  • Gender:Female
  • Location:UK

Posted 25 August 2011, 20:22

Hello,

Have a look at the MATC (Must accept terms and comnditions) contribution - I think it will do just what you need
Now my store is the way I want it - Secure, working well, and good Google Ranks - Thanks to all for the help given.

If you want to see the mods I have installed, then see my profile.

#3 satish

  • Community Member
  • 5,325 posts
  • Real Name:Satish Mantri
  • Gender:Male
  • Location:Nagpur(India)

Posted 26 August 2011, 03:40

$email_order = STORE_NAME . "\n" .
EMAIL_SEPARATOR . "\n" .
EMAIL_TEXT_ORDER_NUMBER . ' ' . $insert_id . "\n" .
EMAIL_TEXT_INVOICE_URL . ' ' . tep_href_link(FILENAME_ACCOUNT_HISTORY_INFO, 'order_id=' . $insert_id, 'SSL', false) . "\n" .
EMAIL_TEXT_PDF . ' ' . tep_href_link(FILENAME_REFUND_RETURN, '', '') . "\n" .


*** link to PDF goes here***
EMAIL_TEXT_DATE_ORDERED . ' ' . strftime(DATE_FORMAT_LONG) . "\n\n";


Also you need to define :
FILENAME_REFUND_RETURN in filename
and
EMAIL_TEXT_PDF


Satish


Ask for osCommerce value addon suggestion tips for your site.
Check My About US For who am I and what My company does.


#4 AndreD

  • Community Member
  • 149 posts
  • Real Name:AndrĂ© Kjellstrup

Posted 26 August 2011, 06:41

Thank you both, - I needed ti add "NONSSL" in:

Quote

EMAIL_TEXT_PDF . ' ' . tep_href_link(FILENAME_REFUND_RETURN, '', 'NONSSL') . "\n" .

Nice solution.