VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: fcplpl on April 20, 2020, 16:00:40 PM

Title: URL change virtuemart_product_id on product_sku
Post by: fcplpl on April 20, 2020, 16:00:40 PM
How can I change the default link: index.php?option=com_virtuemart&view=productdetails&virtuemart_product_id=5535&virtuemart_category_id=512&Itemid=

virtuemart_product_id on product_sku

To open a product like this:

index.php?option=com_virtuemart&view=productdetails&product_sku=XXX&virtuemart_category_id=512&Itemid=

which file needs to be modified ?

VM: 2.0.22b
J 1.5


Thank you for your help
Title: Re: URL change virtuemart_product_id on product_sku
Post by: pinochico on April 20, 2020, 16:21:32 PM
why?
Title: Re: URL change virtuemart_product_id on product_sku
Post by: fcplpl on April 20, 2020, 16:27:04 PM
the default product link is:

index.php?option=com_virtuemart&view=productdetails&virtuemart_product_id=5535&virtuemart_category_id=512&Itemid=

I want to exchange virtuemart_product_id on product_sku

So that I can open the product after the product_sku parameter.

I need a new URL
Title: Re: URL change virtuemart_product_id on product_sku
Post by: pinochico on April 20, 2020, 16:30:07 PM
Quotewant to exchange virtuemart_product_id on product_sku

Again:
why?
Title: Re: URL change virtuemart_product_id on product_sku
Post by: fcplpl on April 20, 2020, 16:33:16 PM
I want to integrate orders. To an external system and I need a link where the ID is changed to SKU.
Title: Re: URL change virtuemart_product_id on product_sku
Post by: pinochico on April 20, 2020, 16:38:44 PM
I think is bad idea (reason why I don't know still :)

- All function in core and DB table working with ID
- Inside SKU you can put any text = not convertible to URL without spec function, is not unique

Forget this requirement until you explain why it is sufficient to address it

Title: Re: URL change virtuemart_product_id on product_sku
Post by: jenkinhill on April 20, 2020, 16:43:20 PM
Quote from: fcplpl on April 20, 2020, 16:00:40 PM

VM: 2.0.22b
J 1.5



Did you not at least update Joomla as recommended?  http://forum.virtuemart.net/index.php?topic=144209.msg510569#msg510569
Title: Re: URL change virtuemart_product_id on product_sku
Post by: fcplpl on April 20, 2020, 16:58:05 PM
sorry my Joomla 2.5
Title: Re: URL change virtuemart_product_id on product_sku
Post by: fcplpl on April 20, 2020, 17:02:59 PM
i want to make a new column in _virtuemart_products. There, add a new column and enter a unique number.

I want to call the product from the new column instead of the product in the url virtuemart_product_id.

I need such a link with a new number for an external ordering system

Title: Re: URL change virtuemart_product_id on product_sku
Post by: pinochico on April 20, 2020, 19:09:13 PM
yep,

we created two sides connector between mobile external ordering app and VM for J25, but we don't use SKU.
I think your analyse is wrong and will be not function.

But if you want, than you have to hire some developer, this is free forum, not projecting manager :)
Title: Re: URL change virtuemart_product_id on product_sku
Post by: Studio 42 on April 20, 2020, 21:36:54 PM
If you want a link with the sku, then intercept the link and use a redirection with a system plugin.
You cannot use sku as link directly.