Author Topic: View/Print a complete Price List  (Read 273026 times)

jolival

  • Beginner
  • *
  • Posts: 30
  • www.redespt.com
    • www.redespt.com
Re: View/Print a complete Price List
« Reply #135 on: August 08, 2008, 13:33:25 pm »
New utf-8 portuguese version with a better translation.


Solution to solve the utf-8 problem generating the pdf file:

Make that change in the file lib/ezpdf/class.pdf.php in the line 2184(+/-)

function addText($x,$y,$size,$text,$angle=0,$wordSpaceAdjust=0){
  if (!$this->numFonts){$this->selectFont('./fonts/Helvetica');}


replace TO:


function addText($x,$y,$size,$text,$angle=0,$wordSpaceAdjust=0){
   $text = utf8_decode($text);
  if (!$this->numFonts){$this->selectFont('./fonts/Helvetica');}


You only need to include that line in the function
$text = utf8_decode($text);

Best Regards
jolival



[attachment cleanup by admin]

X_Burner

  • Beginner
  • *
  • Posts: 11
Re: View/Print a complete Price List
« Reply #136 on: August 15, 2008, 11:01:14 am »
Hi !

Very nice addon.
Thanks pisu.

Did anyone figured out how to implement a thumbnail column ?

Greetz

X_Burner

ikkes

  • Beginner
  • *
  • Posts: 20
Re: View/Print a complete Price List
« Reply #137 on: August 21, 2008, 08:40:42 am »
X_Burner, i am also searching for a way to do this! ;)

X_Burner

  • Beginner
  • *
  • Posts: 11
Re: View/Print a complete Price List
« Reply #138 on: August 21, 2008, 08:50:30 am »
May be we should start to collect a donation for a programmer to fix this ?

I would start with 50$ ;)

Greetz

X_Burner

X_Burner

  • Beginner
  • *
  • Posts: 11
Re: View/Print a complete Price List
« Reply #139 on: August 28, 2008, 13:21:26 pm »
Nothing ?

X_Burner

Aryentain

  • Beginner
  • *
  • Posts: 4
Re: View/Print a complete Price List
« Reply #140 on: August 31, 2008, 20:55:43 pm »
Fantastic, this tool is really usefull! Thank you very much

RSprinkel

  • Beginner
  • *
  • Posts: 6
Re: View/Print a complete Price List
« Reply #141 on: September 12, 2008, 22:15:10 pm »
Hi all,

Maybe I am missing something but I have tried to download this today 4 times into different directories on my system and I am only showing 1 file in the archive which is labeled as VM_PriceList_20080415.  Even when I extract the archive there is no folder, just one file.

Is there supposed to be more to it?

Thanks much.

cnws

  • Beginner
  • *
  • Posts: 1
Re: View/Print a complete Price List
« Reply #142 on: September 15, 2008, 11:13:33 am »
Hi There, is it possible to get sh404SEF working?
sh404SEF is working great through the website/webshop, but the urls that come with this pricelist are not modified/rewritten.

Is there a workarround or has someone figured out how to get the seo friendly urls with this great tool?


korb

  • Quality&Testing Team
  • Full Member
  • *
  • Posts: 685
  • VM 2.0 in heavy testing
    • Buy my work
Re: View/Print a complete Price List
« Reply #143 on: September 15, 2008, 15:17:47 pm »
Yes... open components/com_sh404SEF/sef_ext/com_virtuemart.php plugin and add above 
Code: [Select]
case 'shop.browse':
this code

Code: [Select]
case 'shop.pricelist': // V 1.4.8 by danny
                  if ($sefConfig->shVmInsertShopName) $title[] = $shShopName;
                  if ($shVmCChk) $title[] = 'cookie';
  $title[] =  $sh_LANG[$shLangIso]['_PHPSHOP_PRICELIST'];
  break;

now open administrator/components/com_sh404SEF/language/plugins/com_virtuemart.php and add (and translate to your language) the following string:

