Joomla 3.4, VM 3.0.6.2 More Category, Product Details lang localization problems

Started by prokops, March 16, 2015, 09:39:08 AM

Previous topic - Next topic

AH

I think from what I read that it is very strange the whole situation

Patrick

It just does not natively provide the function.

If you have a module and sell it then fine - you have managed to possibly profit off the back of a gap in functionality

But you should not be in the forum shouting that there is something "wrong/bug" in VM.  It is just functionality  that is not currently in the core

And if you wanted the functionality in the core - you would possibly provide your fix to the project??


However as JJK notes

QuoteCustomers who enter the shop from the homepage, will usually first select their preferred language before they open a category and a product details page.


Regards
A

Joomla 3.10.11
php 8.0

franzpeter

@Patrick (Studio 42): You did write most parts of the VM router and you blame others for problems with that? When you did develop the router there were already Joomla 3 versions available to test. You obviously did not care to much about. How do you explain for example that using Virtuemart advanced calculation rules by using hidden categories is partly broken since J 3? Did you test that too? The feature does not work for the VM start page in case of displaying related products, topseller or last visited products. It does not work together with any module displaying products in frontend. How do you explain that? You just get displayed products with a url like /tax1/.... or /tax2/... a.s.o.. Those categories are hidden but they get displayed in breadcrumbs and if you take a look in product details pages where it should say: go back to category xyz.. . Instead it shows the name of the hidden category!

Studio 42

Hi franzpeter,
Quote from: franzpeter on April 19, 2015, 11:50:01 AM
@Patrick (Studio 42): You did write most parts of the VM router and you blame others for problems with that? When you did develop the router there were already Joomla 3 versions available to test. You obviously did not care to much about. How do you explain for example that using Virtuemart advanced calculation rules by using hidden categories is partly broken since J 3? Did you test that too? The feature does not work for the VM start page in case of displaying related products, topseller or last visited products. It does not work together with any module displaying products in frontend. How do you explain that? You just get displayed products with a url like /tax1/.... or /tax2/... a.s.o.. Those categories are hidden but they get displayed in breadcrumbs and if you take a look in product details pages where it should say: go back to category xyz.. . Instead it shows the name of the hidden category!
I wrote the router in 2012.
you can see my stast here : https://www.openhub.net/p/virtuemart/contributors/19885698713752 and you can see my last change was the 10-May-2012
made 813   commits, and changed 80,714 lines of code and worked more then 2000 Hours for the project to make the MVC release of Virtuemart 1 !

I reported to valerie alatak(she was the main developper after milbo) some bugs, but this was never fixed and only because i had no lust to write a patch.(sometime this was only one line of code).
I am not responsible for the bugs that have not been fixed since

I can blame me, because i try to find some solution and not only blame me!
Each time i blame me, i try to get a solution, i not have the last word but max milbers and the developpers having write acces to the commits. If my solution are not approuved or tested and the bug persist, it's not my fault or ?

P.S: for J3 release date : https://docs.joomla.org/Joomla_3.0_version_history , and how i can fix a bug for something not existing ?

Milbo

The point is, you created the router. The whole philosophy, the basic system is yours. We do not blame you. You did not posted your fixes, patches, ideas here.
and Just dont blame us. I am writing anyway a completly new router, because j3.4 creates a lot problems for nothing.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

Studio 42

I wrote in skype some thinks in valerie in 2013.
I said that using one instance in the router helper cannot work in multilanguage and this since 2013.
I don't know if Valerie have send you the message, but at this moment. She had the rights to change the code and the change was never made.
I give the solution, you write the code. Why this is now my fault that noone changed this?

Studio 42

Quote from: Milbo on April 19, 2015, 13:14:43 PM
The point is, you created the router. The whole philosophy, the basic system is yours. We do not blame you. You did not posted your fixes, patches, ideas here.
and Just dont blame us. I am writing anyway a completly new router, because j3.4 creates a lot problems for nothing.
For the basic philosophy , the philosophy was from Joomla 2.5 core concept in 2012. Of course if no one update the code, this are now obselete.
But simply look in K2 or other main component. Many have problem with Joomla 3 and rewrote the router code for Joomla 3. But i have to repeat me, i have no acces to commits and code changes and since Joomla 3 is released.

