Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls

Send to Friend on product pages.

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions
 
Thread Tools Search this Thread
  #21  
Old 03-03-2003, 12:45 PM
 
machnhed1 machnhed1 is offline
 

eXpert
  
Join Date: Feb 2003
Location: Illinois
Posts: 274
 

Default Great Script

Hi Boomer,

Kudos on the script, you really outdid yourself. I would like to add a slight mod for /customer/home.tpl file, let me know your thoughts on it...

-Original Code-
Code:
<title>{$lng.txt_site_title} {if $main eq "catalog"} {if $location eq ""} {$lng.txt_subtitle_home} {else} {strip} {section name=position loop=$location start=0 } {if %position.last% eq "true"} - {$location[position].0|escape}{/if} {/section} {/strip} {/if} {elseif $main eq "product"} {if $product.product ne ''} - {$product.product}{/if} {elseif $main eq "help"} {$lng.txt_subtitle_help} {elseif $main eq "cart"} {$lng.txt_subtitle_cart} {elseif $main eq "checkout"} {$lng.txt_subtitle_checkout} {elseif $main eq "order_message"} {$lng.txt_subtitle_thankyou} {/if} </title>
-Modified Code-
Code:
<title>{$lng.txt_site_title} {if $main eq "catalog"} {if $location eq ""} {$lng.txt_subtitle_home} {else} {strip} {section name=position loop=$location start=0 } {if %position.last% eq "true"} - {$location[position].0|escape}{/if} {/section} {/strip} {/if} {elseif $main eq "product"} {if $product.product ne ''} - {$product.product}{/if} {elseif $main eq "help"} {$lng.txt_subtitle_help} {elseif $main eq "cart"} {$lng.txt_subtitle_cart} {elseif $main eq "checkout"} {$lng.txt_subtitle_checkout} {elseif $main eq "order_message"} {$lng.txt_subtitle_thankyou} {elseif $main eq "sendtofriend"} {if $product.product ne ''} - Send {$product.product} to a Friend{/if} {/if} </title>
The extra elseif statement changes the title of the page and adds in the product name. A slight mod, but it may help out with the search engines a bit and is an improvement over the default title.

Hope someone gets some use of it.

Reply With Quote
  #22  
Old 04-30-2003, 07:08 PM
 
okdpminc okdpminc is offline
 

Advanced Member
  
Join Date: Nov 2002
Posts: 74
 

Default

I've just discovered that the HTML Catalog makes a shambles of the link for sendtofriend. Is there a tweak that will fix this, as manually editing every product html page ain't gonna cut it?
__________________
- okdpm

X-Cart Gold Version: 3.5.1

Things are more like they are now than they have ever been before...
Reply With Quote
  #23  
Old 04-30-2003, 07:19 PM
  B00MER's Avatar 
B00MER B00MER is offline
 

X-Guru
  
Join Date: Sep 2002
Location: Keller, TX (Cart-Lab.com)
Posts: 3,165
 

Default

Just make the link point directly to the sendtofriend.php file.

Kinda like so:

This is on the blazingdragon.com site and it works from the html catalog.
__________________
Cart-Lab - 100+ Social Bookmarks for X-Cart.
Reply With Quote
  #24  
Old 04-30-2003, 07:32 PM
 
okdpminc okdpminc is offline
 

Advanced Member
  
Join Date: Nov 2002
Posts: 74
 

Default

Dang Boomer! You beat me to the punch. I just made the change and was going to update my post....lol. That was your basic no-brainer after I took a closer look at it. Thanks for the faster than expected post.
__________________
- okdpm

X-Cart Gold Version: 3.5.1

Things are more like they are now than they have ever been before...
Reply With Quote
  #25  
Old 07-08-2003, 01:50 PM
 
tpfair tpfair is offline
 

Advanced Member
  
Join Date: May 2003
Posts: 81
 

Default Compatible 3.4.3 ????

Hello


Is there anyone who as install this mod with version 3.4.3 ????



Stefan
Reply With Quote
  #26  
Old 07-27-2003, 03:34 PM
 
Xcart-Man Xcart-Man is offline
 

Advanced Member
  
Join Date: Jun 2003
Posts: 81
 

Default 3.4.3 here working 100%

yeah I got it workin on 3.4.3 with no issues.
Reply With Quote
  #27  
Old 08-14-2003, 10:25 AM
 
Mad Mad is offline
 

Advanced Member
  
Join Date: Jul 2003
Location: Brooklyn, NY
Posts: 60
 

Default

Got it working here as well on the newest build.

Got everything optimized to my liking. One question though, how could I get the name of the product into the actual e-mail? I don't need the description, just the name.

Great post, got it to work without issues the first time around.
Reply With Quote
  #28  
Old 08-21-2003, 07:36 PM
 
Mad Mad is offline
 

Advanced Member
  
Join Date: Jul 2003
Location: Brooklyn, NY
Posts: 60
 

Default

Here is another small addition to this great mod.
Original [/customer/main/sendtofriend.tpl]:
Code:
... </script> {/literal} {capture name=dialog} {if $smarty.get.mode eq "update"} ...
Replace with [/customer/main/sendtofriend.tpl]:
Code:
... </script> {/literal} {include file="location.tpl"} {capture name=dialog} {if $smarty.get.mode eq "update"} ...
Then, Original [/location.tpl] (yours may look different):
Code:
... <font class=NavigationPath>{$last_location}</font> {if $last_url ne ""} </a> {/if} {/if} / {section name=position loop=$location} {if $location[position].1 ne "" }<a href="{$location[position].1}">{/if} ...
Replace with [/location.tpl]:
Code:
... <font class=NavigationPath>{$last_location}</font> {if $last_url ne ""} </a> {/if} {/if} / <font class=NavigationPath>{if $main eq "sendtofriend"}E-mail a Friend{/if}</font> {section name=position loop=$location} {if $location[position].1 ne "" }<a href="{$location[position].1}">{/if} ...

Hope this helps a few people. Thanks again for the great mod!
Reply With Quote
  #29  
Old 08-22-2003, 04:36 PM
 
nerd luv nerd luv is offline
 

Advanced Member
  
Join Date: Jun 2003
Location: California, USA
Posts: 58
 

Default

What a great addition! *Almost* everything is working perfectly for me...

The e-mails, although only received one time, have the TO address in there twice. ie- TO: me@me.com; me@me.com

Any ideas?

edit- got the first of my two issues fixed
__________________
Always happy to Paypal over some money for X-Cart solutions. I need to get this store running! Help!
--Testing 3.5.8, heavily modified, Linux, Apache 1.3.31, PHP 4.3.4--
Reply With Quote
  #30  
Old 09-11-2003, 07:54 AM
 
mmaner mmaner is offline
 

Advanced Member
  
Join Date: Apr 2003
Location: Florence, AL
Posts: 50
 

Default Acess Denied

Great Script Boomer. I see it live on other sites, but for somereason I'm getting an Access Denied error. Here's the URL: www.wittrans.net/wittcart/customer/home.php
And I checked the file locations. Any ideas?
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 08:10 AM.

   

 
X-Cart forums © 2001-2020