Author Topic: JoomSEF plugin VM 1.1  (Read 61013 times)

VirtueArt

  • Beginner
  • *
  • Posts: 4
    • Obchod-VirtueMart.cz
JoomSEF plugin VM 1.1
« on: May 05, 2008, 13:24:07 pm »
New Plugin used by JoomSEF 3.0.X, to enable Virtuemart 1.1.X url to be search engine friendly.

Please visit Czech & Slovak VirtueMart Support Site: http://www.obchod-virtuemart.cz

[attachment cleanup by admin]

korb

  • Quality&Testing Team
  • Full Member
  • *
  • Posts: 685
  • VM 2.0 in heavy testing
    • Buy my work
Quality & Testing
« Reply #1 on: May 06, 2008, 02:47:33 am »
I have tested it. Now I understand better the process of SEF URLs generating (rewriting) and can give advise, it'a a hard job to make it work. Please test it for yourself, give feedback and help the developement of this plugin. All issues will be updated here, by sending me PM.
If you don't know how to make it work, visit my demo live site:
http://amuzament.ro/joomla/
To see/verify all product links in your demo site please use Xmap plugin.

KNOWN ISSUES:
-Artio JoomSEF generates SEF URLs only for the VirtueMart Modules published to the left module. . Does NOT generate SEF URLs for VM Modules published to the right, BUT not always.

-VirtueMart Cart Module when is empty and when you click it, directs you to the www.virtuemart.net It is redirecting you there because that's the URL set for your store in VM configuration, and I think it should redirect the user to the cart, even it is empty.

-the "Show all products" link dont work, it just redirects you to the homepage. To fix that, go to VirtueMart Module, disable the "Show all products", aplly, and re-enable it, than browse the site (for generating the link with a number), then go to Artio JoomSEF administration and rename that link.

-the VirtueMart plugin does not translate the links: "Forgot password" and "Forgot username" in the default language on the site (your language), you must edit those links too;

-the link for minicart in the VirtueMart module is not translated in the default language on the site (your language)

-the VM advanced search does not get a SEF URL, so you have to edit it manualy.

-the link "Ask a guestion about this product" is not a SEF URL because it is not generated, you must define it in the ArtioJoomSEF Administration after you click it on demo site.

-when buying child products, in the checkout process are generated some links that are not SEF, you can define them too.

-when product category module is layouted as a tree, the links are not SEF anymore, so please don't use Dtree layout for product categories module or VirtueMart module, USE Tigra tree it works.

SPECIAL NOTE! Artio uses spam and here is a solution, or direct download clean, no spam version here.

All links generated by Artio JoomSEF are perfect for the products that dont appear twice on a single site, or if they are, Artio gives the clone link a number (sometimes 2) you can edit it as well.

IF YOU'RE A CODER: Please help this plugin GROW!

drfelch

  • Beginner
  • *
  • Posts: 23
Re: JoomSEF plugin VM 1.1
« Reply #2 on: May 06, 2008, 14:55:28 pm »
I have given it a brief go and all looks ok.  There are a few URLs which do not get converted, and the RSS feed does not work for me, but it could be my templates which are causing the problem here so would be grateful if someone could confirm ;-)

Top job though, well done!  The smartSEF worked ok, but the VM search does not work with it, so this is a welcome alternative.

korb

  • Quality&Testing Team
  • Full Member
  • *
  • Posts: 685
  • VM 2.0 in heavy testing
    • Buy my work
Re: JoomSEF plugin VM 1.1
« Reply #3 on: May 06, 2008, 21:42:12 pm »
Thanks, I couldn't configure to make JoomSEF working on a localhost, following the documentation.
I dont know how to do that, but I managed to install it on a demo live site.


korb

  • Quality&Testing Team
  • Full Member
  • *
  • Posts: 685
  • VM 2.0 in heavy testing
    • Buy my work
Re: JoomSEF plugin VM 1.1
« Reply #4 on: May 12, 2008, 14:10:05 pm »
hi Franta 25,
Please provide more info about this module. Help us make it better. We WANT to make it better.
Thanks

VirtueArt

  • Beginner
  • *
  • Posts: 4
    • Obchod-VirtueMart.cz
Re: JoomSEF plugin VM 1.1
« Reply #5 on: May 13, 2008, 01:38:32 am »
Plugin JoomSEF for VirtueMart 1.1
 