for eg. Joomla3 use now class and not function anymore, to get the categories and articles(or items) they use now an helper.

lindapowers

What pisses me and probably most users is that this fix took less than 2 hours for studio, milbo or any other advanced dev.

There are hundreds of topics refering to this for years and no one decided to spend 1 hour for a basic thing for multilingual shops?

I dont like bitching in the forum but come on... There are topics from 2012 asking for this.

Make vm commercial and get motivated devs to improve the system please, free is becoming too expensive.

We have so many 3rd party plugins to do basic stuff like exporting orders, shipping, payments etc that updating vm becomes a nightmare. Now we also need this module for our multilingual shop?

Come on

AH

QuoteWe have so many 3rd party plugins to do basic stuff like exporting orders, shipping, payments etc that updating vm becomes a nightmare. Now we also need this module for our multilingual shop?

So the other "free" shops come with everything free do they? - I think not!

VM has improved dramatically over the last few years in all areas - maybe you could sponsor the 1 hour and get it into core.
Regards
A

Joomla 3.10.11
php 8.0

Studio 42

As i said some post before, the main bug for multilanguage is only a instance problem. But i cry this since 2013(when i had the problem for a site) but noone want change this.

A simple example:

public function getCategoryRoute($virtuemart_category_id){

$cache = JFactory::getCache('_virtuemart','');
$key = $virtuemart_category_id. VmConfig::$vmlang ; // internal cache key
if (!($CategoryRoute = $cache->get($key))) {
$CategoryRoute = $this->getCategoryRouteNocache($virtuemart_category_id);
$cache->store($CategoryRoute, $key);
}
return $CategoryRoute ;
}

in this code you have : $key = $virtuemart_category_id. VmConfig::$vmlang ; // internal cache key
but VmConfig::$vmlang is a fixed value ! then how to make the difference from one lang to other ?

I know exactly wat is wrong for mulitlanguage, but some said my code is bad, then sorry i don't spend time to make patch when noone see the current code is bugged for multilanguage.

And in all case Max has wrote " i write a totally new router".

Studio 42

Now the same with an instance
public function getCategoryRoute($virtuemart_category_id){

$cache = JFactory::getCache('_virtuemart','');
$key = $virtuemart_category_id. $this->vmlang ; // internal cache key
if (!($CategoryRoute = $cache->get($key))) {
$CategoryRoute = $this->getCategoryRouteNocache($virtuemart_category_id);
$cache->store($CategoryRoute, $key);
}
return $CategoryRoute ;
}


$this->vmlang is now an instance and can have different value depending the language instance.

lindapowers

A developer mentioned this to us, no clue how right or wrong he was:

virtuemart is not taking sef code=en , es etc es but instead it is taking language tag that is the problem also virtuemart is taking vmlang parameter from the url but this is not avaible we have lang the file i worked on is administrator\components\com_virtuemart\helpers\config.php

see line 918 and line 941
I addded below code to work with sef parameter**////
  $sitesef=vRequest ::getString('lang',false );
 
  $lang = JFactory::getLanguage();
  $languages = JLanguageHelper::getLanguages('lang_code');
  $l=$lang->getKnownLanguages();
foreach($l  as  $l2) {
$tag=$languages[$l2['tag']]->sef;

if($sitesef==$tag){
  $siteLang=$l2['tag'];
  }
 
}


Quote from: Hutson on April 20, 2015, 20:50:33 PM
QuoteWe have so many 3rd party plugins to do basic stuff like exporting orders, shipping, payments etc that updating vm becomes a nightmare. Now we also need this module for our multilingual shop?

So the other "free" shops come with everything free do they? - I think not!

VM has improved dramatically over the last few years in all areas - maybe you could sponsor the 1 hour and get it into core.

Wont be the first time Ill do that... and wont be the first time I report a bug and get completely ignored saying only me or 2 others have the problem so it must not exist.

