![]() |
Just wanted to say, rrf, I would be all for a "Send to Friend" module appearing in future versions of X-Cart. :wink:
|
well this is a great mod.
would be nice to have {$product.product|escape} {$product.descr|truncate:255:"...":true} Included in the email. I tried this but couldnt wrap my head around it... |
Boomer, I did what you suggested but then I have this error.
Can't write template cache in the directory: /templates_c. Please check if it exists, and have writable permissions. I check my /templates_c folder rights and it has 777. Do you have any hints? Tks, Ming |
Updated sendtofriend.php file for 3.5.0 (this should do the trick 8-[ ):
Code:
<?php |
Hi Boomer,
Thank for you such speedy respone. After trying out the new sendtofriend.php, I was able to send out an email but the email subject line & message body look like below. It doesn't populate the data. Any solution to that. Thanks in advance! -Ming {$contact.firstname} {$contact.lastname} has recommended a product to you. {if $contact.body ne ""} {$contact.body} {/if} Checkout the product link below for more details: http://www.EntrustResources.com/store/customer/product.php?productid={$contact.productid} {include file="mail/signature.tpl"} |
Updated in the post above previous.
|
Thanks for a great mod, just got a "little" error over here:
Warning: main(/smarty.php) [function.main]: failed to create stream: No such file or directory in /web/sites/mydir/mysite.com/shop/customer/sendtofriend.php on line 6 Fatal error: main() [function.main]: Failed opening required '/smarty.php' (include_path='.:/usr/local/lib/php') in /web/sites/mydir/mysite.com/shop/customer/sendtofriend.php on line 6 Anyone that got any ideas what could have caused this...?? |
Various,
To get around it, I had to put require $xcart_dir."../smarty.php"; instead of require $xcart_dir."/smarty.php"; Having said that, I am now stuck on "Can't write template cache in the directory: /templates_c. Please check if it exists, and have writable permissions" error message, which I can't for the life of me get rid of. I don't know if you'll have the same problem..... Regards Jacob |
Ok, I've GOT IT SORTED.
To get around it, you need to remove/comment out the lines require $xcart_dir."/smarty.php"; and require $xcart_dir."/config.php"; This has fixed the "Can't write template cache in the directory: /templates_c. Please check if it exists, and have writable permissions" error messages that I was getting. Regards Jacob |
To update for 3.5.0 if your getting a funny error of:
"Can't to find template engine!" Edit the sendtofriend.php file and adjust the includes: Code:
require "../smarty.php"; replace with: Code:
require $xcart_dir."/smarty.php"; |
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"; as you'll notice that in the files X-Cart have updated, they have removed these lines also. |
Quote:
This worked for me, thanks for your time jacobkball & BOOMER! :D |
Wonder if there is any stable and straightforward code for this mod ?
|
Quote:
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)) Lines 36-42 of customer\sendtofriend.php: Code:
func_send_mail($contact["sendtoemail"], "mail/sendtofriend_subj.tpl", "mail/sendtofriend.tpl", $contact["email"], true); |
make sure you dont have any blank spaces at the end of the .php files
|
That is something I havent been able to explain to myself, why do spaces get involved in this ?
|
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. :) |
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...
|
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
|
check boomer's site for this mod in the freebie section
|
nice one phil 8)
|
Quote:
Hey, thanx alot, Im going to take a look and try it myself. Im on 3.5.2 myself. :wink: And about the second option, what do you mean about that being a basic enquiry form to send email to support, in what circumstances ? Or is it something like "Send to Support" instead of "Send to Friend" ? |
Leon, I've added some screenshots, see thread before
|
Wow, very nice. Now I get it, the enquiry thing is like sending a message from a certain product that a prospect is interested in, something like using the contact form, but giving the prospect a helping hand.
So I assume that it also integrates into the existing style ? |
Cool to see someone has updated this mod for 3.5.x, kudos! By any chance could I put this up as a freebie on x-cart?
Let me know, thanks. ;) |
That's fine Boomer :lol: Thanks for the code in the first place.
|
Thanks for the code
|
...great mod! Should support the author...how can I donate my Million stones???
|
Donations via paypal:
:arrow: http://www.cart-lab.com/lab/customer/help.php?section=about Every stone helps! :) |
Works great and smooth to the cart. I would suggest using localization on any and every custom mod where possible, currently Im trying to do this myself, but if it is added as a Freebie anywhere as BOOMER mentions, for International sake, use localization variables, otherwise people might not know what you are talking about there. :D
|
Good Mod :D
How to Include Product Detail or description with image in it in mail? thanks |
installation
I downloaded the updated "Send to Friend" mod from PhilJ's post (Thank-you!)...but there were no installation instructions. Do I just dump it into my x-cart dir. overwriting whatever may be there?
Thanks. |
Just follow the same structure presented in the files.
|
I've attempted to install this mod and managed to get the bugs worked out till now...
Warning: Smarty error: unable to read template resource: "shop/home.tpl" in /home/httpd/vhosts/shopgspot.com/httpdocs/Smarty-2.5.0/Smarty.class.php on line 1042 I am using version: 3.5.4 |
And when exactly do you get this error, sendtofriend.php ?
|
Quote:
http://www.shopgspot.com/shop/sendtofriend.php?mode=update&productid=16135 :) |
If your using 3.5.x download philj's version of the mod for it to work properly:
http://www.lordshipfurnishers.co.uk/xmods/Send_to_Friend_Mod_v352.zip |
Quote:
Works great now! Hey I was looking through the code to see how I could CC or BC the admin on the emails that are sent. Any ideas? |
Hi,
I have previosuly installed this mod on v3.5.3 without any problems. I have since performed a 'clean' install of v3.5.5 and installed the 'Send to Friend' mod in the same was as I had previously, however when the 'Send to Friend' page is loaded, it loads only a clean 'home.tpl' page, without including the 'sendtofriend.tpl' file. I have checked and double checked all components and am still having no success. If anyone can recommend a resolution it would be appreciated. thanks |
Make sure you have added the proper code to skin1/common_templates.tpl this is what calls the sendtofriend.tpl for the main area of the page.
hth. ;) |
All times are GMT -8. The time now is 02:26 AM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.