Monday, February 10, 2014

Virtuemart 2 - How to remove SEO Suffix from Product Details aka -detail

If your using Virtuemart 2+ it requires you to use a -detail or .html  as a suffix for product pages.  Which really sucks if you are use to using SH404sef or some other plugin that will correctly re-route your URLs and make them nice. SH404sef no longer works with Virtuemart thus we are stuck with the default router. Here is how I fixed the router.php (included at the bottom for your downloading pleasuere)

Since there is not a plugin I dove into the router.php and made some simple quick fixes to ignore the SEO_Suffix and load products.

Around line 633
Code looked for categories in the last segment

$vars['virtuemart_category_id'] = $helper->getCategoryId (end($segments) ,$helper->activeMenu->virtuemart_category_id);
    $vars['view'] = 'category' ;

Changed to
$product = $helper->getProductId($segments ,$helper->activeMenu->virtuemart_category_id);
    $vars['virtuemart_product_id'] = $product['virtuemart_product_id'];
   $vars['virtuemart_category_id'] = $product['virtuemart_category_id'];

//codepyro - removed suffix from router 
  //check if the last segment is a product. 
  //if so then load the product details page instead of category 
   $vars['view'] = 'productdetails';
   $vars['virtuemart_category_id'] = $helper->getCategoryId (end($segments) ,$helper->activeMenu->virtuemart_category_id);
   $vars['view'] = 'category' ;

Around line 943
//codepyro hack to remove suffix  
  if($this->seo_sufix_size >0)
   $productName =  substr($productName, 0, -(int)$this->seo_sufix_size );

You can download the updated router.php for Virtuemart 2.0.26d  

upload and replace the file

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.

Stumble Upon CodePyro


Anonymous said...

Thank u for very helpful post!:) Can u help me a bit?
I need a suffix word, but I would like this order:
#suffix word - product title

I would be very grateful if you could help, thank you!

Josh Tischer :: CodePyro said...

Can you explain further what you are looking for? Is it something like

Josh Tischer :: CodePyro said...

Just got another comment and it appears to have been deleted. If you need help fixing this on your site, let me know.

Unknown said...

Hi, Josh

Thanks for your fix, but it's doesn't work for Joomla 2.5.19 VM 2.0.26

I'll be very glad for your help

Josh Tischer :: CodePyro said...

send me your router file i would be happy to take a look. info at

Anonymous said...

Thenk you form Russia.

Unknown said...

Hi, Josh
Thank you for help!!!
Your router.php is what I was looking for.
Best regards

Anonymous said...

