![]() |
Link Bait on the Fly | SEO Marketing
This program creates "link bait on the fly", to each specific product. The html snippets will open in a new window.
Create linktothis.php in the xcart dir. (wherever the "yoursite" appears, you will need to change to your site) linktothis.php: Code:
Wherever you want the "link to this link" place the following code on product.tpl in your skin1/customer/main folder Code:
<P><A class="LinkToThis" href="javascript:void(0)" onClick="window.open('http://www.yoursite.com/store/linktothis.php?linkto='+escape(window.location.href),'','width=800,height=400,resizeable=true')">Link to this</a><!-- { $product.tmbn_url } --></P> |
Re: Link Bait on the Fly | SEO Marketing
it just seems to be linking to my homepage.
also, how does the image link work? check it out here: http://www.audiolines.com/product.php?productid=15530&cat=0&page=1 |
Re: Link Bait on the Fly | SEO Marketing
You have to change these lines of code inside the text:
$output .= "Available from <a href='http://www.yoursite.com/' target='_top'>Your Link Output Keywords</a><p>"; <LINK rel="stylesheet" href="http://yoursite.com//store/skin1/skin1.css"> <LINK rel="stylesheet" href="http://yoursite.com//store/skin1/tabs.css"> <center> <h1 style="background-image:url(http://www.yoursite.com/store/skin1/images/dialog_bg_n.gif)">Link to <?php echo $product; ?></h1> </center> Basically anywhere where it says "yoursite", needs to be modified You can see working version of this mod on our site (right above the save 15%): http://www.mailboxixchange.com/store/product.php?productid=18674&cat=0&page=1 |
Re: Link Bait on the Fly | SEO Marketing
Quick question. I get pushed to my 404 page when I click on the "link to this" text link. Any ideas why?
|
Re: Link Bait on the Fly | SEO Marketing
You have to change the text in the link to this link:
<P><A class="LinkToThis" href="javascript:void(0)" onClick="window.open('http://www.yoursite.com/store/linktothis.php?linkto='+escape(window.location.hre f),'','width=800,height=400,resizeable=true')">Lin k to this</a><!-- { $product.tmbn_url } --></P> Make sure your site is in the text and that you do need to have the "store" directory -DS |
Re: Link Bait on the Fly | SEO Marketing
1 Attachment(s)
Quote:
No. I get a quick glimpse of what looks like the proper url in the title bar, and then it pushes into the 404. Perhaps I messed up the linktothis.php file? Attachment 423 |
Re: Link Bait on the Fly | SEO Marketing
I would make sure you need to have the /store/ directory. I am running this mod on 4.0.18 with no modification to the URL's. It will work for both the dynamic site and the html catalog.
|
Re: Link Bait on the Fly | SEO Marketing
Quote:
It's always the simple things that trip you up when you're moving too fast. root dir installs need to get rid of the "/store" in the linktothis.php and url. thanks. Next I have to get it to display the images properly in 4.1.7. |
Re: Link Bait on the Fly | SEO Marketing
thank you for this mod David, but i have the same problem in x-cart 4.1.7
you can check it here under product image http://www.medsmarket.net/product.php?productid=46&cat=0&page=1&featured |
Re: Link Bait on the Fly | SEO Marketing
I am sorry, but I dont have 4.1.7. The only program I have is 4.0.18. I am sure it can be modified, but someone else will have to do it.
Hopefully they will post the changes!! -David |
Re: Link Bait on the Fly | SEO Marketing
David,
Could you post the pieces that deal with the image. I'm not proficient enough to write this stuff, but I'm persistent enough and catch just enough to beat around until I find a solution. Thanks! |
Re: Link Bait on the Fly | SEO Marketing
vtonya,
you may want to change the link wording from "Available from Your Link Output Keywords" to "Available from MedsMarket" You'll find that here: Code:
Also, mine outputs the name of the product, and yours does not. ??? Have a look: http://www.heritagetoys.com/Boston-Red-Sox-Toy-Chest-pr-19598.html |
Re: Link Bait on the Fly | SEO Marketing
Thanks HWT, i did changes and fogot to paste my site name. Thank you.
Ys, we have the same problem, hope we will solve it soon. |
Re: Link Bait on the Fly | SEO Marketing
Just my two cents. I would take a look at this line of code:
Code:
The 4.1.8 program could have changed the name of the tumbnail. Check in your database to see what it is called. It seems to be grabing the rest of the information. Good Luck -DS |
Re: Link Bait on the Fly | SEO Marketing
In x-cart 4.1.7 in product_thubmnail.tpl there is the following code:
Quote:
|
Re: Link Bait on the Fly | SEO Marketing
That seems to be the same.
The problem could be with the following code: Code:
if($image_URL==""){ // Extract product image URL |
Re: Link Bait on the Fly | SEO Marketing
Problem can be anywhere, the question is how to find it...
|
Re: Link Bait on the Fly | SEO Marketing
I got this to work correctly on our site by changing the "Link to this" code that is to be placed in product.tpl
Replaced this. <P><A class="LinkToThis" href="javascript:void(0)" onClick="window.open('http://www.yoursite.com/store/linktothis.php?linkto='+escape(window.location.hre f),'','width=800,height=400,resizeable=true')">Lin k to this</a><!-- { $product.tmbn_url } --></P> With this. <P><A class="LinkToThis" href="javascript:void(0)" onClick="window.open('http://www.yoursite.com/store/linktothis.php?linkto=http://www.yoursite.com/store/product.php?productid={$product.productid}&tmbn_ur l={$product.tmbn_url}&product={$product.product|ur lencode|default:'#no_string_value_found'}','','wid th=800,height=400,resizeable=true')">Link to this</a></P> |
Re: Link Bait on the Fly | SEO Marketing
Quote:
Nice Work.......I totally forgot about this post......Thanks for resurecting it..........I hope people get full use of it. Its a damn cool mod (especially for products geared towards a younger crowd) -ds |
Re: Link Bait on the Fly | SEO Marketing
FYI, I doubt this will now work on 4.1.11, since they changed the call to the thumbnail.....I am assuming the code will need to be altered.
|
Re: Link Bait on the Fly | SEO Marketing
Quote:
Are you running this on a 4.1.9? It looks good. Anyone knows if this integrates with a mod rewrite, for example the CDSEO? With so many bloggers out there this is a pretty neat function that more ppl should use. This contributed code needs to get more attention.. |
Re: Link Bait on the Fly | SEO Marketing
Ok, I have played around a bit with this mod.
So far I don't get the product picture to display in the pop up window like pig@pp manage to on his site. I used his code but so far no picture. Also the links is not rewritten, I don't get the clean URLs, but it works. I have CDSEO mod. I also noticed that when clicking on a product link in the pop up window I get to the product page for that product on my site, but the size of my site is the same as the pop up window and you cannot open it any bigger. Of course this is just for me. I assume it is cause it is not opened in a new window. I see it work nicely for pig@pp. I might have some more altering to do. But if anyone has some advice or a complete solution could perhaps post one here for others to use. |
All times are GMT -8. The time now is 08:27 PM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.