PDA

View Full Version : Print field value into link



lyynx
06-26-2005, 10:02 AM
On my site I have a value VIN. I would like to have the value of this field place into a link to CarFax so visitors can check the vehicles history.

To accomplish this, I would like to place a link below the "Listed By"

I tried this in the listing.inc , no luck:


<a href=\"http://service.bfast.com/bfast/click?bfmid=37921009&siteid=40509964&bfpage=autocheck&vin=$vin\ (http://service.bfast.com/bfast/click?bfmid=37921009&siteid=40509964&bfpage=autocheck&vin=$vin)" TARGET=\"_new\">Check Vehicle History:$vin</a>


I get an error.

How could I accomplish this?

pbflash
06-26-2005, 05:08 PM
Try something like this:

<a href=\"http://service.bfast.com/bfast/click?bfmid=37921009&siteid=40509964&bfpage=autocheck&vin={listing_field_VIN_value}\ (http://service.bfast.com/bfast/click?bfmid=37921009&siteid=40509964&bfpage=autocheck&vin=$vin)" TARGET=\"_new\">Check Vehicle History:{listing_field_VIN_value}</a>

Replave the 'VIN' if that's not the actual name of your VIN field.

timeforsmilin
06-26-2005, 05:16 PM
Try something like this:

<a href=\"http://service.bfast.com/bfast/click?bfmid=37921009&siteid=40509964&bfpage=autocheck&vin={listing_field_VIN_value}\ (http://service.bfast.com/bfast/click?bfmid=37921009&siteid=40509964&bfpage=autocheck&vin=$vin)" TARGET=\"_new\">Check Vehicle History:{listing_field_VIN_value}</a>

Replave the 'VIN' if that's not the actual name of your VIN field.

Pb ... do you think that would work the same way for downloading PDF files from a listing view?

lyynx
06-26-2005, 08:05 PM
Thank you.

Man I suck at this.lol

By looking at your code I'm assuming it would go in the listing_detail_mainjavacolumn . I tried with no luck. I also tried it in the listing.inc as well. As an experiment can you see if you can make any fields (like field_1 etc..) appear on your sites or by it's title. I viewed the source of the outputed page and this is what I get:

<a href=\"http://service.bfast.com/bfast/click?bfmid=37921009&siteid=40509964&bfpage=autocheck&vin=</a>

Pardon me, but what does "replave" mean?

If I can just get one field to appear, I should be good to go.

lyynx
06-29-2005, 10:38 PM
Anyone? Had to post again, fell all the way to the back pages.

mattpattberg
06-30-2005, 02:14 AM
I can't quite tell if this is what you are trying to do... but on my website (www.hudhunters.com (http://www.hudhunters.com)) I have a link for 'Property Condition Report' which is automatically populated from the field 'HUD Case #'. So every property automatically gets a unique link on every page.

Is this what you are looking to do? When I did it, there were 3 different files I had to mess with. If you would like me to I can look up the files and show you what I did.

Matt

lyynx
06-30-2005, 08:24 AM
Here is an example of what I'd like to do.

http://dealers.lotbot.com/einventory/carview.php?view=12

I want to pull a field value from the db and have that value printed into the link to Carfax so a visitor could click the link to check the vehicles history.

pbflash
06-30-2005, 12:43 PM
Are you running OR 2 on this site? It doesn't look like it. From the source code:
<!-- This program is OpenSource based on a free php pogram known as openautoclassifieds which can be found at http://jonroig.com --> And your home page: Based on Jon Roigs OpenAutoClassifieds (http://www.jonroig.com/freecode/openautoclassifieds/)

I have never worked with Jon's old scripts so I can't say what you need to do. You may want to post your question in the forums on Jon's site.

lyynx
06-30-2005, 03:14 PM
The link above was to an example based on OpenAuto1.0, however, I was just posting that link to give an example of what I would like to do with the vin value.

My actaul site ( http://www.lotbot.com )is OR2 and this is the one I am trying to have the VIN print into.

pbflash
06-30-2005, 04:14 PM
Ok. In 2.0 the {listing_field_vin_value} value tag will display the value on the listing detail page. I tried using to make a link like you're trying to do and it wouldn't work. Looks like you're going to have to write a special function to do this. It can be done with an addon so you don't have to change any core files.

lyynx
06-30-2005, 05:17 PM
Cool. Any clue where I can start? Any posts or resources you can point me too, because I have no clue what I'm doing except when it comes down to layout. Either way, thanks for the replies.