hi, for J 2.5.20. no work :-( sorry can you upgrade it? thanks

Anonymous said...

this solution does not work on Virtuemart 2.6

Unknown said...

Any company claiming to be an affordable Dallas Affordable SEO Services solution included, really should be adding value to your company

Unknown said...

very unique blog

Affordable Search Engine Optimization

Anonymous said...

Hi Josh
Thank you for this hint...
But I'm now migrating to Virtuemart 3.x, and this hack seems not working anymore: do you have some suggestions to get it working again on new 3.x VM series? Thank you in advance for any help.

Unknown said...

We provide white-hat SEO services that deliver long-term results to companies in the Dallas/Fort Worth area. Contact us now for a FREE SEO site audit affordable SEO Dallas.

Unknown said...

You could have increased the very important concern.. thank you intended for revealing.. my spouse and i should browse much more provide problems with this weblog.. maintain putting up.. Web optimization Baclinks  Blog Commenting Service And Seo Services.

markson said...

Awesome article, it was exceptionally helpful! I simply began in this and I'm becoming more acquainted with it better! Cheers, keep doing awesome! dallas seo

Unknown said...

Wonderful!! this is really one of the most beneficial blogs I’ve ever browsed on this subject. I am very glad to read such a great blog and thank you for sharing this good info with us.

Seo said...

Hello there, My spouse and i discover scanning this article a new enjoyment. It is quite very helpful and useful and extremely considerably looking forward to examining more of your do the job. All In One Seo Backlinks To Rank You In 5$

Richard C. Lambert said...

Which really sucks if you are use to using SH404sef or some other plugin that will correctly re-route your URLs and make them nice seo

Adiba Alam said...

Real part of the total populace is getting to web for host of purposes. Be that as it may, of these reason, the need to accumulate more data holds the need. said...

I love this blog!! The flash up the top is awesome!!

mayazoe said...

How do you promote your business with backlinks? There are of course several ways to promote your business and promoting it with backlinks is one of the very best.
link building services

devidmiller5060 said...

Technical writing blog is a virtual content on any technical concept, including, engineering, aeronautics, marine, geographical surveys, oil explorations, advertising, media, sound or for that matter anything which has a scientific relation.
fashion school

Anna Schafer said...

I couldn't have asked for a simpler read with great tips like this... Thanks! What do Internet Marketing services include

Owais Raza said...

If you have ever dreamed of working on Wall Street, then you might be an ideal candidate for a job with an SEO agency. That may seem like quite a stretch to go from stocks to search engine optimization, but both industries are quite chaotic and involve a lot of risk. link of my website

Unknown said...

Web Honkers is Canada’s leading digital marketing firm, with top rated SEO Experts who are committed to our client’s success with offices in Toronto, Canada and in London, UK.
SEO Company

Anonymous said...

It’s amazing to visit again n again coming to your blogs the superb effort is here

Roman lesnar said...
This comment has been removed by the author.
Roman lesnar said...

I'm not shure, because I never used sh404sef with Joomla 2.x. But my assumption is that the Joomla redirect manager will not catch a 404 page not found error, because VirtueMart will probably automatically redirect to your homepage. However, it should be possible to add the old url and the new url manually into the Joomla redirect manager. If you click on 'New' in the Joomla redirect Manager, a form with old url/new url shows up.
blog comments services

Robert said...

Thanks for sharing this quality information with us. I really enjoyed reading. Will surely going to share this URL with my friends.

Owais Raza said...

To have a brilliant start in your online business, it is very important to have the assistance of an SEO Company. For getting tied with the best SEO Company you can have a small research about the SEO services and then craft your pick. Do you think the task simple as it is? No, it is not. To choose a dependable Company is a tiring task.

Owais Raza said...

Planning to get SEO Services to make out your website and help you earn and market! The business is not going online. With the help of a website even small businesses are getting a chance to market their product online and sale. josh

Unknown said...

You make so many great points here that I read your article a couple of times. Your views are in accordance with my own for the most part. This is great content for your readers. High Trust Flow

Unknown said...

What?s Taking place i am new to this, I stumbled upon this I’ve discovered It positively helpful and it has aided me out loads. I hope to contribute & assist other customers like its aided me. Good job. blog marketing digital

Unknown said...

Thanks a ton for this, I am greatful for the info blog marketing digital

Unknown said...

I conceive you have noted some very interesting details , regards for the post. blog de seo

Robert said...

useful information on topics that plenty are interested on for this wonderful post.Admiring the time and effort you put into your b!.. best seo company in nepal

James jones said...

I found your site thanks a Google search. You have done a fine work. And it’s really nice to read you. I’ll definitely be back! Neo E-Marketing

mtom said...

I am curious to find out what blog system you happen to be working with? I’m experiencing some small security problems with my latest site and I would like to find something more secure. Do you have any recommendations? harga emas

Anna Schafer said...

An interesting dialogue is price comment. I feel that it is best to write more on this matter, it may not be a taboo topic however usually individuals are not enough to talk on such topics. To the next. Cheers. buy backlinks

Jessica Schweizer said...

Your article has piqued a lot of positive interest. I can see why since you have done such a good job of making it interesting. internet marketing

Tree removal near me said...

You have written a good article.
Tree removal near me

electrician red deer said...

This is a good post. This post gives truly quality information. I’m definitely going to look into it. Keep up the good work.

Pest Control Red Deer said...

Wonderful illustrated information. I thank you about that. No doubt it will be very useful for my future projects. Would like to see some other posts on the same subject! said...

Great Information sharing .. I am very happy to read this article .. thanks for giving us go through info. Fantastic nice. I appreciate this post. said...

Valuable information and insights here. I've seen so many articles, but definitely, this has been the best I’ve read! 

Painters Red Deer said...

Wow! It's a really great experience sharing with us. I like your post, it's really interesting.

mtom said...

Just a smiling visitant here to share the love btw outstanding style . email marketing

Furnace Cleaning Red Deer said...

Valuable information and insights here. I've seen so many articles, but definitely, this has been the best I’ve read!
Furnace Cleaning Red Deer

Home remodeling in Riverside said...

Nice blog! I've seen so many articles, but definitely this has been the best I've read! I like your post, it's really interesting.
Home remodeling in Riverside

Home Remodeling Riverside said...

Valuable information and insights here. I've seen so many articles, but definitely, this has been the best I’ve read!
Home Remodeling Riverside

Electrican Regina said...

I really enjoy reading all of your work.Great post and right to the point. You rock and please keep up the good work!
Electrician Regina

Massage Therapy Red Deer said...

Great post and right to the point.I really enjoy reading all of your work.
Massage Therapy Red Deer

brittanymlemay said...

Nice post. I was checking constantly this blog and I’m impressed! Extremely useful info specially the last part I care for such information a lot. I was seeking this certain info for a long time. Thank you and good luck. seo link building

Furnace Repair Regina Sk said...

Posts are great. Thank you for sharing this ideas. Keep up the good work!
Furnace Repair Regina Sk said...

Posts are great. Thank you for sharing this ideas. This post gives truly quality information.

Robin said...

scope after bsc
courses after bcom

bachelor of law

llb academic

post graduate diploma in computer application

Masonry Edmonton Contractors said...

Thanks for sharing this quality information with us. Masonry Edmonton Contractors

Towing-Las-Vegas-NV said...

A well written and informative blog post.


petterson said...

Great information you shared through this blog. Keep it up and best of luck for your future blogs and posts
cheap dissertation writing service uk

Raswo said...

Toko Otomotif : alat teknik, perkakas bengkel, alat safety, alat ukur, mesin perkakas, scanner mobil, alat servis motor, alat cuci mobil, mesin las.

Swetha K said...

I simply go through your article, which a very interesting article looking for more updates. Thank you for sharing.
Oracle Training in Chennai
Oracle Training
Social Media Marketing Courses in Chennai
Tableau Training in Chennai
Primavera Training in Chennai
Unix Training in Chennai
Job Openings in Chennai
Pega Training in Chennai
Oracle DBA Training in Chennai
Power BI Training in Chennai
Oracle Training in Velachery

andriya said...

Wonderful blog with great piece of information. Regards to your effort. Keep sharing more such blogs. Looking forward to learn more from you.
AWS Training in Chennai
AWS Certification in Chennai
Best AWS Training in Chennai
Cloud Computing Training in Chennai
RPA Training in Chennai
Data Science Training in Chennai
AWS training in Guindy
AWS training in Vadapalani
AWS Training in Anna nagar
AWS Training in Velachery

The India said...

PPC Service in Delhi
PPC Companies in Delhi
SEO Company in Delhi
SEO Company in Delhi NCR
SMO Company in Delhi
SMO Company in India

Reshma said...

Get inspired by your blog. Keep doing like this....
Tally Course in Chennai
Tally Training in Chennai
Tally training in coimbatore
Tally course in madurai
Tally Course in Hyderabad
Tally Classes in Chennai
Tally classes in coimbatore
Tally coaching centre in coimbatore
Tally training institute in coimbatore
Software Testing Training in Chennai
German Classes in Bangalore

shalini said...

Thanks for sharing this useful information..
spoken english classes in bangalore
Spoken English Classes in Chennai
spoken english class in coimbatore
spoken english class in madurai
Data Science Courses in Bangalore
devops training in bangalore
English Coaching Classes in Chennai
spoken english course in coimbatore
spoken english classes in btm
spoken english classes in marathahalli

Eliza said...

Great knowledge, do anyone mind merely reference back to it Sökmotoroptimering Kungsbacka

Backpage-Cincinnati said...

it's really great to know about how to remove SEO suffix from product details. I have found out that this article have very important details. Though anyone want to know more about classified like Backpage Charleston then please visit

codeaze said...

Hmm it appears like your website ate my first comment (it was super long) so I guess I'll just sum it up what I had written and say, I'm thoroughly enjoying your blog. I as well am an aspiring blog blogger but I'm still new to everything. Do you have any points for novice blog writers? I'd certainly appreciate it. branding agency

dhishageetha said...

This Blog is really informative!! keep update more about this...
Aviation Academy in Chennai
Air Hostess Training in Chennai
Airport Management Courses in Chennai
Best Aviation Academy in Chennai
Ground Staff Training in Chennai
Air Hostess Academy in Chennai
Airport Management Training in Chennai
Airport Ground Staff Training Courses in Chennai

Eliza Beth said...

This is actually the kind of information I have been trying to find. Thank you for writing this information. consultor de marketing digital

joseluis said...

Escort Madrid
Escorts Madrid
Putas Madrid
Madrid Escorts
Madrid Escort

SEO optimization said...

I found your site thanks a Google search. You have done a fine work. And it’s really nice to read you.

viktoria said...
This comment has been removed by the author.
viktoria said...

Female Escorts in United States without fake, many reviews, only real profiles Visit here: - Escorts usa

john said...

IEEE Final Year projects Project Centers in Chennai are consistently sought after. Final Year Students Projects take a shot at them to improve their aptitudes. IEEE Final Year project centers ground for all fragments of CSE & IT engineers hoping to assemble.Final Year Projects for CSE

Spring Framework has already made serious inroads as an integrated technology stack for building user-facing applications. Spring Framework Corporate TRaining .

Specifically, Spring Framework provides various tasks are geared around preparing data for further analysis and visualization. Spring Training in Chennai

The Angular Training covers a wide range of topics including Angular Directives, Angular Services, and Angular programmability.Angular Training

Suryaprakash said...

I found some useful information from this article, thanks for sharing the useful information.
devops practices
uses of java programming language
what is campaign in google adwords
is web design a good career
seo executive interview questions

DSP SEO said...

I am glad to read your blog. your blog is really awesome and cool. your blog is really great and cool. thanks for sharing the nice and cool post 먹튀안전사이트

DSP SEO said...

Nice post mate, keep up the great work, just shared this with my friendz 먹튀사이트

Puertas de interior said...

nice job

Jeff L. Ventura said...

You know your projects stand out of the herd. There is something special about them. It seems to me all of them are really brilliant! SEO Service on Fiverr

Flora said...

Good article. I liked to read your article, valuable information.
use of python
most paid programming language
benefits of learning python
hadoop career
java interview questions for experienced
selenium interview questions and answers for experienced

Aishwariya said...

i am glad to discover this page : i have to thank you for the time i spent on this especially great reading !! i really liked each part and also bookmarked you for new information on your site. Primavera P6 Certification Training in Chennai | Primavera Training in India

nayar said...

Amazing post.Thanks for sharing.........
IELTS Coaching in Hyderabad
IELTS Coaching in Bangalore
IELTS Coaching in Pune
IELTS Coaching in Gurgaon
IELTS Coaching in Delhi

totoseven@com said...

I will bookmark this site and come to it from time to time. Your writing has been of great help to me.

Richard C. Lambert said...

This article gives the light in which we can observe the reality. This is very nice one and gives indepth information. Thanks for this nice article.

Anonymous said...

I would also motivate just about every person to save this web page for any favorite assistance to assist posted the appearance.

poojasharma said...

Webgross offers outstanding SEO services Delhi that mould themselves according to the traverse needs of audiences.
SEO Services Delhi

Hahaha said...

Thank you for any other informative blog. Where else may just I am getting that kind of information written in such a perfect method? I have a mission that I’m simply now working on, and I have been on the glance out for such info. 안전놀이터추천

Post a Comment