And yes vm has improved a lot the last years, ill say the last year specially, no one denied that.




AH

Excellent - so at least we are agreed that VM has really improved.

Now we can just hope that Milbo puts this on his list to have a look at.
Regards
A

Joomla 3.10.11
php 8.0

Milbo

Quote from: Studio 42 on April 19, 2015, 14:18:44 PM
I wrote in skype some thinks in valerie in 2013.
That is 2 years ago. Whatever you wrote to her. Typically for you is that you fix an error for you and create bugs for others. We had that so often. You are not working clean and your code idioms are horrible for most people to read. So it is very likely that we decided not to add new bugs to fix a problem of Patrick, which others do not have. It is always a matter of priorisation and categorisation. For me this is not a bug, it is a missing feature. Other multilanguage webpage developer dont see so critical as you.

Quote from: Studio 42 on April 19, 2015, 14:18:44 PM
I said that using one instance in the router helper cannot work in multilanguage and this since 2013.
LoL, this are the reasons I do not trust your code.
First we both decided together to use a lang constant. Seconed I changed that for VM3, exactly for the reason to be able to change the language while the code is running.

Quote from: Studio 42 on April 19, 2015, 14:18:44 PM
I don't know if Valerie have send you the message, but at this moment. She had the rights to change the code and the change was never made.
I give the solution, you write the code. Why this is now my fault that noone changed this?
Very often the theoretical solution is practically not useable.

Quote from: Studio 42 on April 19, 2015, 14:32:01 PM
Quote from: Milbo on April 19, 2015, 13:14:43 PM
The point is, you created the router. The whole philosophy, the basic system is yours. We do not blame you. You did not posted your fixes, patches, ideas here.
and Just dont blame us. I am writing anyway a completly new router, because j3.4 creates a lot problems for nothing.
For the basic philosophy , the philosophy was from Joomla 2.5 core concept in 2012. Of course if no one update the code, this are now obselete.
There is again a sign, I cannot trust your code. All your examples above show the caching added by me, proving that I adjusted the code. It was very slow before. You can check the forums, we had a lot problems with your restrictive router. We discussed a lot about that. But if you check the code, then you see that the 2 main functions are mainly the same and that we just added here and there more cases/fallbacks. The helper is also almost the same, except that I added caches to the functions. I mainly developed that for VM3 and just back ported the backward compatible ideas.

Quote from: Studio 42 on April 19, 2015, 12:47:11 PM
P.S: for J3 release date : https://docs.joomla.org/Joomla_3.0_version_history , and how i can fix a bug for something not existing ?
It took me some time to understand what you mean with it. But shows again the problem with you. You may remember the time when we adjust vm directly to j1.6 and j1.7? That we lost a lot time due changes which were changed for j2.5 again? So we decided to skip j3.0 and to wait for j3.4 and to be directly ready for next j3.5 LTR. Btw at that time, the roadmap was to release j3.5 in September 2013. So of course your code got ignored, we had enough trouble with vm2.0 and j2.5. Ironically we had a lot trouble with your code, mainly the router and the customfields.

Quote from: Studio 42 on April 19, 2015, 14:32:01 PM
But simply look in K2 or other main component. Many have problem with Joomla 3 and rewrote the router code for Joomla 3.
As I stated we do. Btw we also donated 250 euro (payed by the Memberships) to Hannes Papenberg. But it seems to be more complex than a Patricks think.

Quote from: Studio 42 on April 19, 2015, 14:32:01 PM
But i have to repeat me, i have no acces to commits and code changes and since Joomla 3 is released.
You dont need that to committ code. Just post openly your ideas, fixes, patches here in the forum. Then we can talk about it. But you know that at that time we would have answered you that j3.0 is not stable. None of the STR were stable by definition.

Quote from: Studio 42 on April 19, 2015, 14:32:01 PM
for eg. Joomla3 use now class and not function anymore, to get the categories and articles(or items) they use now an helper.
None of this changes describe how to handle the different sets. It is from my point of view mainly doing the same thing a bit different. As analogy before it was an engine with Benzine, now it uses Diesel. My idea for a router is more like using an electric asynchronous motor. Really new concepts behind it. The first goal was just to get the Benzine running with the Diesel and to have a solution.
and if you take a closer look. It does not really make sense to change now the router to the j3.4.1 system, if we get anyway a new router by Hannes Papenberg. So now it looks like it will take too long and we have to develop our own versions. But you cant know that before, impossible.