Code: [Select]
$sh_LANG['en']['_PHPSHOP_PRICELIST'] = 'Price list';

This should build SEF URLs for pricelist...well not in all it's cases, because you cannot remove javascript code from link, I mean I tried but I think it brings no SEO value for print and pdf, because the real URL is shown in browser only when hover above links.

Danny

X_Burner

  • Beginner
  • *
  • Posts: 11
Re: View/Print a complete Price List
« Reply #144 on: September 15, 2008, 15:25:31 pm »
oi !

Got anybody news about a list with thumbs ?

Greetz

X_Burner

trevorsm

  • Beginner
  • *
  • Posts: 27
Re: View/Print a complete Price List
« Reply #145 on: December 01, 2008, 16:49:35 pm »
I have have modified it slightly to optionally include thumbs and long descriptions but I have not managed to include the thumbs in the pdf version yet!
You can try it here: http://www.subaqua-products.co.uk/cms/index.php?option=com_virtuemart&page=shop.pricelist&Itemid=54

jolival

  • Beginner
  • *
  • Posts: 30
  • www.redespt.com
    • www.redespt.com
Re: View/Print a complete Price List
« Reply #146 on: December 02, 2008, 10:53:49 am »
I have have modified it slightly to optionally include thumbs and long descriptions but I have not managed to include the thumbs in the pdf version yet!
You can try it here: http://www.subaqua-products.co.uk/cms/index.php?option=com_virtuemart&page=shop.pricelist&Itemid=54

where are the files to download and test...

regards,
jolival

trevorsm

  • Beginner
  • *
  • Posts: 27
Re: View/Print a complete Price List
« Reply #147 on: December 02, 2008, 11:25:10 am »
Quote
where are the files to download and test...

Here is the code I used. Sorry but I have hard coded the language elements as it was a quick modification :-[

Code: [Select]
<?php
// Price List addon by thepisu -- www.thepisu.tk
// Forum discussion: http://forum.virtuemart.net/index.php?topic=33101.0

defined'_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' ); 
mm_showMyFileName__FILE__ );

// set this option with "true" if you want to give only registered customers access to the price list
$onlyregistered false;

// set this option with "true" if you want to display a column with the manufacturer name
$displaymanuf false;

// set this option with "true" if you want link on product names
$productlinks true;

// set this option with "true" if you want a column with the discount price
$discountcolumn false;

// Do we need to include the thumb and full details
$display mosGetParam$_GET'display''' );
if (
$display == "all") {
 $showthumb true;
 $showdetail true;
} else {
 $showthumb false;
 $showdetail false;
}

// load the Language File
if (file_existsADMINPATH'html/pricelist/languages/'.$mosConfig_lang.'.php' ))
require_once( ADMINPATH'html/pricelist/languages/'.$mosConfig_lang.'.php' );
else
require_once( ADMINPATH'html/pricelist/languages/english.php' );
$GLOBALS['VMPL_LANG'] =& new vmplLanguage();

global 
$mainframe$mosConfig_locale$pdf$VMPL_LANG;
setlocale(LC_TIME,$mosConfig_locale);

