News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

Virtuemart Registration not working when joomla sef and virtuemart seo enabled

Started by Nagaraj, November 13, 2013, 12:55:04 PM

Previous topic - Next topic

Nagaraj

Hi ALL,

I am using virtuemart 2.0.24 and joomla 2.5.11, seo disable option is unchecked in Seo settings of virtuemart configuration and joomla sef enabled in global configuration in this case virtuemart registrion  page not working. When I disable joomla sef or virtuemart seo disabled option checked registration page working fine but virtuemart pagination not working. Please suggest the solution how to fix this issue.


Thanks
Nagaraj

sadrem

p.s. Do not forget to change message icon to Solved.

Nagaraj

Thanks for quick reply

I created two menu items with the url(index.php?option=com_virtuemart&view=user&layout=edit) one for before login showing as create account and another is after login My Account details. I followed the following procedure for creating menu items.

1. Created a new group in Users ==> Groups. Name it "Guests". Select Parent Group as "Public" and save the changes.
2. Go to Users ==> User Manager ==> Click on the "Options" icon at top right ==> Click on "Component" tab & Select "Guest" as the "Guest User Group" option and save the changes.
3. Create a new ACL in Users ==> Acces Levels by clicking on the "New" icon. Name it as "Guest Users" and check the option "Guests" only under "User Groups Having Viewing Access" Section and Save the changes.
4. Go to Site ==> Global Configuration and select "DEFAULT ACCESS LEVEL" option as "GUEST USERS".

For more details regarding the above instructions, here is the forum link: http://forum.joomla.org/viewtopic.php?f=624&t=692224

Search Engine Friendly URLs enabled all remaining disabled in joomla global configuration
PHP version: 5.3.23
MySQL version: 5.5.32

sadrem

Can You provide link to Your site?
Do You use "seo access rewrite" option?
Have You installed any registration or redirect plugin?
Turn on Vm debug to all , Turn on php error display in joomla config.
To resolve need to see the problem.
p.s. Do not forget to change message icon to Solved.

Nagaraj

Thanks

For providing site url we need to take approval from Client. The problem is when SEO disabled option uncheck and jooml sef enabled the registration form action url action="<?php echo JRoute::_('index.php?view=user',$this->useXHTML,$this->useSSL) ?>"  is taking alias name of my account url /index.php/my-account so here my-account page display only after user login. so before user login submitting form to my-account page it redirecting to login page. How to override this action url  to /index.php/create-account instead of /index.php/pinsart-my-account

sadrem

OK
This how seo works:
If You build several menu items with the same type and different aliases. Than JRoute will create link to last item created.
Exmaple:
1) You have create menu item index.php?option=com_virtuemart&view=user&layout=edit with alias: create-account
2) after You have create menu item index.php?option=com_virtuemart&view=user&layout=edit with alias: my-account

now every call to JRoute will generate last created item alias , in our example  my-account

So what You should to do:
1) delete 2 menu items index.php?option=com_virtuemart&view=user&layout=edit that You have created
2) create menu item index.php?option=com_virtuemart&view=user&layout=edit  with alias: my-account
3) create menu item index.php?option=com_virtuemart&view=user&layout=edit  with alias: create-account
4) change them ordering if necessary :)
p.s. Do not forget to change message icon to Solved.

Nagaraj

Thanks you sadrem, but in my site I am using two templates for this I created total four menu items with same url.

  • Create Account (alias: create-account)
  • Create Account (alias: pinsart-create-account)
  • My Account (alias: my-account)
  • My Account (alias: pinsart-my-account)

Then here how to fix this issue. As per you reply registration may work but in this case template switching may occurring. How to overcome this template switching issue.

sadrem

WOW
I can't figure out what do You want to achieve and what is the logic . I think also there is more elegant solution for Your purpose.
But Technically as I understand You want to :
1) if tempale A + unregistered user go to alias: create-account
2) if tempate A + registered user go to alias: my-account
3) if tempale B + unregistered user go to alias:  pinsart-create-account
4) if tempate B + registered user go to alias:  pinsart-my-account

if it's correct than most fast solution is to override components\com_virtuemart\views\user\tmpl\edit.php  for every template + some hardcode
something like this

$menu_link='index.php?Itemid=xxx';  where xxx is menu item id for registered with alias: my-account

if($this->userDetails->virtuemart_user_id==0) // unregistered user
{
   $menu_link='index.php?Itemid=xxx';  where xxx is menu item id for unregistered with alias: create-account
}

and in form

JRoute::_($menu_link,$this->useXHTML,$this->useSSL)
p.s. Do not forget to change message icon to Solved.

Nagaraj

Thank you sadrem. It seems working. But here my site is multi template and multilingual. How can I manage the urls with changing every url by passing Itemid. The template switching problem occurring in so many areas. In product category page, product detail page, check out page and add to cart page all these areas problem occurring.
Note: The some of the above virtuemart issues solved by checking the option in "SEO Disabled" under "SEO" tab of virtuemart configuration. But pagination not working in this scenario.

Is this correct solution? Is any standard solution for this with or with out changing core files. Please advice. Because as per your previous replys if we pass same url in JRoute::_() it will take recent Itemid. How can we overcome this problem. Is any overriding method? We are facing the above problem in both virtuemart and  joomla default menu items also.   

sadrem

Hi,
As I mentioned above I can't figure out what do You want to achieve.
Generally creating menu items that points to the same location is not good practice for joomla.
You may create the same menu item for different  languages but not 2 identical items for the same language.
Another solution You may try  using "menu alias type" for  alias: my-account
If You can provide test link to site and describe the goal probably I can suggest You another more good solution.
You send me link to pm.
Regards
p.s. Do not forget to change message icon to Solved.

Nagaraj

Here we change code as of you
$menu_link='index.php?Itemid=xxx';  where xxx is menu item id for registered with alias: my-account
if($this->userDetails->virtuemart_user_id==0) // unregistered user
{
   $menu_link='index.php?Itemid=xxx';  where xxx is menu item id for unregistered with alias: create-account
}
in create account form action the url is like "/index.php/create-account/view/user" when user click on registration button user success fully adding but after registration the page redirecting to same url "/index.php/create-account/view/user" so here this url is not accessible to registered users because we assigned to "Guest Users" group. So it displaying 403 error page. please suggest.