Quote from: lindapowers on April 20, 2015, 17:27:04 PM
What pisses me and probably most users is that this fix took less than 2 hours for studio, milbo or any other advanced dev.
No, there is no fast fix. I did not even know about the problem, because as JJK said, for him it is not a problem. For the real shopping experience it is quite unimportant. Just when you want to check your store and your are browsing it and you want to see if all translations are correct, then you get that problem.

Quote from: lindapowers on April 20, 2015, 17:27:04 PM
There are hundreds of topics refering to this for years and no one decided to spend 1 hour for a basic thing for multilingual shops?
Then show me. We had not a lot multilanguage router problems, except with j3.4.1. and if we had a problem, we fixed it.

Guys, we talk here about the problem that if you change the language in productdetail, that you fall back to the mainpage! Not that something really important does not work. You should first investigate how many real shoppers actually have the problem.

Quote from: lindapowers on April 20, 2015, 17:27:04 PM
I dont like bitching in the forum but come on... There are topics from 2012 asking for this.

Lol, but this is what you do. Since I said to you, that it would be correct that you invest in your wishes. I suggested that you buy a bronze membership at least. You were willing to pay to develop something just for you, but you was not willing to pay, when I said it is for the community. You said then, that you do not see the point to pay for something, what you get later anyway for free and it is unfair, because the others would not pay. Very barefaced. Also ignoring the fact that you use a lot features payed by other people that way.

Quote from: lindapowers on April 20, 2015, 17:27:04 PM
Make vm commercial and get motivated devs to improve the system please, free is becoming too expensive.
I suggest that you buy a bronze membership at least.

Quote from: lindapowers on April 20, 2015, 17:27:04 PM
We have so many 3rd party plugins to do basic stuff like exporting orders, shipping, payments etc that updating vm becomes a nightmare. Now we also need this module for our multilingual shop?
The solution is indeed to provide an own module, because the joomla one is not suitable, imho. Shipping and Payments, lol, you are really fair.


Quote from: Studio 42 on April 20, 2015, 21:21:28 PM
As i said some post before, the main bug for multilanguage is only a instance problem. But i cry this since 2013(when i had the problem for a site) but noone want change this.

A simple example:

public function getCategoryRoute($virtuemart_category_id){

$cache = JFactory::getCache('_virtuemart','');
$key = $virtuemart_category_id. VmConfig::$vmlang ; // internal cache key
if (!($CategoryRoute = $cache->get($key))) {
$CategoryRoute = $this->getCategoryRouteNocache($virtuemart_category_id);
$cache->store($CategoryRoute, $key);
}
return $CategoryRoute ;
}

in this code you have : $key = $virtuemart_category_id. VmConfig::$vmlang ; // internal cache key
but VmConfig::$vmlang is a fixed value ! then how to make the difference from one lang to other ?

Yeh, but 2013. VM3 was not there. You did not openly discuss your idea here in the forum.

The code in December 2013

public function getCategoryRoute($virtuemart_category_id){

$cache = JFactory::getCache('_virtuemart','');
$key = $virtuemart_category_id. $this->vmlang ; // internal cache key
if (!($CategoryRoute = $cache->get($key))) {
$CategoryRoute = $this->getCategoryRouteNocache($virtuemart_category_id);
$cache->store($CategoryRoute, $key);
}
return $CategoryRoute ;
}

is using a vmlang helper variable, set in the constructor and instancing by lang is possible. This kind of confusion is typical for you. Discussing about code of 2013 and trying to prove that with code from 2015, just lol.


Quote from: Studio 42 on April 20, 2015, 21:26:41 PM
$this->vmlang is now an instance and can have different value depending the language instance.
vmlang is not an instance. An instance is an object. vmlang is just a string. Regarding the flexibility, a constant has similar disadvantages like an instance. But again, you talk about code released November 2014. Not the one of 2013.