function 
show_category($category_id,$category_name,$mode,$displaymanuf,$productlinks,$discountcolumn$showthumb$showdetail) {
global $CURRENCY_DISPLAY$pdf$VMPL_LANG;
$auth $_SESSION['auth'];
$dbp = new ps_DB;
$dbp1 = new ps_DB;
$dbp2 = new ps_DB;
$ps_product = new ps_product;
if ($mode=="pdf") {
$table = array();
} else {
echo "<table width='100%' border='0' style='border:1px solid black;'>";
}
$query  "SELECT * FROM #__{vm}_product p INNER JOIN #__{vm}_product_category_xref x ";
$query .= "ON (p.product_id=x.product_id) WHERE x.category_id=" $category_id;
$query .= " AND p.product_publish='Y' ORDER BY p.product_sku";
$dbp->query($query);
if ($dbp->num_rows()>0) {
if ($auth["show_price_including_tax"] == 1) {
$inctax '<br/><em>' $VMPL_LANG->_INCLUDING_TAX '</em>';
$inctaxpdf '
<i>' 
$VMPL_LANG->_INCLUDING_TAX '</i>';
} else {
$inctax '';
$inctaxpdf '';
}
if ($mode=="pdf") {
$headers = array();
$cols = array();
$headers['product_sku'] = '<b>' $VMPL_LANG->_PRODUCT_SKU '</b>';
$cols['product_sku']=array('width'=>75);
if ($displaymanuf) {
$headers['product_manuf'] = '<b>' $VMPL_LANG->_PRODUCT_MANUF '</b>';
$cols['product_manuf']=array('width'=>65);
if ($discountcolumn) {
$cols['product_name']=array('width'=>300);
} else {
$cols['product_name']=array('width'=>355);
}
} else {
if ($discountcolumn) {
$cols['product_name']=array('width'=>365);
} else {
$cols['product_name']=array('width'=>420);
}
}
$headers['product_name'] = '<b>' $VMPL_LANG->_PRODUCT_NAME '</b>';
$headers['product_price'] = '<b>' $VMPL_LANG->_PRODUCT_PRICE '</b>' $inctaxpdf;
$cols['product_price']=array('width'=>55,'justification'=>'right');
if ($discountcolumn) {
$headers['product_dprice'] = '<b>' $VMPL_LANG->_PRODUCT_DISCOUNTED_PRICE '</b>' $inctaxpdf;
$cols['product_dprice']=array('width'=>55,'justification'=>'right');
}
} else {
echo "<tr><td colspan='5'><h3 align='center'>" $category_name "</td></tr></h3>";
echo "<tr><td width='120'><strong>" $VMPL_LANG->_PRODUCT_SKU "</strong></td>";
if ($displaymanuf) {
echo "<td width='100'><strong>" $VMPL_LANG->_PRODUCT_MANUF "</strong></td>";
}
echo "<td><strong>" $VMPL_LANG->_PRODUCT_NAME "</strong></td>
  <td width='70' style='text-align:right'><strong>" 
$VMPL_LANG->_PRODUCT_PRICE "</strong>" $inctax "</td>";
if ($discountcolumn) {
echo "<td width='70' style='text-align:right'><strong>" $VMPL_LANG->_PRODUCT_DISCOUNTED_PRICE "</strong>" $inctax "</td>";
}
echo "</tr>";
}
}
while ($dbp->next_record()) {
$user_price $ps_product->get_price$dbp->f("product_id") );
$thumb "<br>";
if ($dbp->f("product_thumb_image") <> '') {
 if ($showthumb) {
  $thumb '<br><img src="components/com_virtuemart/shop_image/product/'.$dbp->f("product_thumb_image"). '" alt="" align="left" style="margin: 10px;">';
 }
}
if ($showdetail) {
  $longdesc chr(10). "<i> - " strip_tags($dbp->f("product_desc"));
} else {
  $longdesc "";
}
if ($auth["show_price_including_tax"] == 1) {
$my_taxrate $ps_product->get_product_taxrate($dbp->f("product_id"));
$user_price["product_price"] += ($my_taxrate $user_price["product_price"]);
}
if ($mode=="pdf") {
$row = array();
$row['product_sku'] = $dbp->f("product_sku");
if ($displaymanuf) {
$row['product_manuf'] = $ps_product->get_mf_name$dbp->f("product_id") );
}
$row['product_name'] = $dbp->f("product_name") .  $longdesc "</i>";
$row['product_price'] = str_replace('&euro;','€',$CURRENCY_DISPLAY->getFullValue($user_price["product_price"]));
$row['product_price'] = str_replace('EUR','€',$CURRENCY_DISPLAY->getFullValue($user_price["product_price"]));
$row['product_price'] = str_replace('&pound;','£',$CURRENCY_DISPLAY->getFullValue($user_price["product_price"]));
if ($discountcolumn) {
$discountinfo $ps_product->get_discount($dbp->f("product_id"));
if ($discountinfo['amount']==0) {
$row['product_dprice'] = str_replace('&euro;','€',$CURRENCY_DISPLAY->getFullValue($user_price["product_price"]));
$row['product_dprice'] = str_replace('EUR','€',$CURRENCY_DISPLAY->getFullValue($user_price["product_price"]));
$row['product_dprice'] = str_replace('&pound;','£',$CURRENCY_DISPLAY->getFullValue($user_price["product_price"]));
} else {
if ($discountinfo['is_percent']) {
$discounted_price $user_price["product_price"] * (1-$discountinfo['amount']/100);
} else {
$discounted_price $user_price["product_price"] - $discountinfo['amount'];
}
$row['product_dprice'] = str_replace('&euro;','€',$CURRENCY_DISPLAY->getFullValue($discounted_price));
$row['product_dprice'] = str_replace('EUR','€',$CURRENCY_DISPLAY->getFullValue($discounted_price));
$row['product_dprice'] = str_replace('&pound;','£',$CURRENCY_DISPLAY->getFullValue($discounted_price));
}
}
$data[] = $row;
} else {
$product_name $dbp->f("product_name");
if ($productlinks && $mode=="view") {
$purl  'index.php?page=shop.product_details&product_id=' $dbp->f("product_id");
$purl .= '&category_id=' $category_id '&option=com_virtuemart&Itemid=' mosGetParam$_GET'Itemid''' );
$product_name '<a href="' $purl '">' $product_name '</a>';
}
echo "<tr><td style='border-top:1px dotted black'>" $dbp->f("product_sku") . "</td>";
if ($displaymanuf) {
echo "<td style='border-top:1px dotted black'>" $ps_product->get_mf_name$dbp->f("product_id") )  . "</td>";
}
echo "<td style='border-top:1px dotted black'>" $product_name $thumb "<i>" $longdesc "</i></td>
  <td style='border-top:1px dotted black; text-align:right'>" 
$CURRENCY_DISPLAY->getFullValue($user_price["product_price"]) . "</td>";
if ($discountcolumn) {
$discountinfo $ps_product->get_discount($dbp->f("product_id"));
if ($discountinfo['amount']==0) {
echo "<td style='border-top:1px dotted black; text-align:right'>" $CURRENCY_DISPLAY->getFullValue($user_price["product_price"]) . "</td>";
} else {
if ($discountinfo['is_percent']) {
$discounted_price $user_price["product_price"] * (1-$discountinfo['amount']/100);
} else {
$discounted_price $user_price["product_price"] - $discountinfo['amount'];
}
echo "<td style='border-top:1px dotted black; text-align:right; color:red'>" $CURRENCY_DISPLAY->getFullValue($discounted_price) . "</td>";
}
}
echo "</tr>";
}
$query  "SELECT * FROM #__{vm}_product p  ";
$query .= "WHERE p.product_parent_id=" $dbp->f("product_id") . " AND p.product_publish='Y' ORDER BY p.product_sku";
$dbp1->query($query);
while ($dbp1->next_record()) {
$query  "SELECT * FROM #__{vm}_product_attribute a ";
$query .= "WHERE a.product_id=" $dbp1->f("product_id");
$dbp2->query($query);
$product_attributes '';
while ($dbp2->next_record()) {
if ($product_attributes!='') {
$product_attributes .= ', ';
}
$product_attributes .= $dbp2->f("attribute_name") . ': ' $dbp2->f("attribute_value");
}
if ($productlinks && $mode=="view") {
$purl  'index.php?page=shop.product_details&product_id=' $dbp1->f("product_id");
$purl .= '&category_id=' $category_id '&option=com_virtuemart&Itemid=' mosGetParam$_GET'Itemid''' );
$product_attributes '<a href="' $purl '">' $product_attributes '</a>';
}
$user_price $ps_product->get_price$dbp1->f("product_id") );
if ($auth["show_price_including_tax"] == 1) {
$my_taxrate $ps_product->get_product_taxrate($dbp1->f("product_id"));
$user_price["product_price"] += ($my_taxrate $user_price["product_price"]);
}
if ($mode=="pdf") {
$row = array();
$row['product_sku'] = $dbp1->f("product_sku");
if ($displaymanuf) {
$row['product_manuf'] = ' ';
}
$row['product_name'] = '^ ' $product_attributes;
$row['product_price'] = str_replace('&euro;','€',$CURRENCY_DISPLAY->getFullValue($user_price["product_price"]));
$row['product_price'] = str_replace('EUR','€',$CURRENCY_DISPLAY->getFullValue($user_price["product_price"]));
$row['product_price'] = str_replace('&pound;','£',$CURRENCY_DISPLAY->getFullValue($user_price["product_price"]));
if ($discountcolumn) {
$discountinfo $ps_product->get_discount($dbp1->f("product_id"));
if ($discountinfo['amount']==0) {
$row['product_dprice'] = str_replace('&euro;','€',$CURRENCY_DISPLAY->getFullValue($user_price["product_price"]));
$row['product_dprice'] = str_replace('EUR','€',$CURRENCY_DISPLAY->getFullValue($user_price["product_price"]));
$row['product_dprice'] = str_replace('&pound;','£',$CURRENCY_DISPLAY->getFullValue($user_price["product_price"]));
} else {
if ($discountinfo['is_percent']) {
$discounted_price $user_price["product_price"] * (1-$discountinfo['amount']/100);
} else {
$discounted_price $user_price["product_price"] - $discountinfo['amount'];
}
$row['product_dprice'] = str_replace('&euro;','€',$CURRENCY_DISPLAY->getFullValue($discounted_price));
$row['product_dprice'] = str_replace('EUR','€',$CURRENCY_DISPLAY->getFullValue($discounted_price));
$row['product_dprice'] = str_replace('&pound;','£',$CURRENCY_DISPLAY->getFullValue($discounted_price));
}
}
$data[] = $row;
} else {
echo "<tr><td>" $dbp1->f("product_sku") . "</td>";
if ($displaymanuf) {
echo "<td>&nbsp;</td>";
}
echo "<td>^ " $product_attributes "</td>
<td style='text-align:right'>" 
$CURRENCY_DISPLAY->getFullValue($user_price["product_price"]) . "</td>";
if ($discountcolumn) {
$discountinfo $ps_product->get_discount($dbp1->f("product_id"));
if ($discountinfo['amount']==0) {
echo "<td style='text-align:right'>" $CURRENCY_DISPLAY->getFullValue($user_price["product_price"]) . "</td>";
} else {
if ($discountinfo['is_percent']) {
$discounted_price $user_price["product_price"] * (1-$discountinfo['amount']/100);
} else {
$discounted_price $user_price["product_price"] - $discountinfo['amount'];
}
echo "<td style='text-align:right; color:red'>" $CURRENCY_DISPLAY->getFullValue($discounted_price) . "</td>";
}
}
echo "</tr>";
}
}
}
if ($mode=="pdf") {
$pdf->ezSetDy(-5);
$pdf->ezTable($data,$headers,'<b>'.$category_name.'</b>',array('shaded'=>0,'showLines'=>1,'xPos'=>'580','xOrientation'=>'left','cols'=>$cols,'titleFontSize'=>14,'fontSize'=>8));
} else {
echo "</table><br>";
}
}

function 
deep_category($parent_id,$parent_name,$mode,$displaymanuf,$productlinks,$discountcolumn$showthumb$showdetail) {
$dbcat = new ps_DB();
$query  "SELECT * FROM #__{vm}_category, #__{vm}_category_xref ";
$query .= "WHERE #__{vm}_category.category_publish='Y' AND ";
$query .= "(#__{vm}_category_xref.category_parent_id='" $parent_id "') AND ";
$query .= "#__{vm}_category.category_id=#__{vm}_category_xref.category_child_id ";
$query .= "ORDER BY #__{vm}_category.list_order, #__{vm}_category.category_name ASC";
$dbcat->query($query);
while ($dbcat->next_record()) {
$category_id $dbcat->f("category_id");
$category_name $parent_name $dbcat->f("category_name");
show_category($category_id,$category_name,$mode,$displaymanuf,$productlinks,$discountcolumn$showthumb$showdetail);
deep_category($category_id,$category_name ' - ',$mode,$displaymanuf,$productlinks,$discountcolumn$showthumb$showdetail);
}
}

if( !
$my->id && $onlyregistered ) {
echo $VMPL_LANG->_RESERVED_TO_CUSTOMERS '<br/>';
} else {
$mode mosGetParam$_GET'mode''' );
if ($mode=='') {
$link_1 "index.php?page=shop.pricelist&option=com_virtuemart&Itemid=" mosGetParam$_GET'Itemid''' ) . "&mode=view&display=basic";
$link_2 "index2.php?page=shop.pricelist&option=com_virtuemart&Itemid=" mosGetParam$_GET'Itemid''' ) . "&mode=print&display=basic";
$link_2 "javascript:void window.open('" $link_2 "', 'win2', 'status=no,toolbar=no,scrollbars=yes,titlebar=no,menubar=yes,resizable=yes,width=640,height=480,directories=no,location=no');";
$link_3 "index2.php?page=shop.pricelist&option=com_virtuemart&Itemid=" mosGetParam$_GET'Itemid''' ) . "&mode=pdf&display=basic";


