Hello,
After upgrading my development site from VM 2.0.20b to VM 2.0.24 I have the following strange behaviour :
Listing of products seems ok. However the link to the Product Details does not work as it should.
I found out that the behaviour differs depending on the value of the URL field in the Product Information page ($product->product_url).
For example :
WHEN $product->product_url equals http://www.niko.be/nlbe/products/170-00099
THEN $product->link gets generated as http://dev.example.be/www.niko.be/nlbe/products/170-00099/winkel -> This is wrong !!!!
WHEN $product->product_url is empty
THEN $product->link correctly points to /index.php/winkel/electricity/beschermkap-detail
-> This is ok
WHEN $product->product_url equals www.niko.be/nlbe/products/170-00099 (so without http://)
THEN $product->link correctly points to /index.php/winkel/electricity/beschermkap-detail
-> this is ok
So it seems that whenever the product_url field has a http:// included, the link for the product details does not get correctly generated. In fact the product detail link becomes a mix of product_url and the real product->link
Unfortunately for all my products the product_url contains http:// (and is a link to an external website)
Is this a bug ?
Any way to solve this ?
Thanks in advance!
Bart
Product_url shouldn't be filled in most cases.
Quote from: Maxim Pishnyak on October 03, 2013, 15:20:31 PM
Product_url shouldn't be filled in most cases.
What do you mean with shouldn't ? I want to make use of this field.
It's one of the fields which can be filled in on the Product Information tab in the Virtuemart administrator module (Field name = URL)
If I cannot use this, it should be removed from the Product Information tab as well.
Or can I use another field for this purpose ?
Thanks
Quote from: Maxim Pishnyak on October 03, 2013, 16:01:52 PM
Quote from: bartdm on October 03, 2013, 15:50:36 PM
Quote from: Maxim Pishnyak on October 03, 2013, 15:20:31 PM
Product_url shouldn't be filled in most cases.
I want to make use of this field.
What do you mean?
See picture : (http://www.dmits.be/images/screenshot.png)
I want to add some info to the URL field. The value of this field can be consulted as $product->product_url in the php code which display the product details.
Product url is for using entire web site. You could use custom field instead.
Quote from: Maxim Pishnyak on October 03, 2013, 17:20:06 PM
Product url is for using entire web site. You could use custom field instead.
Yes, I could. But this used used to work without any issues on version 2.0.20b.
If I move it to a customfield I have to move the URL functionality between database fields for 10000+ products and change my template code (luckily I only upgraded my dev site for the moment).
But honestly I think this definitively is a bug which should be fixed.
Some more examples (based on your remark that URL is a field for the entire website):
If URL equals http://www.niko.be then the link for my product detail is http://dev.woningtechnieken.be/www.niko.be/winkel => NOT OK
If URL equals www.niko.be then the link for my product detail is http://dev.woningtechnieken.be/index.php/winkel/zekeringhouder-mod-dimmer-detail => OK
If URL is empty then the link for my product detail is http://dev.woningtechnieken.be/index.php/winkel/electricity/zekeringhouder-mod-dimmer-detail => OK
With the link for my product details I mean the link as shown below in the product list :
(http://www.dmits.be/images/Screen_Shot.png)
This link is referenced as $product->link and is hence wrongly generated depending on the content of the URL field
Some behaviour happens when I disable my template and use the standard VirtueMart code.
Difference in behaviour between versions. In my opinion definitively a bug.
If I would better understand the PHP code I would submit a correction.
product->link is NOT product->url
what happens when you use
$product->product_url in the template?
Quote from: PRO on October 04, 2013, 01:36:12 AM
product->link is NOT product->url
what happens when you use
$product->product_url in the template?
$product->product_url correctly points to the external URL I entered in the URL field
It is really the product->link variable which gets wrongly generated. Which is very annoying as it should point to the product details.
I am sure this problem is reproducable with every installation of VM 2.0.24
Quote from: PRO on October 04, 2013, 01:36:12 AM
product->link is NOT product->url
@bartdm:
URL for pointing to another domains
LINK for using entire current web shop.
I can't see problem with this concepts (URL and LINK) in the English language dictionary.
Quote from: Maxim Pishnyak on October 06, 2013, 12:14:31 PM
Quote from: PRO on October 04, 2013, 01:36:12 AM
product->link is NOT product->url
@bartdm:
URL for pointing to another domains
LINK for using entire current web shop.
I can't see problem with this concepts (URL and LINK) in the English language dictionary.
@Maxim
I don't understand your point.
Issue is product->link gets wrongly generated whenever product_url contains http://
I do not have an issue with the concept in the English dictionary.
I have an issue that product->link which should point to the product details generates a link which is not correct and which is non-sense whenever product_url contains http://
so you use external on some products and internal on others?
Quote from: bartdm on October 06, 2013, 15:30:11 PM
I do not have an issue with the concept in the English dictionary.
VM LINK wouldn't do job of VM URL for you and vice versa. Sorry. It's just different things.
Quote from: Maxim Pishnyak on October 06, 2013, 18:27:11 PM
Quote from: bartdm on October 06, 2013, 15:30:11 PM
I do not have an issue with the concept in the English dictionary.
VM LINK wouldn't do job of VM URL for you and vice versa. Sorry. It's just different things.
I know, but VM link gets wrongly generated if VM URL contains 'http://'
Any troubles with this? Anyway VM URL will point to another web site.
Quote from: PRO on October 06, 2013, 18:24:11 PM
so you use external on some products and internal on others?
Hello,
I have the same problem. I use only external url's for product_url.
Interesting is, I added around 100 products in one category, the product detail links are fine there.
I added 16 products to another category and product link and product url are mixed.
In both cases url contains 'http://'
Any Idea?
Thanks!