E-shop homepage  *example.com/eshop/* or .html according to the JoomSEF settings
editable in file: com_virtuemart.php
 
Shopping cart *example.com/cart/* or.html according to the JoomSEF settings
editable in file: com_virtuemart.php

Register form VirtueMart *example.com/registration/* or .html  according to the JoomSEF settings
editable in file: com_virtuemart.php

Category and product name  *example.com/category/product-name/* or .html according to the JoomSEF settings

tested in Joomla 1.5.3

VirtueMart 1.1.0 stable

ARTIO JoomSEF 3.0.2

Installation: open the JoomSEF administration and click on the "Install" button on the right side of the topmenu, plugin will be installed.

Plugin works correctly with VirtueMart module and with module vm product Categories, as well

Forgot password > user/reset.html change into JoomSEF administration
Forgot username > user/remind.html change into JoomSEF administration

I am sorry for the answer delay but I am very busy with the support of Virtuemart for czech and slovak users.

FavoriteU

  • Jr. Member
  • **
  • Posts: 119
Re: JoomSEF plugin VM 1.1
« Reply #6 on: May 13, 2008, 06:13:01 am »
Does search pagination work properly with your plugin and Artio?  I.E., if I search for "shovels" and there are 155 shovels, will the 1 2 3 or <PREV and NEXT> links work properly... every time.

That seems to be the only problem I can't get around with sh404SEF and VirtueMart 1.1 and Joomla 1.5.3.  If that works with your plugin, I'd almost have to switch.

Thanks.

juppjupp

  • Jr. Member
  • **
  • Posts: 88
Re: JoomSEF plugin VM 1.1
« Reply #7 on: May 13, 2008, 09:45:42 am »
Hi, does this version support child products?

korb

  • Quality&Testing Team
  • Full Member
  • *
  • Posts: 685
  • VM 2.0 in heavy testing
    • Buy my work
Re: JoomSEF plugin VM 1.1
« Reply #8 on: May 13, 2008, 11:30:54 am »
Hi, does this version support child products?

Try my demo live site and see for yourself.

korb

  • Quality&Testing Team
  • Full Member
  • *
  • Posts: 685
  • VM 2.0 in heavy testing
    • Buy my work
Re: JoomSEF plugin VM 1.1
« Reply #9 on: May 13, 2008, 11:40:32 am »
Does search pagination work properly with your plugin and Artio?  I.E., if I search for "shovels" and there are 155 shovels, will the 1 2 3 or <PREV and NEXT> links work properly... every time.

Pagination works properly, but no SEF URLs generated for the navigation buttons, because they are generated that instance. Artio cannot guess how to rewrite a link if it is not generated/found. So you have to edit the NEW SEF links yourself in the ArtioJoom SEF administration.
Carefull don't purge the good links like I did so many times.

As a general rule, ArtioJoomSEF generates good SEF URLs for products listed in all modules published in the left position.
And does not work with links generated by pagination, because it doesn't know about them, they are not generated by the sql query.
Hope this was helpfull
Ciao

korb

  • Quality&Testing Team
  • Full Member
  • *
  • Posts: 685
  • VM 2.0 in heavy testing
    • Buy my work
Re: JoomSEF plugin VM 1.1
« Reply #10 on: May 15, 2008, 21:03:07 pm »
This is a good solution people, come on, try it and give feedback.

korb

  • Quality&Testing Team
  • Full Member
  • *
  • Posts: 685
  • VM 2.0 in heavy testing
    • Buy my work
Re: JoomSEF plugin VM 1.1
« Reply #11 on: May 16, 2008, 08:58:14 am »
Hi Franta 25,
I have found an older version of this plugin made by someone else, and it has some minor differencies at the beggining of the coding and some additional code lines. This version is marked:
 * Tested on:
 * Joomla 1.0.13
 * ARTIO JoomSEF 2.2.4
 * VirtueMart 1.0.13a

Please see for yourself:
Code: [Select]
<?php
/**
 * SEF module for Joomla!
 *
 * @author      $Author: $
 * @copyright   
 * @package     JoomSEF for Virtuemart
 *
 * Tested on:
 * Joomla 1.0.13 
 * ARTIO JoomSEF 2.2.4
 * VirtueMart 1.0.13a 
 * 
 */


// Security check to ensure this file is being included by a parent file.
if (!defined('_VALID_MOS')) die('Direct Access to this location is not allowed.');

