New stable Release Candidate 3.0.13 released, please anyone test.

Started by Milbo, February 09, 2016, 23:44:53 PM

Previous topic - Next topic

Ghost

Quote from: Milbo on February 14, 2016, 11:14:02 AM
From my point of view, you just disabled the "full category branch in URL" option. Can you tell me where I can find the duplicates in the sampledata? Using the fullinstaller?

I don't mean there is duplicate sample data, I mean there are duplicate category names in URLs. This happens when "Use full category tree for product links" option is disabled. Then every top level category URL looks like this: category-name/category-name and every child category looks like this: category-name/parent-category-name/category-name.

Quote from: Milbo on February 14, 2016, 11:14:02 AM
The problem with the suffix is, that you must know that you must not have the same product and category name.
It is true, yes. But it's a similar limitation to current where you can't have SEO suffix in category alias.

Quote from: Milbo on February 14, 2016, 11:14:02 AM
And as the guy says himself: "updated 3.14.14 - I didn't realize that the site I had made these adjustments to all of the categories were set as menu items which of course makes a big difference. Anyway the zip file has been updated with the latest router."
Like he said, it was updated to not require category menu items anymore. Also his router was from VM2. the router I uploaded is from VM 3.0.13.2 with his modifications applied.

Also I just found another issue in original unmodified router when "Use full category tree for product links" option is disabled. Itemid is not set properly for product details which causes current Itemid to be added (e.g. /cart/product-name when in cart view if there is a cart menu item) or basic URLs like this: /component/virtuemart/product-name in some cases. To reproduce, add product to cart, go to cart page and check product links in cart.

Also limitstart and limit are added to canonical of product details page on a few sites for some reason. These could be explicitly unset in productdetails since they're not used at all?

I have uploaded my latest router. Please test anyone.

Ghost

Here is an dea to fix product breadcrumbs and back to category button when seo_full is disabled. It is based on last visited category which VM already saves in session.

After this line in productdetails view.html.php // Load the category
$category_model = VmModel::getModel('category');
add this:

$seo_full = VmConfig::get('seo_full',true);

if(in_array($last_category_id,$product->categories) && !$seo_full) $product->virtuemart_category_id = $last_category_id;


and after $category = $category_model->getCategory($product->virtuemart_category_id);

add this: if(in_array($last_category_id,$product->categories) && !$seo_full) $product->category_name = $category->category_name;

To me works as expected but please test and review anyone.

Studio 42

As this can be a great idea to remove the suffix in URL. This is not needed.
YOu can use ".htm" to have good SEO and disable suffix in Joomla
And removing it, need more work to find out if this is a category or a product. And all old VM website loose all they current links in search engines and you have then to add a redirect rule.

Ghost

Quote from: Studio 42 on February 15, 2016, 17:31:08 PM
As this can be a great idea to remove the suffix in URL. This is not needed.
YOu can use ".htm" to have good SEO and disable suffix in Joomla
And removing it, need more work to find out if this is a category or a product. And all old VM website loose all they current links in search engines and you have then to add a redirect rule.
It is needed, many users have requested this. "You can do A" when you need to do B is not the solution. And the idea was that removing suffix is optional. Users who do not remove it still have their URLs working with suffix.

Anyways, Max already took his time to add this and make it even better! See here http://dev.virtuemart.net/projects/virtuemart/activity. Test if you can.

Studio 42

I know you can do it, but the problem was possible conflit with categories, so whe have add the suffix on the begin of first vm2 releases.
The problem was the same with missing Menu, some don't understand why you have components/com_virtuemart at the place of sef link. So we have add for some year the message when this was not set, but this problem is for all Joomla component, so i hope that you have not to many complain from user because they cannot access to a product with sef active.

noras

@Milbo - thanks, VM3.0.13.4 solves the problem with the installation of the language.

Milbo

Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

noras

I have a suggestion to improve the function prepareContinueLink(). This will improve the SEF url in a modal window that appears when you add a product to the cart.

So it is now
index.php?option=com_virtuemart&view=cart&lang=en
It seems to me that it would be better if the link is
shop/mycart

In file components\com_virtuemart\helpers\vmview.php for function prepareContinueLink(), line ~114-145, is now:

