News:

Looking for documentation? Take a look on our wiki

Main Menu

Redirect VM Product Page to Joomla Article

Started by favdes, June 17, 2015, 18:07:26 PM

Previous topic - Next topic

favdes

Hello everyone,

Here's a bit of a complicated one for you!  :0)

We're using VM version 3.

We have a large VM shop. For some products, which are quite speshitpilled we have Joomla Article pages instead of VM Product Pages.

What I would like to do though is still show these products in the VM Category View but when clicked on, we would like the customer to be redirected to the Joomla article page.

Basically we would like the product to appear (and look the same as other products) in the category view but for these particular items, we would like the customer to be redirected to an article and not a VM product page.

Does this make sense? Is it possible?

Many thanks


James

PRO




Use the
URL field in the product edit.

Then:

sublayouts/products.php

I tested this

Right after this
foreach ( $products as $product ) {
// Add this
  if (!empty($product->product_url)){
  $product->link=$product->product_url;
  $ItemidStr=Null;
  }




favdes

Hi Pro,

Thank you for getting back to me. I've had a look this morning but I'm having problems with it.

The product is in multiple categories so there are lots (30+) categories that the product has been entered into. Therefore there are 30+ links for product. Is there another way I can redirect anyone who visits the product page, to an article?

Many thanks


James

PRO


favdes

Hi,

I meant using your method would I need to create a redirect link for every product for each category that it is listed in, as the URL changes.

For example, if the same product is listed in two categories then two URLs are generated for the product e.g.

category-1/product1.html
category-2/product1.html

Kind regards


James

PRO

Quote from: favdes on June 30, 2015, 13:50:48 PM
Hi,

I meant using your method would I need to create a redirect link for every product for each category that it is listed in, as the URL changes.

For example, if the same product is listed in two categories then two URLs are generated for the product e.g.

category-1/product1.html
category-2/product1.html

Kind regards


James

BUT the destination url you want it to go to is the same right?

SO , thats the link field

have you tried one?

favdes

Yes but I didn't want to add the link in for each product, for each category as that would have ended up with 80+ links in the code to redirect.

Not to worry though, I've tried it using the advanced module manager (assigning the module to VM products) and then using the Flexi Custom Code module to put in a PHP redirect.

Thank you for your help. I'm sure it would have worked but I'm a lazy bugger and wanted a quicker workaround  :0)

PRO

You would have to add it to each product ONLY