class 
sefext_com_virtuemart extends sef_joomsef
{
var $params;
    function 
create($string, &$vars) {
        
extract($vars);
// JF translate extension.
        
global $sefConfig$database$debug$debug_string$title;
        
$jfTranslate $sefConfig->translateNames ', id' '';

        
$title = array();

$this->params SEFTools::getExtParams('com_virtuemart');
$prefix $this->params->get('prefix''0');
if (!$page){
$title[] = $prefix;
$title[] = '/';
$title[] = "index";
} else {
$title[] = $prefix;
$title[] = '/';
}

if ($page == "shop.browse"){
//show category only

$this->build_cats($category_id);

$sql "SELECT category_name FROM #__vm_category WHERE category_id=".$category_id." LIMIT 1";
$database->setQuery($sql);

$category_name $database->loadResult();
$title[] = trim($category_name);
}


//view item
if ($page == "shop.product_details"){
//show category/itemname.html

$this->build_cats($category_id);

$sql "SELECT category_name FROM #__vm_category WHERE category_id=".$category_id." LIMIT 1";
$database->setQuery($sql);

$category_name $database->loadResult();
$title[] = trim($category_name);


//itemname
$sql "SELECT product_name FROM #__vm_product WHERE product_id=".$product_id." LIMIT 1";
$database->setQuery($sql);
$product_name $database->loadResult();
$title[] = $product_name;
}

//not used yet
//terms of service
/*
if ($page == "shop.product_details"){
//show terms of service
$title[] = "terms";
}
*/
if ($page == "shop.manufacturer_page"){
$sql "SELECT mf_name FROM #__vm_manufacturer WHERE manufacturer_id=".$manufacturer_id." LIMIT 1";
$database->setQuery($sql);
$manufacturer_name $database->loadResult();
$title[] = $manufacturer_name;
}

if ($page == "checkout.index"){
$title[] = "checkout";
}
if ($page == "account.order_details"){
$title[] = "orderdetails";
$title[] = "order-".$order_id;
}
//update address


if ($page == "account.billing"){
$title[] = "update-address";
}
//add new shipping address


if ($page == "account.shipto"){
$title[] = "add-new-shipping";
}


// Handle nonSef variables
        
$nonSefVars = array();
        if (isset(
$shipping_rate_id))       $nonSefVars['shipping_rate_id'] = $shipping_rate_id;
        if (isset(
$checkout_next_step))  $nonSefVars['checkout_next_step'] = $checkout_next_step;
        if (isset(
$ship_to_info_id))         $nonSefVars['ship_to_info_id'] = $ship_to_info_id;
if (isset($next_page))         $nonSefVars['next_page'] = $next_page;

    if (
count($title) > 0
$string sef_404::sefGetLocation($string$titlenull, @$limit, @$limitstart, @$lang$nonSefVars);


return $string;
}

function build_cats($cat){
global $sefConfig$database$debug$debug_string$title;
//look for a parent
//select parent id
//if parent id = 0, then no parent, so display only category
//else show parent+current category

$sql "SELECT category_parent_id FROM #__vm_category_xref WHERE category_child_id =".$cat." LIMIT 1";
$database->setQuery($sql);
$parent_cat_id $database->loadResult();
if ($parent_cat_id != 0) {
$sql "SELECT category_name FROM #__vm_category WHERE category_id=".$parent_cat_id." LIMIT 1";
$database->setQuery($sql);
$parent_name $database->loadResult();
$this->build_cats($parent_cat_id);
$title[] = trim($parent_name);
} else return;
}//build_cats()
}
?>

Now I wish that you Franta 25 or someone else could check it out, and give a feedback, or an advise:
-Could this module be used for VirtueMart 1.1?
-What those differencies do, or they supose to do?
-How to modify the code to give artio a better generation of SEF URLs?

Ciao

misteraph

  • Beginner
  • *
  • Posts: 6
Re: JoomSEF plugin VM 1.1
« Reply #12 on: May 16, 2008, 18:39:01 pm »
I use Virtuemart 1.1, JoomSEF 3.0.2 and Joomla 1.53 but the VirtueMart RSS feed of the different categories don't work, they send me on the homepage.

How can I solve my problem ?

Thanks

korb

  • Quality&Testing Team
  • Full Member
  • *
  • Posts: 685
  • VM 2.0 in heavy testing
    • Buy my work
Re: JoomSEF plugin VM 1.1
« Reply #13 on: May 16, 2008, 19:18:07 pm »
It works for me , maybe you enabled the product feed AFTER you installed Artio.

How to:
-Go to VM administration=>feed configuration,
-disable (+apply) and enable (+apply) the feed for products,
-go to front-end page and refresh
-should work, I mean Artio should generate a fresh link for feeds

Don forget to edit that fresh link in Edit SEF URLs, in Artio Configuration.

Ciao

korb

  • Quality&Testing Team
  • Full Member
  • *
  • Posts: 685
  • VM 2.0 in heavy testing
    • Buy my work
Re: JoomSEF plugin VM 1.1
« Reply #14 on: May 17, 2008, 00:40:28 am »
no other feed back?