Welcome, Guest. Please login or register.
Did you miss your activation email?
Login with username, password and session length


VirtueMart 1.1.5 - [SECURITY RELEASE] is available! Read more....

  Advanced search

216594 Posts in 58326 Topics- by 87995 Members - Latest Member: duane9melton
Pages: [1]   Go Down
Print
Author Topic: How can I implement a new Link, which uses the poduct_url?  (Read 6582 times)
analizer
Newbie
*
Posts: 2


View Profile
« on: February 28, 2006, 03:32:12 am »

First I wanted to excuse my little mistake, because i asked in the howto-section.

I want to create a link like "to the shop" in the detailed view, and the link should use the product_url?
I think i have to change somewhere in flypage.php.

How can i realize this idea?
Logged
dmglampers
Sr. Member
****
Posts: 347


LIGHTENING MAY STRIKE MY KIDNEYS


View Profile
« Reply #1 on: February 28, 2006, 20:34:43 pm »

I am confused by your question and I'd hate to leave your post unanswered.  Grin
Specifically "the detailed view" Do you require the link in the product details page or elsewhere? Each product is given a unique url which can be referenced.
Logged
analizer
Newbie
*
Posts: 2


View Profile
« Reply #2 on: February 28, 2006, 21:04:36 pm »

i have 30.000 products in my database. Whenever i click on a picture, virtue mart wrapps and connects in a new window to the page, which is entered in the url-field.

now i plan to add in the detailed view a link like "To the shop", which uses only the link which was entered as the product_url of the  product.

So my plan was to add in the flypage.php in a fiel under the product_price something like <a href="product_url">To the Shop</a>.
But i think i have first to define somewhere the variable $product_url perhaps in the shop.product_details.php which is in the folder \administrator\components\com_virtuemart\html.
Unfortunately i am a newbie in php.

I think it must be something like in line 199 where is the variable product_image defined.
Logged
dmglampers
Sr. Member
****
Posts: 347


LIGHTENING MAY STRIKE MY KIDNEYS


View Profile
« Reply #3 on: March 01, 2006, 01:40:43 am »

Quote
So my plan was to add in the flypage.php in a fiel under the product_price something like <a href="product_url">To the Shop</a>.

You can add a HREF to anypart of the flypage, it is pretty much indistructable.
or use the URL field in the product information in the admin
or just add a HTML to the product description

Quote
Whenever i click on a picture, virtue mart wrapps and connects in a new window to the page, which is entered in the url-field.

BTW, Have you tried changing the "Category Browse Page" to a different one? they have different functionality aswell as different appearances and are easily customisable.
Logged
peetree21
Jr. Member
**
Posts: 86


View Profile
« Reply #4 on: May 07, 2006, 07:02:30 am »

i dont think the question is properly been answered.

how do you make a link in your flypage to {product_url}

for example i want to put the url i added in the admin of the product, and instead of being associated with the product image i want it associated with the product_name or just use the product_url separately as a link in the flypage.
Logged
alimagik
Newbie
*
Posts: 7


View Profile
« Reply #5 on: May 07, 2006, 20:03:33 pm »

Hi analizer-
You actually almost answered a question I've been trying to get for days. On my browse page, I'm trying to get my product name and image to link to the product_url instead of the flypage.

I tried replacing the href to product_url, but it didn't work. I'm a php retard, but any help you can give me would so incredibly appreciated.
Logged
meadwench
Newbie
*
Posts: 24


I feel the need....the need...for mead!


View Profile
« Reply #6 on: August 04, 2006, 02:02:14 am »

I'd like to know how to do this too. I'm running an affiliate shop, so all products need to link back to the master shop. Every product has a URL doing this in the {product_url} field in the database.

I tried putting an href link in my browse_5 and my flypage, but it just displays "{product_url}" and links to http://www.gotmead.com/{product_url}, instead of:
http://tudorshoppe.com/Merchant2/merchant.mvc?Screen=PROD&Store_Code=TTS&Product_Code=600608=Cg7r3p2b
like it is supposed to.

Here's what I tried to insert:

Code:
<a href="{product_url}" target="blank"> Buy Now</a>

Anyone have any ideas? I'm gnashing my teeth on this one....

Vicky Rowe
Gotmead.com
« Last Edit: August 04, 2006, 02:05:08 am by meadwench » Logged

Thanks!

Vicky Rowe
Gotmead.com
The best source of mead-making information in the world
Satori Digital Marketing - Small business website and e-commerce design
meadwench
Newbie
*
Posts: 24


I feel the need....the need...for mead!


View Profile
« Reply #7 on: August 05, 2006, 05:21:35 am »

OK, I think I have it:

First, put this in shop.product_details.php in /administrator/components/com_virtuemart/html

Code:
$template = str_replace( "{product_url}", $db_product->f("product_url"), $template );

around line 381 (after the template lines).

Then, go to your flypage.php and add:
Code:
<a href="{product_url}" target="blank">Buy Now</a>

or whatever you want to call your link (or use a button).

I think you can also add this in the browseX.php files, I've added it, but it doesn't seem to be taking there (I think I've got sessions issues), however, it worked great in the flypage!

Edit: To add the product_url to the browsex.php pages: Add the code above same as the flypage.

Then:

Add this to shop_browse_queries.php around line 26 (the $fieldnames definition): `product_url`,
(you need to set this as a field to pull in the browse).

Then, in shop.browse.php add
Code:
$product_cell = str_replace( "{product_url}" , $db_browse->f("product_url"), $product_cell );
around line 451.

Upload these, and you should have your outside links.

Vicky Rowe
gotmead.com
« Last Edit: August 05, 2006, 05:54:22 am by meadwench » Logged

Thanks!

Vicky Rowe
Gotmead.com
The best source of mead-making information in the world
Satori Digital Marketing - Small business website and e-commerce design
bunglehaze
Full Member
***
Posts: 189


View Profile
« Reply #8 on: April 26, 2007, 13:30:35 pm »

Hi, I know this is digging this one up a bit but I cant get this to work. If I add the last section to shop.browse.php the browse page screws up (the format seems to be there but no products are listed)

I also edited the first section to fit with the format in 1.010 ie:

   
Quote
$product_cell = str_replace( "{product_url}", $db_product->f("product_url"), $template );

and still nothing.

If you can advise why this keeps happeing that'd be great!

cheers

leigh Cheesy
Logged
Pages: [1]   Go Up
Print
Jump to: