fix-wordpress-virtuemart-latest-products-module

Fix WordPress Virtuemart Latest Products module

Let’s say you have on homepage a banner and bellow it the Virtuemart latest products module (mod_virtuemart_latestprod). If you click on a product the opened page will contain the banner, the module and then the product details. To make the product details page display without the banner and the module, do the following changes.

Go to admin\comp\com_virtuemart\classes\ps_product.php and replace the line:

$product_link = $sess->url($mm_action_url. "index.php" . $url);

with:

$product_link = $mm_action_url. "index.php" . 
                                $url. '&option=com_virtuemart';

And finally, in admin\comp\com_virtuemart\html\shop.product_details.php update the statement:

$next_product_url = $sess->url( $_SERVER['PHP_SELF'].'?'.$url_parameters );

with:

$next_product_url = $_SERVER['PHP_SELF'].'?'.
                    $url_parameters.'&option=com_virtuemart';
else {
  /*$next_product_url = str_replace("index2",
                          "index",
                          $sess->url( $url_parameters ));*/
  $next_product_url = str_replace("index2",
                         "index",
                         'index.php?'.$url_parameters.
                         '&option=com_virtuemart');
}
//............
if( $pop == 1 ) {
  $previous_product_url = $_SERVER['PHP_SELF'].'?'.
                          $url_parameters.'&option=com_virtuemart';
  //$previous_product_url = $sess->url( $_SERVER['PHP_SELF'].
  //                          ?'.$url_parameters );
}
 
else {
  //$previous_product_url = str_replace("index2",
  //                         "index",
  //                          $sess->url( $url_parameters ));
  $previous_product_url = str_replace("index2",
                              "index",
                             'index.php?'.$url_parameters.
                             '&option=com_virtuemart');
}
0 0 votes
Article Rating
email-newsletter

Dev'Letter

Professional opinion about Web Development Techniques, Tools & Productivity.
Only once a month!

Any suggestion on what to write next time ? Submit now
Subscribe
Notify of
guest
0 Comments
oldest
newest most voted
Inline Feedbacks
View all comments

Related Posts