function prepareContinueLink(){

$virtuemart_category_id = shopFunctionsF::getLastVisitedCategoryId ();
$categoryStr = '';
if ($virtuemart_category_id) {
$categoryStr = '&virtuemart_category_id=' . $virtuemart_category_id;
}

$ItemidStr = '';
$Itemid = shopFunctionsF::getLastVisitedItemId();
if(!empty($Itemid)){
$ItemidStr = '&Itemid='.$Itemid;
}

$lang = '';
if(VmConfig::$jLangCount>1 and !empty(VmConfig::$vmlangSef)){
$lang = '&lang='.VmConfig::$vmlangSef;
}

$this->continue_link = JURI::root() .'index.php?option=com_virtuemart&view=category' . $categoryStr.$lang.$ItemidStr;
$this->continue_link_html = '<a class="continue_link" href="' . $this->continue_link . '">' . vmText::_ ('COM_VIRTUEMART_CONTINUE_SHOPPING') . '</a>';

$juri = JUri::getInstance()->toString(array( 'host', 'port'));

$scheme = 'http';
if(VmConfig::get('useSSL',false)){
$scheme .='s';
}
$this->cart_link = $scheme.'://'.$juri. JURI::root(true).'/index.php?option=com_virtuemart&view=cart'.$lang;

return;
}


Change it:


function prepareContinueLink(){

$virtuemart_category_id = shopFunctionsF::getLastVisitedCategoryId ();
$categoryStr = '';
if ($virtuemart_category_id) {
$categoryStr = '&virtuemart_category_id=' . $virtuemart_category_id;
}

$ItemidStr = '';
$Itemid = shopFunctionsF::getLastVisitedItemId();
if(!empty($Itemid)){
$ItemidStr = '&Itemid='.$Itemid;
}

$lang = '';
if(VmConfig::$jLangCount>1 and !empty(VmConfig::$vmlangSef)){
$lang = '&lang='.VmConfig::$vmlangSef;
}

$this->continue_link =  JRoute::_('index.php?option=com_virtuemart&view=category' . $categoryStr.$lang.$ItemidStr);
$this->continue_link_html = '<a class="continue_link" href="' . $this->continue_link . '">' . vmText::_ ('COM_VIRTUEMART_CONTINUE_SHOPPING') . '</a>';
$this->cart_link = JRoute::_('index.php?option=com_virtuemart&view=cart'.$lang);

return;
}



Edit: Spelling correction.

Ghost

http://virtuemart.net/news/latest-news/472-release-of-3-0-10

Popup links were made not SEF in VM 3.0.10 because there was a language detection issue. And your code seems to have that issue as well.

noras

Quote from: Ghost on February 26, 2016, 10:44:35 AM
http://virtuemart.net/news/latest-news/472-release-of-3-0-10

Popup links were made not SEF in VM 3.0.10 because there was a language detection issue. And your code seems to have that issue as well.

Okay, I understand. And you can not simply be added  JLanguageMultilang::isEnabled() for the condition of the language?

function prepareContinueLink(){

$virtuemart_category_id = shopFunctionsF::getLastVisitedCategoryId ();
$categoryStr = '';
if ($virtuemart_category_id) {
$categoryStr = '&virtuemart_category_id=' . $virtuemart_category_id;
}

$ItemidStr = '';
$Itemid = shopFunctionsF::getLastVisitedItemId();
if(!empty($Itemid)){
$ItemidStr = '&Itemid='.$Itemid;
}

$lang = '';
if(VmConfig::$jLangCount>1 and !empty(VmConfig::$vmlangSef) && JLanguageMultilang::isEnabled()){
$lang = '&lang='.VmConfig::$vmlangSef;

        }

$this->continue_link =  JRoute::_('index.php?option=com_virtuemart&view=category' . $categoryStr.$lang.$ItemidStr);
$this->continue_link_html = '<a class="continue_link" href="' . $this->continue_link . '">' . vmText::_ ('COM_VIRTUEMART_CONTINUE_SHOPPING') . '</a>';
$this->cart_link = JRoute::_('index.php?option=com_virtuemart&view=cart'.$lang);

return;
}

It does not solve the problem?

Studio 42

YOur sef problem is already in old release.
Many want full sef links in modal cart, but only team can changes the code.

Ghost

Quote from: noras on February 26, 2016, 11:31:36 AM
It does not solve the problem?
Testing on live site it works on most pages (category, product, non-VM pages) except in VM frontpage.

noras

I answer only solution, it seems to me that good. I noticed a problem in the shop my client. I fixed, it looks like it works so I shared in the forum.


Alexanderz

I noticed that they released a new 3.0.17 release. Where you can view the changelog?
There is a section in the forum where specifically describes the new version is released?

Thank you!

jenkinhill

It is an odd numbered version, so for testing by experienced users. Generally even number versions are the stable ones.

You can see the changes/fixes in http://dev.virtuemart.net/projects/virtuemart/repository
Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum