X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Dev Questions (https://forum.x-cart.com/forumdisplay.php?f=20)
-   -   Send to Friend on product pages. (https://forum.x-cart.com/showthread.php?t=216)

jacobkball 12-02-2003 01:56 PM

I had tried that, but then kept getting the error "Can't write template cache in the directory: /templates_c. Please check if it exists, and have writable permissions".

You need to remove these lines:

Code:

require $xcart_dir."/smarty.php";
require $xcart_dir."/config.php";
@include "./https.php";


as you'll notice that in the files X-Cart have updated, they have removed these lines also.

various 12-02-2003 11:25 PM

Quote:

Originally Posted by jacobkball
I had tried that, but then kept getting the error "Can't write template cache in the directory: /templates_c. Please check if it exists, and have writable permissions".

You need to remove these lines:

Code:

require $xcart_dir."/smarty.php";
require $xcart_dir."/config.php";
@include "./https.php";


as you'll notice that in the files X-Cart have updated, they have removed these lines also.


This worked for me, thanks for your time jacobkball & BOOMER! :D

leon 12-03-2003 05:27 AM

Wonder if there is any stable and straightforward code for this mod ?

laureon 12-11-2003 08:37 AM

Quote:

Wonder if there is any stable and straightforward code for this mod ?

I am successfully loading the 'sendtofriend.php' after implementing the appropriate fixes, but am receiving the following error when submitting the information on the sendtofriend page:

Warning: Failed to Receive in c:\www\xcart\include\func.php on line 269

Warning: Cannot add header information - headers already sent by (output started at c:\www\xcart\include\func.php:269) in c:\www\xcart\customer\sendtofriend.php on line 39

I am using v3.5.1 as opposed to v3.5.0, perhaps further fixes are required for v3.5.1? or it could be something i'm doing wrong :)

Lines 268-272 of my include/func.php:
Code:

if (preg_match('/([^ @,;<>]+@[^ @,;<>]+)/S', $from, $m))
                        mail($to,$mail_subject,$mail_message,$headers, "-f".$m[1]);
                else
                        mail($to,$mail_subject,$mail_message,$headers);
}


Lines 36-42 of customer\sendtofriend.php:
Code:

func_send_mail($contact["sendtoemail"], "mail/sendtofriend_subj.tpl", "mail/sendtofriend.tpl", $contact["email"], true);

    $productid = $product_info['productid'];
      header("Location: sendtofriend.php?section=sendtofriend&productid=$productid");
      exit;

  } else {


shan 12-11-2003 10:01 AM

make sure you dont have any blank spaces at the end of the .php files

leon 12-11-2003 11:11 AM

That is something I havent been able to explain to myself, why do spaces get involved in this ?

BCSE 12-20-2003 08:06 PM

I got this to work like a charm in 3.3.5. I think I got it working in 30 min or less. I used only what was said in page 1 from Boomer. I also added &partner=sendtofriend onto the URL for tracking purposes (and if Affiliate gets installed at a later date).

Great Mod Boomer! Thanks! I'll be buying something from your store soon for my appreciation! :)

Carrie
BTW: Going to add a nice button for it instead of a text link in a few days. No time now. :)

mustang 12-22-2003 10:47 PM

I'd love to get Boomer's 'Send to Friend' mod working in LiteCommerce. Anyone have any idea how to accomplish this? Please let me know...

B00MER 12-22-2003 10:54 PM

Unfortunatly I'm not too familiar with the template system lite commerce uses, not to mention ive not customized a lite commerce site yet. 8O

PhilJ 01-07-2004 08:31 AM

check boomer's site for this mod in the freebie section


All times are GMT -8. The time now is 06:53 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.