Quote from: lindapowers on April 20, 2015, 23:07:29 PM
A developer mentioned this to us, no clue how right or wrong he was:

virtuemart is not taking sef code=en , es etc es but instead it is taking language tag that is the problem also virtuemart is taking vmlang parameter from the url but this is not avaible we have lang the file i worked on is administrator\components\com_virtuemart\helpers\config.php
yeh and now ask yourself who added that. Imho Patrick. There wouldnt be any problem, if he would have written it directly according to the standards. But you are also funny. Looks like you payed another developer to fix it for you. Right? But you are angry on me, because I asked for. Really strange.

Quote from: lindapowers on April 20, 2015, 23:07:29 PM
see line 918 and line 941
I addded below code to work with sef parameter**////
  $sitesef=vRequest ::getString('lang',false );
 
  $lang = JFactory::getLanguage();
  $languages = JLanguageHelper::getLanguages('lang_code');
  $l=$lang->getKnownLanguages();
foreach($l  as  $l2) {
$tag=$languages[$l2['tag']]->sef;

if($sitesef==$tag){
  $siteLang=$l2['tag'];
  }
 
}
Ah thank you, there is the code, finally you share it. Why you just not come in and tell:
"Hey, I payed a developer to fix the lang problem, *description*. I am happy to share our fix with you."
This is the way an opensource project works. Despite that you just come in here and bitching around, since around a year. You pay someone else to write the fixes for you and keep to code. LOL and then you do wonder why I do not fullfil any of your wishes?

Quote from: lindapowers on April 20, 2015, 23:07:29 PM
And yes vm has improved a lot the last years, ill say the last year specially, no one denied that.
yeh and the more we improve, the more you bitch around. Yeeh, is crazy, we dont understand it also.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

Studio 42

For all readers,
Why is the router so a big deal in virtuemart ?
In virtuemart you have 13 views and in this view you can have many layouts.
When you have to build the route, you have to check all situations.
Now if you build a single route, this is bad for nice SEF urls eg. site.com/shop/productdetails/45
The philosophy of Joomla is to say : if you are in a menu (and have a itemid) then the default path from this menu must be used.
In virtuemart you have links to cart, account,orders,vendor ...
If you want to follow the right way to set Joomla router. You have to set for all this views a menulink in Joomla. This is how Joomla set itself the routes and sef URLS !
BUt if you are in a product for eg., the menulink(or itemId) is already set. This is why using Joomla way you can have link site.com/shop/category/product/cart when you come from a product and want display the cart for eg.
But to not have to add all this menu, Virtuemart search for fallbacks to have nice urls. But in some case, this is bugged because a menulink does not exist or a condition is not tested in router.

Now for multilanguage.
A hope a simple answer : how you can get a route from another language using VmConfig::$vmlang. Please don't refer to my old poor code but give a simple answer.

franzpeter

@Studio 42
But what I do not understand is the following thing. You have products with different tax rates. A good way with VM is to create two categories, like VAT and Reduced VAT. Set both to unpublished. Now create the 2 tax rates with two calculation rules for tax, one with the normal vat rate, the second one with the reduced vat rate. Assign the two vat rates to the appropriate hidden category for the adequate vat rate. If you create a new product you can assign it to a display category and the hidden vat category. Works fine as long as you use J 2.5. With J 3 it is broken. Joomla 3 creates wrong url because it does not differ between a hidden category and the display category. If the hidden category has the lower category id (normal if you create the hidden categories before anything else) Joomla will not take care about that. It always takes the hidden category id instead of the one for the display category. The problem is visible inside the breadcrumbs, the url and the back to category of course. So if it works with J 2.5 and is broken with J 3, there seems to be something wrong with Joomla in case of url creation and routing.

So for me J 3 is far away from any acceptable stable state. In the described case, there is nothing wrong with the way VM creates the routing, it is a J 3 problem. And you have barely a chance to patch something in that case if Joomla is not even able to differ between something published or unpublished!