VirtueMart Forum

VirtueMart 2 + 3 + 4 => Templating & Layouts => Topic started by: giannisth on November 08, 2014, 01:18:50 AM

Title: redirect to another url
Post by: giannisth on November 08, 2014, 01:18:50 AM
hello everyone.
i have a major issue.
i am using joomla 2.5.27 vm2.9.9e
When clicking on a product, i would like the visitor to bypass my product details page and go to another site where they will see the product details page ,there

can this be done?
thanks in advance.
Title: Re: redirect to another url
Post by: jenkinhill on November 12, 2014, 12:00:45 PM
First move to the latest test version, currently 2.9.9.4

You will have to make template overrides for the category/product layout and find some way of inserting the product's new url.
Title: Re: redirect to another url
Post by: giannisth on November 12, 2014, 14:34:08 PM
hello, thank you for your reply.
regarding "You will have to make template overrides for the category/product layout", there a topic about this?i have searched but i haven't found.
regarding "find some way of inserting the product's new url"
i was thinking of this idea:
1. on the csv original file i created another column which i called as hyper link between the 2 columns (external hyperlink and short description).
2. so i try to call the new column as product_s_desc so as to be shown as product short description (on the category/product layout-before product details page)and at the same time being an external link .
how about this idea?
thanks
Title: Re: redirect to another url
Post by: jenkinhill on November 12, 2014, 15:46:16 PM
Template overrides have been part of Joomla since J1.5 was first introduced. See:
http://docs.virtuemart.net/tutorials/33-templating-layouts.html
http://www.ostraining.com/blog/joomla/overrides

You could use the short desc to include a link or create a new filed & read it from the databse.
Title: Re: redirect to another url
Post by: giannisth on November 16, 2014, 13:46:22 PM
hello again,regarding
"You could use the short desc to include a link or create a new filed & read it from the databse."
i changed the idea and made the product name as a link, in the csv file.
could i make it read from the database each product as an individual with unique url?
or any other easyer way?
i have looked at this http://www.inmotionhosting.com/support/website/redirects/setting-up-a-301-permanent-redirect-via-htaccess (http://www.inmotionhosting.com/support/website/redirects/setting-up-a-301-permanent-redirect-via-htaccess) but the
Setting up a permanent 301 redirect via .htaccess isn't much usefull.i need a different url for each product
thanks again.


[attachment cleanup by admin]
Title: Re: redirect to another url
Post by: GJC Web Design on November 16, 2014, 13:58:16 PM
why not just add a custom field to each product with the product url


change your cat template to use the custom field as the url of the product title
Title: Re: redirect to another url
Post by: giannisth on November 16, 2014, 16:05:58 PM
thanks for the sudjestion but it would be preferable if i could avoid the product details page.product title or image as an external link would be just fine.
you think my previous post is a good idea?
Title: Re: redirect to another url
Post by: GJC Web Design on November 16, 2014, 18:24:20 PM
Quotei changed the idea and made the product name as a link, in the csv file.

you must know what you mean - but how can we?
Title: Re: redirect to another url
Post by: giannisth on November 16, 2014, 19:06:06 PM
yes, i'm sorry.
i mean that instead of using the product short description , i think it is better if the product name is used as a link
Title: Re: redirect to another url
Post by: GJC Web Design on November 16, 2014, 21:16:22 PM
and does it work?  wouldn't have thought so - if you can save html to the title field
if you don't change your template you will just have a link inside a link ..
Title: Re: redirect to another url
Post by: giannisth on November 18, 2014, 12:27:56 PM
now this is what i'm strugling about.i'm trying to make html on the csv.it's my first time and i have no idea.any help would be much appreciated.
P.S if i use this solution will i have bypassed the .php solution?
thanks again
Title: Re: redirect to another url
Post by: GJC Web Design on November 18, 2014, 12:38:09 PM
to be honest I haven't the faintest idea what your saying... 

Quotei'm trying to make html on the csv.

what does that mean?????

and this???

Quoteif i use this solution will i have bypassed the .php solution?
Title: Re: redirect to another url
Post by: giannisth on November 18, 2014, 16:54:18 PM
ok, lets restart and talk about your sudjestion "why not just add a custom field to each product with the product url


change your cat template to use the custom field as the url of the product title".
1. Isn't the custom field viewed only after the visitor has already clicked on the product and then redirected to the product details page? If so i would prefer that he didn't. If not:
a. is there a way of bulk adding urls on the products (because they are hundreds).
b. how could i change my cat template to do so?
Oh God i'm such a rookie...
Title: Re: redirect to another url
Post by: GJC Web Design on November 19, 2014, 00:55:32 AM
1. custom fields are available in the cat pages - you need to be able to code to access them

a. I assume you will use something like csvi to import them?

b. you need to code it.. if you haven't the skills then you need to pay someone to do it
Title: Re: redirect to another url
Post by: giannisth on November 21, 2014, 21:06:22 PM
yes i will import them via csvi.
Unfortunately i cannot afford much money for proffesional coding.
it depends.
has anyone any sudjestions about a price or for any tip?
thanks
Title: Re: redirect to another url
Post by: GJC Web Design on November 21, 2014, 22:15:13 PM
If the custom field (as a url ) is imported and available in the cat template it is only a small coding job to form it into the product display - 1 hour max