$link_4 "index.php?page=shop.pricelist&option=com_virtuemart&Itemid=" mosGetParam$_GET'Itemid''' ) . "&mode=view&display=all";
$link_5 "index2.php?page=shop.pricelist&option=com_virtuemart&Itemid=" mosGetParam$_GET'Itemid''' ) . "&mode=print&display=all";
$link_5 "javascript:void window.open('" $link_5 "', 'win2', 'status=no,toolbar=no,scrollbars=yes,titlebar=no,menubar=yes,resizable=yes,width=640,height=480,directories=no,location=no');";
$link_6 "index2.php?page=shop.pricelist&option=com_virtuemart&Itemid=" mosGetParam$_GET'Itemid''' ) . "&mode=pdf&display=all";
?>

<table class="contentpaneopen">
<tr><td class="contentheading" width="100%">
<?php echo $VMPL_LANG->_PRICELIST_TITLE?>
</td></tr>
</table>
<p>You can choose between displaying a basic price list or one with the full description of each item together with a thumbnail image of the product. <br>
<i>Note: The thumbnail image will not be shown in the pdf version!</i></p>
<p>
<ul><h2>Basic Price List</h2>
<li><strong><a href="<?php echo $link_1?>"><?php echo $VMPL_LANG->_VIEW?></a></strong>: <?php echo $VMPL_LANG->_VIEW_DESC;?></li>
<li><strong><a href="<?php echo $link_2?>"><?php echo $VMPL_LANG->_PRINT?></a></strong>: <?php echo $VMPL_LANG->_PRINT_DESC;?></li>
<li><strong><a href="<?php echo $link_3?>"><?php echo $VMPL_LANG->_DOWNLOAD_PDF?></a></strong>: <?php echo $VMPL_LANG->_DOWNLOAD_PDF_DESC;?></li>
</ul>
</p>
<p>
<ul><h2>Detailed Price List</h2>
<li><strong><a href="<?php echo $link_4?>"><?php echo $VMPL_LANG->_VIEW?></a></strong>: <?php echo $VMPL_LANG->_VIEW_DESC;?></li>
<li><strong><a href="<?php echo $link_5?>"><?php echo $VMPL_LANG->_PRINT?></a></strong>: <?php echo $VMPL_LANG->_PRINT_DESC;?></li>
<li><strong><a href="<?php echo $link_6?>"><?php echo $VMPL_LANG->_DOWNLOAD_PDF?></a></strong>: <?php echo $VMPL_LANG->_DOWNLOAD_PDF_DESC;?></li>
</ul>
</p>
<?php
} else {
$query "SELECT * FROM #__{vm}_vendor WHERE vendor_id=1";
$db->query($query);
if ($db->next_record()) {
$vendor_url $db->f('vendor_url');
$vendor_store_name $db->f('vendor_store_name');
$vendor_image $db->f('vendor_image_path') . 'vendor/' $db->f('vendor_full_image');

if ($mode=="print") {
echo "<table width='100%' border='0'>
  <tr><td><img src='components/com_virtuemart/" 
$vendor_image "' />
  </td><td align='right'><span style='font-size:24px;font-weight:bold;line-height:24px;'>" 
$_PRICELIST_TITLE "</span><br/>
  " 
str_replace('http://','',$vendor_url) . "
  </tr></table>"
;
}
if ($mode=="pdf") {
require_once('pricelist/class.pdf.php');
require_once('pricelist/class.ezpdf.php');
$pdf = new Cezpdf'a4''P' );  //A4 Portrait
$pdf -> ezSetCmMargins1.71.511);
$pdf->selectFont'administrator/components/com_virtuemart/html/pricelist/Helvetica.afm' ); //choose font

$pdf->ezStartPageNumbers(57,31,8,'',$VMPL_LANG->_PAGECOUNT,'',1);

$all $pdf->openObject();
$pdf->saveState();
$pdf->setStrokeColor000);

// header
$pdf->line10796578796);
$pdf->addText2081022$vendor_store_name );
$pdf->addText42081516$VMPL_LANG->_PRICELIST_TITLE );
$pdf->addText4288058$vendor_url );

// footer
$pdf->line104057840 );
$pdf->addText252318$vendor_store_name );
$pdf->addText442318$VMPL_LANG->_PRICELIST_UPDATED_AT ' 'strftime($VMPL_LANG->_DATEFORMATtime() + $mosConfig_offset 60 60 ) );

$pdf->restoreState();
$pdf->closeObject();
$pdf->addObject$all'all' );
}
require_once( CLASSPATH "ps_product_category.php" );
$ps_product_category = new ps_product_category;

require_once(CLASSPATH 'ps_product.php' );
$ps_product = new ps_product;

$dbc = new ps_DB;
$dbc1 = new ps_DB;
$dbc2 = new ps_DB;

deep_category(0,'',$mode,$displaymanuf,$productlinks,$discountcolumn$showthumb$showdetail);

if ($mode=="print") {
?>

<script language='Javascript'>
window.print();
</script>
<?php
}
if ($mode=="pdf") {
ob_clean();
$filename 'List_'.str_replace('\'','',str_replace(' ','',$vendor_store_name));
$pdf->ezDownload(array('filename'=>$filename));
exit();
}
}
}

hiveuk

  • Beginner
  • *
  • Posts: 27
Re: View/Print a complete Price List
« Reply #148 on: December 02, 2008, 11:59:47 am »
I got errors when viewing -
Warning: Missing argument 7 for deep_category(), called in /home/mysite/public_html/administrator/components/com_virtuemart/html/shop.pricelist.php on line 275 and defined in /home/mysite/public_html/administrator/components/com_virtuemart/html/shop.pricelist.php on line 263

is this code incorrect?

trevorsm

  • Beginner
  • *
  • Posts: 27
Re: View/Print a complete Price List
« Reply #149 on: December 02, 2008, 12:22:18 pm »
I got errors when viewing -
Warning: Missing argument 7 for deep_category(), called in /home/mysite/public_html/administrator/components/com_virtuemart/html/shop.pricelist.php on line 275 and defined in /home/mysite/public_html/administrator/components/com_virtuemart/html/shop.pricelist.php on line 263
is this code incorrect?

Try changing line 275 to:

Code: [Select]
deep_category($category_id,$category_name . ' - ',$mode,$displaymanuf,$productlinks,$discountcolumn, $showthumb, $showdetail);