1
fernis
Module rmms open products in popup
  • 2008/7/29 22:20

  • fernis

  • Just popping in

  • Posts: 1

  • Since: 2008/7/29


Good morning, I want the help of Mr (as) to the following question:

I'm using the module rmms mexico as XOOPS catalogue of products, but for a better view I would like to make the description of the products opened in a popup window, then used a code in theme.html java script and a function of the link template which displays the products.

So far everything worked baby, but now I do not know how to do and that's to make with the page that opens with a description of the product does not show the whole theme again, that is open only wanted a description of the product without the header and footer of XOOPS and also without the blocks.

If they want spying as was hitherto the following link:
http://www.hospedamania.com.br/portal/modules/rmms/

Click on the product to see the result.

In another forum achieve this response, which also did not work:

Hello fernis,
in your site, I noticed that you are calling the file prods.php ...

-- Then not mexermos the original file, copy the entire contents (code) prods.php and save the file with the name "prods2.php";

-- The editor and find the line 21 (probably) that contains the code: "include XOOPS_ROOT_PATH." / Header.php ";"

-- Well, comment that line, adding two bars before her "/" thus:

/ / include XOOPS_ROOT_PATH. "/ header.php";


-- At the end of the file, you vai find the line with the following code: "include XOOPS_ROOT_PATH." / Footer.php ";", she also comment, thus:

/ / include XOOPS_ROOT_PATH. "/ footer.php";


theoretically is to show only the template of the module, is working or not, account for us there ...

this is

Commenting on the lines suggested the following error occurs notified by the debug php:

Fatal error: Call to a member function assign() on a non-object in /home/h29668/public_html/portal/modules/rmms/prods2.php on line 52

The line is this:
$xoopsTpl->assign('producto',array('id'=>$row['id_prd'],'nombre'=>$row['nombre'],

The cod is this:

// $Id: prods.php 8 2006-12-12 06:47:55Z BitC3R0 $
// --------------------------------------------------------
// RMSOFT MiniShop
// Módulo para el manejo de catálogos en línea
// CopyRight © 2005 - 2006. Red México Soft
// Autor: BitC3R0
// http://www.redmexico.com.mx
// http://www.xoopsmexico.net
// --------------------------------------------------------
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License as
// published by the Free Software Foundation; either version 2 of
// the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public
// License along with this program; if not, write to the Free
// Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,
// MA 02111-1307 USA
// --------------------------------------------------------
// @copyright: 2006 - 2007 Red México Soft
// $Author: BitC3R0 $
// @package: RMSOFT MiniShop

include("../../mainfile.php");
//include XOOPS_ROOT_PATH."/header.php";
include_once('include/functions.php');
$myts =& MyTextSanitizer::getInstance();
$xoopsOption['template_main'] = 'rmms_productos.html'; //Plantilla para esta página

$idp = $_GET['idp'];
if ($idp<=0){
redirect_header('index.php', 2, _MC_PRODID_MISSING);
die();
}

$result = $xoopsDB->query("SELECT * FROM ".$xoopsDB->prefix("rmms_productos")." WHERE id_prd='$idp'");
$num = $xoopsDB->getRowsNum($result);
if ($num <= 0){
redirect_header("index.php", 1, _MC_RMCAT_PRODNOTFOUND);
die();
}
$row = $xoopsDB->fetchArray($result);
$img = XOOPS_URL."/modules/".$xoopsModule->dirname()."/uploads/".$row['img'];
$precio = number_format($row['precio'], $xoopsModuleConfig['decimales'], $xoopsModuleConfig['decsep'], $xoopsModuleConfig['milsep']);
$precio = sprintf($xoopsModuleConfig['curformat'], $precio);
$xoopsTpl->assign('producto',array('id'=>$row['id_prd'],'nombre'=>$row['nombre'],
'codigo'=>$row['codigo'],'minimo'=>$row['minimo'],'medidas'=>$row['medidas'],
'cantidad'=>$row['cantidad'],'peso'=>sprintf($xoopsModuleConfig['formatpeso'], $row['peso']),'img'=>$img,'precio'=>$precio,
'desc'=>$myts->makeTareaData4Show($row['longdesc']),'images'=>rmmsGetImages($row['id_prd'])));

// Cargamos las opciones de lenguaje
$xoopsTpl->assign('catalog_name',$xoopsModuleConfig['modtitle']);
$xoopsTpl->assign('lng_prod_title', sprintf(_MC_RMMS_PRODDETAILS, $row['nombre']));
$xoopsTpl->assign('max_width', $xoopsModuleConfig['imgcategow']);
$xoopsTpl->assign('catalog_cols',$xoopsModuleConfig['cols']);
$xoopsTpl->assign('lng_recent', _MC_RECENT_PRODUCTS);
$xoopsTpl->assign('max_cols', $xoopsModuleConfig['cols']);
$xoopsTpl->assign('col_width', (int)(100/$xoopsModuleConfig['cols']));
$xoopsTpl->assign('lng_precio', _MC_CATEGO_PRICE);
$xoopsTpl->assign('lng_prodxpage', _MC_RMCAT_PRODXPAG);
$xoopsTpl->assign('lang_go', _MC_RMCAT_GO);
$xoopsTpl->assign('lng_goto', _MC_RMCAT_GOTO);

$xoopsTpl->assign('lng_codigo',_MC_PROD_CODE);
$xoopsTpl->assign('lng_precio',_MC_PROD_PRICE);
$xoopsTpl->assign('lng_cantidad',_MC_PROD_CANTIDAD);
$xoopsTpl->assign('lng_medidas',_MC_PROD_SIZE);
$xoopsTpl->assign('lng_peso', _MC_PROD_PESO);
$xoopsTpl->assign('lng_minimo', _MC_PROD_MINIMO);
$xoopsTpl->assign('lng_desc', _MC_PROD_DESCRIPTION);
$xoopsTpl->assign('lng_moreinfo',_MC_PROD_MOREINFO);
$xoopsTpl->assign('lang_images', _MC_PROD_IMAGES);
$xoopsTpl->assign('viewimg_width', $xoopsModuleConfig['imgwidth'] + 50);
$xoopsTpl->assign('viewimg_height', $xoopsModuleConfig['imgheight'] + 50);

// MOstramos o no el precio
$mc =& $xoopsModuleConfig;
$xoopsTpl->assign('show_price', ($mc['show_price']==0) ? 1 : (is_object($xoopsUser) ? 1 : 0));
$xoopsTpl->assign('tax_legend', ($mc['taxincluded']==1) ? _MC_PROD_TAXYES : _MC_PROD_TAXNO);

MakeNavSearch();
$xoopsTpl->assign('rmsoft_footer', makeFoot());
//include XOOPS_ROOT_PATH."/footer.php";
?>


Tankyou!

Login

Who's Online

457 user(s) are online (135 user(s) are browsing Support Forums)


Members: 0


Guests: 457


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Aug 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits