You can subscribe to this list here.
| 2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(180) |
Jun
(85) |
Jul
(256) |
Aug
(244) |
Sep
(357) |
Oct
(218) |
Nov
(190) |
Dec
(147) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2004 |
Jan
(196) |
Feb
(78) |
Mar
(27) |
Apr
(20) |
May
(5) |
Jun
(16) |
Jul
(62) |
Aug
(67) |
Sep
(46) |
Oct
(7) |
Nov
(9) |
Dec
|
| 2005 |
Jan
(2) |
Feb
(6) |
Mar
(143) |
Apr
|
May
|
Jun
(1) |
Jul
(15) |
Aug
(14) |
Sep
(3) |
Oct
(2) |
Nov
|
Dec
|
|
From: Ruediger H. <hae...@us...> - 2005-10-06 23:57:34
|
Update of /cvsroot/pn-commerce/pn-commerce In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26354 Modified Files: pnuser.php Log Message: Fix: after a successful login of an anonymous user in the checkout function, move its cart content to the registered username instead of showing an empty cart. Index: pnuser.php =================================================================== RCS file: /cvsroot/pn-commerce/pn-commerce/pnuser.php,v retrieving revision 1.281 retrieving revision 1.282 diff -C2 -d -r1.281 -r1.282 *** pnuser.php 21 Aug 2005 13:28:04 -0000 1.281 --- pnuser.php 6 Oct 2005 23:57:26 -0000 1.282 *************** *** 851,858 **** --- 851,883 ---- if( !isset( $anonshopping ) ) { + // we might need the anonymous KID for moving cart data to a + // registered user after he logged in. + pnSessionSetVar('anonKID', $KID); addlogmessage( _PNC_LOG_USERWARNING, "user forced to login" ); + // pncommerce_user_login() will call this function + // again. After a successfull login with a new username. return pncommerce_user_login(); } } + else + { + $input = pnVarCheckFromInput( 'login' ); + $submit = $input['values']['submit']; + if ($submit) + { + // login is successful, we now have to make sure that the cart is still as it was before + $olduser = pnSessionGetVar( 'anonKID' ); + pnSessionDelVar('anonKID'); + $newuser = pncommerce_user_useridcheck(); + // update ownership in the cart now + if ( pnModAPIFunc( 'pncommerce', 'user', 'updateCartOwnership', + array( 'oldowner' => $olduser, + 'newowner' => $newuser ) ) == false ) + { + return showerrorpage( _PNC_FAILEDTOCHANGECARTOWNERSHIP, __FILE__, __LINE__ ); + } + + } + } // check for logon logoff issue *************** *** 860,864 **** if ($userindb == false) { ! $newuser = true; } else --- 885,889 ---- if ($userindb == false) { ! $newuser = true; } else *************** *** 2241,2243 **** } ! ?> \ No newline at end of file --- 2266,2268 ---- } ! ?> |
|
From: Ruediger H. <hae...@us...> - 2005-10-06 21:06:27
|
Update of /cvsroot/pn-commerce/pn-commerce/pntemplates In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16316 Modified Files: pncommerce_user_login.html Log Message: Fix: add closing tag Index: pncommerce_user_login.html =================================================================== RCS file: /cvsroot/pn-commerce/pn-commerce/pntemplates/pncommerce_user_login.html,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** pncommerce_user_login.html 21 Aug 2005 13:33:08 -0000 1.12 --- pncommerce_user_login.html 6 Oct 2005 21:06:00 -0000 1.13 *************** *** 49,53 **** </tr> <!--[ /if ]--> ! <input type='hidden' name='url' value='<!--[ pncUserModURL func=userinfo submit=true ]--> <input type='hidden' name='module' value='NS-User'> <input type='hidden' name='op' value='login'> --- 49,53 ---- </tr> <!--[ /if ]--> ! <input type='hidden' name='url' value='<!--[ pncUserModURL func=userinfo submit=true ]-->'> <input type='hidden' name='module' value='NS-User'> <input type='hidden' name='op' value='login'> |
|
From: Ruediger H. <hae...@us...> - 2005-09-07 19:21:47
|
Update of /cvsroot/pn-commerce/pn-commerce/pntemplates In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27942 Modified Files: pncommerce_pmpaypal_processpayment.html Log Message: Fix: transfer order number Enhancement: enable language support Index: pncommerce_pmpaypal_processpayment.html =================================================================== RCS file: /cvsroot/pn-commerce/pn-commerce/pntemplates/pncommerce_pmpaypal_processpayment.html,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** pncommerce_pmpaypal_processpayment.html 2 Jan 2004 16:34:00 -0000 1.8 --- pncommerce_pmpaypal_processpayment.html 7 Sep 2005 19:21:37 -0000 1.9 *************** *** 22,31 **** <input type='hidden' name='cmd' value='_xclick'> <input type='hidden' name='business' value='<!--[$PayPalEmail]-->'> ! <input type='hidden' name='item_name' value='<!--[$sitename]-->'> ! <input type='hidden' name='item_number' value='order_<!--[$ON]-->'> ! <input type='hidden' name='amount' value='<!--[$orderTotal|pncShowAsPrice:false:en_US]-->'> <input type='hidden' name='image_url' value='<!--[$ImageURL]-->'> <input type='hidden' name='no_shipping' value='1'> <input type='hidden' name='currency_code' value='<!--[$CurrencyCode]-->'> <input type='hidden' name='return' value='<!--[$MethodForwardOKURL]-->'> <input type='hidden' name='cancel_return' value='<!--[$MethodForwardCancelURL]-->'> --- 22,31 ---- <input type='hidden' name='cmd' value='_xclick'> <input type='hidden' name='business' value='<!--[$PayPalEmail]-->'> ! <input type='hidden' name='item_name' value='<!--[$ItemName]-->'> ! <input type='hidden' name='amount' value='<!--[$orderTotal]-->'> <input type='hidden' name='image_url' value='<!--[$ImageURL]-->'> <input type='hidden' name='no_shipping' value='1'> <input type='hidden' name='currency_code' value='<!--[$CurrencyCode]-->'> + <input type='hidden' name='lc' value='<!--[$LanguageCode]-->'> <input type='hidden' name='return' value='<!--[$MethodForwardOKURL]-->'> <input type='hidden' name='cancel_return' value='<!--[$MethodForwardCancelURL]-->'> |
|
From: Ruediger H. <hae...@us...> - 2005-09-07 19:12:12
|
Update of /cvsroot/pn-commerce/pn-commerce In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24260 Modified Files: pnpmpaypalapi.php Log Message: Fix: put meaningful value into item_name (ordernumber). Enhancement: add language support for paypal. Index: pnpmpaypalapi.php =================================================================== RCS file: /cvsroot/pn-commerce/pn-commerce/pnpmpaypalapi.php,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -d -r1.32 -r1.33 *** pnpmpaypalapi.php 12 Sep 2004 15:17:32 -0000 1.32 --- pnpmpaypalapi.php 7 Sep 2005 19:12:04 -0000 1.33 *************** *** 103,106 **** --- 103,107 ---- $CatalogConfig=pnModAPIFunc( 'pncommerce','admin','getConfigCatalog'); $CurrencyCode=pnModGetVar('pncommerce', 'PayPalCurrencyCode'); + $LanguageCode=substr(pnUserGetLang(), 0, 2); $ImageURL = pnModGetVar('pncommerce', 'PayPalImageURL'); *************** *** 120,124 **** //echo "<pre>";print_r($order);echo "</pre>"; ! $sitename = ereg_replace(" ","_",$Company); $nukeurl = pnGetBaseURL(); --- 121,125 ---- //echo "<pre>";print_r($order);echo "</pre>"; ! $ItemName = _PNC_ORDER.' '.$args['ON']; $nukeurl = pnGetBaseURL(); *************** *** 135,140 **** --- 136,143 ---- $smarty->assign( 'ImageURL', $ImageURL ); $smarty->assign( 'CurrencyCode', $CurrencyCode ); + $smarty->assign( 'LanguageCode', $LanguageCode); $smarty->assign( 'MethodForwardOKURL', pnModURL( 'pncommerce', 'user', 'MethodForward', $successargs ) ); $smarty->assign( 'MethodForwardCancelURL', pnModURL( 'pncommerce', 'user', 'MethodForward', $cancelargs ) ); + $smarty->assign( 'ItemName', $ItemName); $smarty->assign( 'ON', $args['ON'] ); return $smarty->fetch( "pncommerce_pmpaypal_processpayment.html" ); *************** *** 168,171 **** --- 171,175 ---- $CatalogConfig=pnModAPIFunc( 'pncommerce','admin','getConfigCatalog'); $CurrencyCode=pnModGetVar('pncommerce', 'PayPalCurrencyCode'); + $LanguageCode=substr(pnUserGetLang(), 0, 2); $ImageURL = pnModGetVar('pncommerce', 'PayPalImageURL'); *************** *** 174,178 **** array('ON' => $args['ON'], 'KID' => $args['KID'])); ! $URL="https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=$PayPalEmail¤cy_code=$CurrencyCode&item_name=order_$Company&item_number=".$args['ON']."&image_url=$ImageURL&no_shipping=1&no_note=1&undefined_quantity=0&amount=".$order['CartData']['Total']."&shipping=0.00&shipping2=0.00"; $smarty = new pnRender(); --- 178,184 ---- array('ON' => $args['ON'], 'KID' => $args['KID'])); ! $ItemName = _PNC_ORDER.'%20'.$args['ON']; ! ! $URL="https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=$PayPalEmail¤cy_code=$CurrencyCode&lc=$LanguageCode&item_name=$ItemName&item_number=".$args['ON']."&image_url=$ImageURL&no_shipping=1&no_note=1&undefined_quantity=0&amount=".$order['CartData']['Total']."&shipping=0.00&shipping2=0.00"; $smarty = new pnRender(); *************** *** 313,317 **** 'fields' => array('OrderTotal','OrderStatus'), 'required' => array('OrderNumber', $ON))); ! $sitename = ereg_replace(" ","_",$Company); $nukeurl = pnGetBaseURL(); if($status<10) --- 319,323 ---- 'fields' => array('OrderTotal','OrderStatus'), 'required' => array('OrderNumber', $ON))); ! $ItemName = _PNC_ORDER.'_'.$args['ON']; $nukeurl = pnGetBaseURL(); if($status<10) *************** *** 321,325 **** <input type='hidden' name='cmd' value='_xclick'> <input type='hidden' name='business' value='$PayPalEmail'> ! <input type='hidden' name='item_name' value='$sitename'> <input type='hidden' name='item_number' value='order_$ON'> <input type='hidden' name='amount' value='0.00'> --- 327,331 ---- <input type='hidden' name='cmd' value='_xclick'> <input type='hidden' name='business' value='$PayPalEmail'> ! <input type='hidden' name='item_name' value='$ItemName'> <input type='hidden' name='item_number' value='order_$ON'> <input type='hidden' name='amount' value='0.00'> |
|
From: Ruediger H. <hae...@us...> - 2005-09-05 12:35:08
|
Update of /cvsroot/pn-commerce/pn-commerce/pntemplates In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2380 Modified Files: pncommerce_block_categoryview.html Log Message: Enable translation of categories in tree Index: pncommerce_block_categoryview.html =================================================================== RCS file: /cvsroot/pn-commerce/pn-commerce/pntemplates/pncommerce_block_categoryview.html,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** pncommerce_block_categoryview.html 15 Jun 2004 13:09:35 -0000 1.8 --- pncommerce_block_categoryview.html 5 Sep 2005 12:34:59 -0000 1.9 *************** *** 40,46 **** <!--[/if]--> ! <a href="<!--[pncUserModURL func=categoryview CategoryID=$Category.CategoryID nosearch=true ]-->"><!--[$Category.Category]--></a> </div> <!--[/if]--> <!--[/foreach]--> ! <!--[*debug*]--> \ No newline at end of file --- 40,46 ---- <!--[/if]--> ! <a href="<!--[pncUserModURL func=categoryview CategoryID=$Category.CategoryID nosearch=true ]-->"><!--[pnml name=$Category.Category]--></a> </div> <!--[/if]--> <!--[/foreach]--> ! <!--[*debug*]--> |
|
From: Ruediger H. <hae...@us...> - 2005-08-30 19:49:59
|
Update of /cvsroot/pn-commerce/pn-commerce In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7460 Modified Files: pnadmin.php Log Message: fix: make xml export working again Index: pnadmin.php =================================================================== RCS file: /cvsroot/pn-commerce/pn-commerce/pnadmin.php,v retrieving revision 1.268 retrieving revision 1.269 diff -C2 -d -r1.268 -r1.269 *** pnadmin.php 21 Aug 2005 13:28:04 -0000 1.268 --- pnadmin.php 30 Aug 2005 19:49:51 -0000 1.269 *************** *** 1812,1893 **** } ! function array2xml($items, $xml, $parent = '') { - $arrays = array(); ! // first process all elementary types, treat them as xml attributes, ! // not as xml tags. ! foreach($items as $key => $item) { ! if (is_array($item)) { ! // we need to remember arrays and process them at the end ! $arrays[$key] = $item; ! } ! else { - $item = str_replace( - array('&', '<', '>', '"'), - array('&', '<', '>', '"'), - $item); if (ereg('^[0-9]', $key)) { ! // Special case for arrays items indexed with integers: ! // xml attributenames must not start with a digit. ! // Make tags of them. ! $xml .= '>' . "\r\n" . '<' . $parent . '_row id="' . $key . '" value="' . $item . '" /'; } else { ! $xml .= $key . '="' . $item .'" '; } ! } ! } // foreach(elementary data types... ! $xml .= '>' . "\r\n"; ! ! // all elementary types have been processed, now continue with the ! // arrays: ! foreach($arrays as $key => $item) ! { ! if (ereg('^[0-9]', $key)) ! { ! // special case for arrays just indexed with integers: ! // xml tagnames must not start with a digit ! $startTag = '<' . $parent . '_row id="' . $key . '" '; ! $endTag = '</' . $parent . '_row>' . "\r\n"; ! } ! else ! { ! // named keys / associative arrays ! $startTag = '<' . $key . ' '; ! $endTag = '</' . $key . '>' . "\r\n"; ! } ! ! $xml .= $startTag; ! // recursively call this function ! array2xml($item, &$xml, $key); ! $xml .= $endTag; ! } // foeach(arrays... ! } // function array2xml ! ! ! if (!pnModAPILoad('pncommerce', 'admin')) ! { ! return showerrorpage("unable to load pnadminapi", __FILE__, __LINE__); ! } ! if (!pnModAPILoad('pncommerce', 'user')) ! { ! return showerrorpage("unable to load pnuserapi", __FILE__, __LINE__); ! } - /* - * export_table_send - * - */ - function pncommerce_admin_export_table_send() - { pncloadapi('admin', __FILE__, __LINE__); pncloadapi('user', __FILE__, __LINE__); ! if (!pnSecAuthAction(0, 'pncommerce::config', '::', ACCESS_ADMIN)) { --- 1812,1886 ---- } ! /* ! * export_table_send ! * ! */ ! function pncommerce_admin_export_table_send() { ! // local function, don't make it externally callable! ! function array2xml($items, $xml, $parent = '') { ! $arrays = array(); ! ! // first process all elementary types, treat them as xml attributes, ! // not as xml tags. ! foreach($items as $key => $item) { ! if (is_array($item)) ! { ! // we need to remember arrays and will process them at the end ! $arrays[$key] = $item; ! } ! else ! { ! $item = str_replace( ! array('&', '<', '>', '"'), ! array('&', '<', '>', '"'), ! $item); ! if (ereg('^[0-9]', $key)) ! { ! // Special case for array items indexed with integers: ! // xml attributenames must not start with a digit. ! // Make tags of them. ! $xml .= '>' . "\r\n" . '<' . $parent . '_row id="' . $key . '" value="' . $item . '" /'; ! } ! else ! { ! $xml .= $key . '="' . $item .'" '; ! } ! } ! } // foreach(elementary data types... ! $xml .= '>' . "\r\n"; ! ! // all elementary types have been processed, now continue with the ! // arrays: ! foreach($arrays as $key => $item) { if (ereg('^[0-9]', $key)) { ! // special case for arrays just indexed with integers: ! // xml tagnames must not start with a digit ! $startTag = '<' . $parent . '_row id="' . $key . '" '; ! $endTag = '</' . $parent . '_row>' . "\r\n"; } else { ! // named keys / associative arrays ! $startTag = '<' . $key . ' '; ! $endTag = '</' . $key . '>' . "\r\n"; } ! ! $xml .= $startTag; ! // recursively call this function ! array2xml($item, &$xml, $key); ! $xml .= $endTag; ! } // foeach(arrays... ! } // function array2xml ! pncloadapi('admin', __FILE__, __LINE__); pncloadapi('user', __FILE__, __LINE__); ! if (!pnSecAuthAction(0, 'pncommerce::config', '::', ACCESS_ADMIN)) { *************** *** 1968,1972 **** $col=$tablecolumnas[$k]; } ! // fix for incorrect serialized data $line[$k] = str_replace('\\"', '"', $line[$k]); // end of fix --- 1961,1965 ---- $col=$tablecolumnas[$k]; } ! // fix for incorrectly serialized data $line[$k] = str_replace('\\"', '"', $line[$k]); // end of fix *************** *** 1984,1988 **** else { ! // Array: just open tag, array items will be // added as attributes $dump_buffer .="<".$col . " "; --- 1977,1981 ---- else { ! // Array: just open tag, array items will be // added as attributes $dump_buffer .="<".$col . " "; *************** *** 1995,2000 **** $dump_buffer .="<".$col.">"; $line[$k] = str_replace( ! array('<', '>', '&' , '"'), ! array('<', '>', '&', '"'), $line[$k]); $dump_buffer .= $line[$k]; --- 1988,1993 ---- $dump_buffer .="<".$col.">"; $line[$k] = str_replace( ! array('<', '>', '&' , '"'), ! array('<', '>', '&', '"'), $line[$k]); $dump_buffer .= $line[$k]; |
|
From: Frank S. <lan...@us...> - 2005-08-21 13:33:16
|
Update of /cvsroot/pn-commerce/pn-commerce/pntemplates In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28226/pntemplates Modified Files: pncommerce_user_login.html Log Message: login fixed Index: pncommerce_user_login.html =================================================================== RCS file: /cvsroot/pn-commerce/pn-commerce/pntemplates/pncommerce_user_login.html,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** pncommerce_user_login.html 21 Mar 2005 16:16:51 -0000 1.11 --- pncommerce_user_login.html 21 Aug 2005 13:33:08 -0000 1.12 *************** *** 25,29 **** <tr> <td align='right'> ! <!--[ pnml name='_NICKNAME' ]-->: </td> <td align='left'> --- 25,29 ---- <tr> <td align='right'> ! <!--[ pnml name='_NICKNAME' ]-->: </td> <td align='left'> *************** *** 33,37 **** <tr> <td align='right'> ! <!--[ pnml name='_PASSWORD' ]--> </td> <td align='left'> --- 33,37 ---- <tr> <td align='right'> ! <!--[ pnml name='_PASSWORD' ]--> </td> <td align='left'> *************** *** 42,46 **** <tr> <td align='right'> ! <!--[ pnml name='_PNC_REMEMBERME' ]-->: </td> <td align='left'> --- 42,46 ---- <tr> <td align='right'> ! <!--[ pnml name='_PNC_REMEMBERME' ]-->: </td> <td align='left'> *************** *** 48,53 **** </td> </tr> ! <!--[ /if ]--> ! <input type='hidden' name='url' value='<!--[ pncUserModURL func=login submit=true ]-->'> <input type='hidden' name='module' value='NS-User'> <input type='hidden' name='op' value='login'> --- 48,53 ---- </td> </tr> ! <!--[ /if ]--> ! <input type='hidden' name='url' value='<!--[ pncUserModURL func=userinfo submit=true ]--> <input type='hidden' name='module' value='NS-User'> <input type='hidden' name='op' value='login'> *************** *** 75,79 **** <b> <!--[ pnml name='_NICKNAME' ]-->:</b> ! </td> <td width='75%'> --- 75,79 ---- <b> <!--[ pnml name='_NICKNAME' ]-->:</b> ! </td> <td width='75%'> *************** *** 121,125 **** <tr> <td width='75'> ! </td> <td> --- 121,125 ---- <tr> <td width='75'> ! </td> <td> *************** *** 131,135 **** <tr> <td align='right'> ! </td> <td> --- 131,135 ---- <tr> <td align='right'> ! </td> <td> *************** *** 140,147 **** </td> </tr> ! <tr> <td> ! </td> <td> --- 140,147 ---- </td> </tr> ! <tr> <td> ! </td> <td> |
|
From: Frank S. <lan...@us...> - 2005-08-21 13:31:49
|
Update of /cvsroot/pn-commerce/pn-commerce/pntemplates In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27977/pntemplates Modified Files: pncommerce_user_itemview.html Log Message: minor layout change Index: pncommerce_user_itemview.html =================================================================== RCS file: /cvsroot/pn-commerce/pn-commerce/pntemplates/pncommerce_user_itemview.html,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** pncommerce_user_itemview.html 21 Mar 2005 16:16:51 -0000 1.24 --- pncommerce_user_itemview.html 21 Aug 2005 13:31:38 -0000 1.25 *************** *** 36,56 **** <br> <div align='center'> ! <table width='80%'> ! <tr> <td><b><!--[ pnml name='_PNC_ITEMSKU' ]-->: </b></td> <td><!--[ $Item.SKU ]--></td> ! </tr> ! <tr> <td><b><!--[ pnml name='_PNC_ITEMNAME' ]-->: </b></td> <td><!--[ $Item.Name ]--></td> ! </tr> ! <tr> <td><b><!--[ pnml name='_PNC_ITEMCOST' ]-->: </b></td> <td><!--[ $Item.CostLong|pncShowAsPrice ]--> (<!--[ $Item.Vat ]-->% <!--[ pnml name='_PNC_VAT' ]--> = <!--[ $Item.VatAmount|pncShowAsPrice ]-->)</td> ! </tr> ! <tr> <td valign="top"><b><!--[ pnml name='_PNC_ITEMDESCRIPTION' ]-->: </b></td> <td><!--[ $Item.Desc ]--></td> ! </tr> <!--[ foreach item=property from=$Item.PropertiesData ]--> <!--[ if $property.hidden==0 ]--> --- 36,56 ---- <br> <div align='center'> ! <table width='80%'> ! <tr> <td><b><!--[ pnml name='_PNC_ITEMSKU' ]-->: </b></td> <td><!--[ $Item.SKU ]--></td> ! </tr> ! <tr> <td><b><!--[ pnml name='_PNC_ITEMNAME' ]-->: </b></td> <td><!--[ $Item.Name ]--></td> ! </tr> ! <tr> <td><b><!--[ pnml name='_PNC_ITEMCOST' ]-->: </b></td> <td><!--[ $Item.CostLong|pncShowAsPrice ]--> (<!--[ $Item.Vat ]-->% <!--[ pnml name='_PNC_VAT' ]--> = <!--[ $Item.VatAmount|pncShowAsPrice ]-->)</td> ! </tr> ! <tr> <td valign="top"><b><!--[ pnml name='_PNC_ITEMDESCRIPTION' ]-->: </b></td> <td><!--[ $Item.Desc ]--></td> ! </tr> <!--[ foreach item=property from=$Item.PropertiesData ]--> <!--[ if $property.hidden==0 ]--> *************** *** 61,65 **** </div> ! <div align='center'> <!--[ if ($Item.Quantity > 0) or ($Item.IgnoreQuantity==on) ]--> <!--[ pncAddItem Long=true ItemID=$Item.ID ]--> --- 61,65 ---- </div> ! <div style="text-align:center; padding 10px;"> <!--[ if ($Item.Quantity > 0) or ($Item.IgnoreQuantity==on) ]--> <!--[ pncAddItem Long=true ItemID=$Item.ID ]--> |
|
From: Frank S. <lan...@us...> - 2005-08-21 13:29:16
|
Update of /cvsroot/pn-commerce/pn-commerce In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27509 Modified Files: pnprsimplelistapi.php Log Message: doc header update Index: pnprsimplelistapi.php =================================================================== RCS file: /cvsroot/pn-commerce/pn-commerce/pnprsimplelistapi.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** pnprsimplelistapi.php 23 Mar 2005 12:13:55 -0000 1.1 --- pnprsimplelistapi.php 21 Aug 2005 13:29:04 -0000 1.2 *************** *** 196,204 **** /** ! * This function is called when an interactive property (select list, inpu field) is ! * used by an user * *@param $args[object] array the object that the property belongs to ! *@param $args[property] the propertydata for us *@return $object */ --- 196,207 ---- /** ! * This function is called when an interactive property (select list, input field) is ! * used by an user. The information the user selected/entered will be saved in $property['userinput'] ! * for later use, e.g. storing in the cart. ! * It may also change the object itself if necessary. * *@param $args[object] array the object that the property belongs to ! *@param $args[property] the property for us ! * *@return $object */ |
|
From: Frank S. <lan...@us...> - 2005-08-21 13:28:16
|
Update of /cvsroot/pn-commerce/pn-commerce In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27227 Modified Files: common.php pnadmin.php pnadminapi.php pnuser.php Log Message: moved api load to common.php function Index: pnadminapi.php =================================================================== RCS file: /cvsroot/pn-commerce/pn-commerce/pnadminapi.php,v retrieving revision 1.183 retrieving revision 1.184 diff -C2 -d -r1.183 -r1.184 *** pnadminapi.php 8 Aug 2005 19:39:11 -0000 1.183 --- pnadminapi.php 21 Aug 2005 13:28:04 -0000 1.184 *************** *** 48,56 **** function pncAdminAPIModURL($Module,$Section,$Function,$Args=array()) { ! if (!pnModAPILoad('pncommerce', 'user')) ! { ! return showerrorpage("unable to load pnuserapi", __FILE__, __LINE__); ! ! } return pnModAPIFunc ('pncommerce', 'user','pncModURL', array( --- 48,52 ---- function pncAdminAPIModURL($Module,$Section,$Function,$Args=array()) { ! pncloadapi('user', __FILE__, __LINE__); return pnModAPIFunc ('pncommerce', 'user','pncModURL', array( *************** *** 89,100 **** $pluginname = substr($pluginname, 2, strlen($pluginname) - 2); if (pnSecAuthAction(0, 'pncommerce::plugin', "$type:$pluginname:", ACCESS_COMMENT)) { ! if (pnModAPILoad ('pncommerce', $pluginname)) { ! // if (empty($pluginstates[$pluginname]))$pluginstates[$pluginname] = _PCSS_UNINITIALIZED; ! // if (($args['onlyactive'] == false) || ($pluginstates[$pluginname] != _PCSS_UNINITIALIZED)) { ! $info = pnModAPIFunc('pncommerce', $pluginname, 'info'); ! if($info<>false || $allplugins==true) { ! $plugins[$pluginname] = array('info' => $info, ! 'name' => $pluginname); ! } } } --- 85,95 ---- $pluginname = substr($pluginname, 2, strlen($pluginname) - 2); if (pnSecAuthAction(0, 'pncommerce::plugin', "$type:$pluginname:", ACCESS_COMMENT)) { ! pncloadapi($pluginname, __FILE__, __LINE__); ! // if (empty($pluginstates[$pluginname]))$pluginstates[$pluginname] = _PCSS_UNINITIALIZED; ! // if (($args['onlyactive'] == false) || ($pluginstates[$pluginname] != _PCSS_UNINITIALIZED)) { ! $info = pnModAPIFunc('pncommerce', $pluginname, 'info'); ! if($info<>false || $allplugins==true) { ! $plugins[$pluginname] = array('info' => $info, ! 'name' => $pluginname); } } *************** *** 277,281 **** 'DefaultCurrencySymbol' => pnModGetVar('pncommerce', 'DefaultCurrencySymbol')); } ! /** * Converts a country specific formatted number within a string into --- 272,276 ---- 'DefaultCurrencySymbol' => pnModGetVar('pncommerce', 'DefaultCurrencySymbol')); } ! /** * Converts a country specific formatted number within a string into *************** *** 288,308 **** */ function pncommerce_adminapi_convertToNumber($args) ! { extract($args); ! $decimalDelimiter = pnModGetVar('pncommerce', 'DecimalDelimiter'); $thousandsSeparator = pnModGetVar('pncommerce', 'ThousandsSeparator'); ! ! // Extract the numeric part with a regular expression: // Divide the string into four parts: // 1. everything non numeric // 2. at least one digit and all following digits and thousands // separators (can be empty for values like "$ .12" ! // 3. the fractional part: decimal delimiter and following digits and // thousands separators (can be empty for values like "$ 42") // 4. all the rest // At the end we use the second and third part. // All separators and delimiters have to be in character classes because ! // because in regular expressions they can become wildcards $value = ereg_replace('([^0-9' . $decimalDelimiter . ']*)' . // non numeric '([0-9]+[0-9' . $thousandsSeparator . ']*)*' . // integer --- 283,303 ---- */ function pncommerce_adminapi_convertToNumber($args) ! { extract($args); ! $decimalDelimiter = pnModGetVar('pncommerce', 'DecimalDelimiter'); $thousandsSeparator = pnModGetVar('pncommerce', 'ThousandsSeparator'); ! ! // Extract the numeric part with a regular expression: // Divide the string into four parts: // 1. everything non numeric // 2. at least one digit and all following digits and thousands // separators (can be empty for values like "$ .12" ! // 3. the fractional part: decimal delimiter and following digits and // thousands separators (can be empty for values like "$ 42") // 4. all the rest // At the end we use the second and third part. // All separators and delimiters have to be in character classes because ! // because in regular expressions they can become wildcards $value = ereg_replace('([^0-9' . $decimalDelimiter . ']*)' . // non numeric '([0-9]+[0-9' . $thousandsSeparator . ']*)*' . // integer *************** *** 312,316 **** $value); // remove thousands separators ! if ($thousandsSeparator != $decimalDelimiter) { $value = str_replace($thousandsSeparator, "", $value); --- 307,311 ---- $value); // remove thousands separators ! if ($thousandsSeparator != $decimalDelimiter) { $value = str_replace($thousandsSeparator, "", $value); *************** *** 325,330 **** { $result = (int)$value; ! } ! else { $result = (double)$value; --- 320,325 ---- { $result = (int)$value; ! } ! else { $result = (double)$value; *************** *** 710,729 **** // $itemsTable = $pntable[pncommerce_items]; ! if (!pnModAPILoad( 'pncommerce', 'user' ) ) ! { ! return showerrorpage("unable to load pnuserapi", __FILE__, __LINE__); - } - $sql = "UPDATE $itemsTable SET scheme_id='".pnVarPrepForStore($Scheme_ID)."', ! ItemSKU='".pnVarPrepForStore($ItemSKU)."', ItemName='".pnVarPrepForStore($ItemName)."', ! ItemDescription='".pnVarPrepForStore($ItemDescription)."', ! ItemCost='".pnVarPrepForStore($ItemCost)."', Weight='".pnVarPrepForStore($Weight)."', ! Category='".pnVarPrepForStore($CategoryID)."', ItemQuantity='".pnVarPrepForStore($QuantityOnHand)."',VATID='".pnVarPrepForStore($VATID)."', ! IgnoreQuantity='".pnVarPrepForStore($IgnoreQuantity)."', TaxExempt='".pnVarPrepForStore($TaxExempt)."' WHERE ItemID='".pnVarPrepForStore($ItemID)."'"; --- 705,723 ---- // $itemsTable = $pntable[pncommerce_items]; ! pncloadapi('user', __FILE__, __LINE__); ! ! $ItemCost = number_format($ItemCost, 3, '.', '');//ereg_replace( ",", ".", $ItemCost ); ! $Weight = number_format($Weight, 4, '.', '');//ereg_replace( ",", ".", $Weight ); $sql = "UPDATE $itemsTable SET scheme_id='".pnVarPrepForStore($Scheme_ID)."', ! ItemSKU='".pnVarPrepForStore($ItemSKU)."', ItemName='".pnVarPrepForStore($ItemName)."', ! ItemDescription='".pnVarPrepForStore($ItemDescription)."', ! ItemCost='".pnVarPrepForStore($ItemCost)."', Weight='".pnVarPrepForStore($Weight)."', ! Category='".pnVarPrepForStore($CategoryID)."', ItemQuantity='".pnVarPrepForStore($QuantityOnHand)."',VATID='".pnVarPrepForStore($VATID)."', ! IgnoreQuantity='".pnVarPrepForStore($IgnoreQuantity)."', TaxExempt='".pnVarPrepForStore($TaxExempt)."' WHERE ItemID='".pnVarPrepForStore($ItemID)."'"; *************** *** 1091,1097 **** function pncommerce_adminapi_ArticleDelete($args) { ! if (!pnModAPILoad('pncommerce', 'user')) { ! return showerrorpage("unable to load pnuserapi", __FILE__, __LINE__); ! } extract($args); list($catID)=pnModAPIFunc('pncommerce','user','readfromdb', array('table' => 'items', 'fields' => array('category'), 'required' => array('itemid', $ItemID)) ); --- 1085,1090 ---- function pncommerce_adminapi_ArticleDelete($args) { ! pncloadapi('user', __FILE__, __LINE__); ! extract($args); list($catID)=pnModAPIFunc('pncommerce','user','readfromdb', array('table' => 'items', 'fields' => array('category'), 'required' => array('itemid', $ItemID)) ); *************** *** 1261,1269 **** extract($Thumbnails); ! if (!pnModAPILoad('pncommerce', 'user')) ! { ! return showerrorpage("unable to load pnuserapi", __FILE__, __LINE__); ! ! } list($catID)=pnModAPIFunc('pncommerce','user','readfromdb', array('table' => 'items', 'fields' => array('category'), 'required' => array('itemid', $itemID)) ); --- 1254,1258 ---- extract($Thumbnails); ! pncloadapi('user', __FILE__, __LINE__); list($catID)=pnModAPIFunc('pncommerce','user','readfromdb', array('table' => 'items', 'fields' => array('category'), 'required' => array('itemid', $itemID)) ); *************** *** 1399,1407 **** $Thumbnails = pncommerce_adminapi_getConfigThumbnail(); extract($Thumbnails); ! if (!pnModAPILoad('pncommerce', 'user')) ! { ! return showerrorpage("unable to load pnuserapi", __FILE__, __LINE__); ! ! } list($catID)=pnModAPIFunc('pncommerce','user','readfromdb', array('table' => 'items', 'fields' => array('category'), 'required' => array('itemid', $itemID)) ); --- 1388,1392 ---- $Thumbnails = pncommerce_adminapi_getConfigThumbnail(); extract($Thumbnails); ! pncloadapi('user', __FILE__, __LINE__); list($catID)=pnModAPIFunc('pncommerce','user','readfromdb', array('table' => 'items', 'fields' => array('category'), 'required' => array('itemid', $itemID)) ); *************** *** 1451,1458 **** extract($args); ! if (!pnModAPILoad('pncommerce', 'user')) ! { ! return false; ! } $result = pnModAPIFunc( 'pncommerce', 'user', 'readfromDBpreformat', array('sql' => "SELECT CategoryID, Category, CatParent FROM ".pnConfigGetVar('prefix')."_pncommerce_category")); --- 1436,1440 ---- extract($args); ! pncloadapi('user', __FILE__, __LINE__); $result = pnModAPIFunc( 'pncommerce', 'user', 'readfromDBpreformat', array('sql' => "SELECT CategoryID, Category, CatParent FROM ".pnConfigGetVar('prefix')."_pncommerce_category")); *************** *** 1571,1579 **** } ! if (!pnModAPILoad('pncommerce', 'user')) ! { ! return showerrorpage("unable to load pnuserapi", __FILE__, __LINE__); ! ! } $result = pnModAPIFunc( 'pncommerce', 'user', 'readfromDBpreformat', array('sql' => "SELECT CategoryID, Category, CatParent FROM ".pnConfigGetVar('prefix')."_pncommerce_category")); --- 1553,1557 ---- } ! pncloadapi('user', __FILE__, __LINE__); $result = pnModAPIFunc( 'pncommerce', 'user', 'readfromDBpreformat', array('sql' => "SELECT CategoryID, Category, CatParent FROM ".pnConfigGetVar('prefix')."_pncommerce_category")); *************** *** 1639,1647 **** } ! if (!pnModAPILoad('pncommerce', 'user')) ! { ! return showerrorpage("unable to load pnuserapi", __FILE__, __LINE__); ! ! } $result = pnModAPIFunc( 'pncommerce', 'user', 'readfromDBpreformat', array('sql' => "SELECT ItemID, ItemName, ItemSKU FROM ".pnConfigGetVar('prefix')."_pncommerce_items WHERE ItemSKU REGEXP \"^[^\%]\" ORDER BY ItemName")); --- 1617,1621 ---- } ! pncloadapi('user', __FILE__, __LINE__); $result = pnModAPIFunc( 'pncommerce', 'user', 'readfromDBpreformat', array('sql' => "SELECT ItemID, ItemName, ItemSKU FROM ".pnConfigGetVar('prefix')."_pncommerce_items WHERE ItemSKU REGEXP \"^[^\%]\" ORDER BY ItemName")); *************** *** 1677,1685 **** { $errormsg = array(); ! if (!pnModAPILoad('pncommerce', 'user')) ! { ! return showerrorpage("unable to load pnuserapi", __FILE__, __LINE__); ! ! } if( !is_numeric($args['CategorySequence']) ) --- 1651,1655 ---- { $errormsg = array(); ! pncloadapi('user', __FILE__, __LINE__); if( !is_numeric($args['CategorySequence']) ) *************** *** 1745,1752 **** { extract($args); ! if (!pnModAPILoad('pncommerce', 'user')){ ! return showerrorpage("unable to load pnuserapi", __FILE__, __LINE__); ! ! } $CName=pnModAPIFunc( 'pncommerce', 'user','GetCategoryName',array('CategoryID'=>$catID)); if (!pnSecAuthAction(0, --- 1715,1719 ---- { extract($args); ! pncloadapi('user', __FILE__, __LINE__); $CName=pnModAPIFunc( 'pncommerce', 'user','GetCategoryName',array('CategoryID'=>$catID)); if (!pnSecAuthAction(0, *************** *** 1838,1846 **** function pncommerce_adminapi_CategoryStore($args) { ! if (!pnModAPILoad('pncommerce', 'user')) ! { ! return showerrorpage("unable to load pnuserapi", __FILE__, __LINE__); ! ! } if (!pnSecAuthAction(0, 'pncommerce::category', --- 1805,1809 ---- function pncommerce_adminapi_CategoryStore($args) { ! pncloadapi('user', __FILE__, __LINE__); if (!pnSecAuthAction(0, 'pncommerce::category', *************** *** 1924,1932 **** { extract ($args); ! if (!pnModAPILoad('pncommerce', 'user')) ! { ! return showerrorpage("unable to load pnuserapi", __FILE__, __LINE__); ! ! } if (!pnSecAuthAction(0, --- 1887,1891 ---- { extract ($args); ! pncloadapi('user', __FILE__, __LINE__); if (!pnSecAuthAction(0, *************** *** 1991,1998 **** { extract ($args); ! if (!pnModAPILoad('pncommerce', 'user')){ ! return showerrorpage("unable to load pnuserapi", __FILE__, __LINE__); ! ! } if (!pnSecAuthAction(0, 'pncommerce::', "::", ACCESS_ADMIN)) --- 1950,1954 ---- { extract ($args); ! pncloadapi('user', __FILE__, __LINE__); if (!pnSecAuthAction(0, 'pncommerce::', "::", ACCESS_ADMIN)) *************** *** 2058,2066 **** function pncommerce_adminapi_getSingleCategoryTree($args) { ! if (!pnModAPILoad('pncommerce', 'user')) ! { ! return showerrorpage("unable to load pnuserapi", __FILE__, __LINE__); - } $result=array(); //first find all top level categories --- 2014,2019 ---- function pncommerce_adminapi_getSingleCategoryTree($args) { ! pncloadapi('user', __FILE__, __LINE__); $result=array(); //first find all top level categories *************** *** 2157,2165 **** extract($args); //starttime, $endtime ! if (!pnModAPILoad('pncommerce', 'user')) ! { ! return showerrorpage("unable to load pnuserapi", __FILE__, __LINE__); ! ! } if (!pnSecAuthAction(0, 'pncommerce::', "::", ACCESS_ADMIN)) { --- 2110,2114 ---- extract($args); //starttime, $endtime ! pncloadapi('user', __FILE__, __LINE__); if (!pnSecAuthAction(0, 'pncommerce::', "::", ACCESS_ADMIN)) { *************** *** 2407,2414 **** { extract( $args ); ! if (!pnModAPILoad('pncommerce', 'user')) ! { ! return false; ! } if ( $ParentID ) --- 2356,2360 ---- { extract( $args ); ! pncloadapi('user', __FILE__, __LINE__); if ( $ParentID ) *************** *** 2487,2502 **** function pncommerce_adminapi_rebuildOrderedQuantity() { ! if (!pnModAPILoad('pncommerce', 'user')) ! { ! return showerrorpage("unable to load pnuserapi", __FILE__, __LINE__); ! } if (!pnSecAuthAction(0, 'pncommerce::', "::", ACCESS_ADMIN)) { return showerrorpage(_PNC_NOAUTH, __FILE__, __LINE__); } ! // Array to store itemIDs and their ordered quantities $orderedItems = array(); ! // get the number of orders in the db $ordercount = pnModAPIFunc('pncommerce', 'user', 'gethighidfromDB', --- 2433,2446 ---- function pncommerce_adminapi_rebuildOrderedQuantity() { ! pncloadapi('user', __FILE__, __LINE__); ! if (!pnSecAuthAction(0, 'pncommerce::', "::", ACCESS_ADMIN)) { return showerrorpage(_PNC_NOAUTH, __FILE__, __LINE__); } ! // Array to store itemIDs and their ordered quantities $orderedItems = array(); ! // get the number of orders in the db $ordercount = pnModAPIFunc('pncommerce', 'user', 'gethighidfromDB', *************** *** 2534,2538 **** } } ! // update the QuantityOrdered in the items table foreach($orderedItems as $itemId => $quantity) --- 2478,2482 ---- } } ! // update the QuantityOrdered in the items table foreach($orderedItems as $itemId => $quantity) *************** *** 2568,2576 **** $usercolumn = &$pntable['users_column']; ! if( !pnModAPILoad( 'pncommerce', 'user' ) ) ! { ! return showerrorpage("unable to load pnuserapi", __FILE__, __LINE__); ! ! } // read the groups --- 2512,2516 ---- $usercolumn = &$pntable['users_column']; ! pncloadapi('user', __FILE__, __LINE__); // read the groups *************** *** 2660,2668 **** } ! if( !pnModAPILoad( 'pncommerce', 'user' ) ) ! { ! return showerrorpage("unable to load pnuserapi", __FILE__, __LINE__); ! ! } // read the group membership for $uid --- 2600,2604 ---- } ! pncloadapi('user', __FILE__, __LINE__); // read the group membership for $uid *************** *** 2782,2790 **** { extract( $args ); ! if( !pnModAPILoad( 'pncommerce', 'user' ) ) ! { ! return showerrorpage("unable to load pnuserapi", __FILE__, __LINE__); - } if (!pnSecAuthAction(0, 'pncommerce::', "::", ACCESS_ADMIN)) { --- 2718,2723 ---- { extract( $args ); ! pncloadapi('user', __FILE__, __LINE__); if (!pnSecAuthAction(0, 'pncommerce::', "::", ACCESS_ADMIN)) { *************** *** 2871,2875 **** foreach( $modsequence as $modseq ) { ! pnModAPILoad( 'pncommerce', $modseq ); $newfm = array(); $newfm['name'] = $modseq; --- 2804,2808 ---- foreach( $modsequence as $modseq ) { ! pncloadapi($modseq, __FILE__, __LINE__); $newfm = array(); $newfm['name'] = $modseq; *************** *** 3091,3099 **** if(is_array($unserialized))$property['config']=$unserialized; ! if(pnModAPILoad('pncommerce', $property['type'])) { ! $property['info'] = pnModAPIFunc('pncommerce', $property['type'], 'info'); ! } else { ! return showerrorpage('unable to load ' . $property['type'] . ' api', __FILE__, __LINE__); ! } array_push($properties, $property); $result->MoveNext(); --- 3024,3030 ---- if(is_array($unserialized))$property['config']=$unserialized; ! pncloadapi($property['type'], __FILE__, __LINE__); ! $property['info'] = pnModAPIFunc('pncommerce', $property['type'], 'info'); ! array_push($properties, $property); $result->MoveNext(); *************** *** 3123,3133 **** foreach($properties as $property) { ! if(pnModAPILoad('pncommerce', $property['type'])) { ! $property['object_id']=$args['object_id']; ! $property=pnModAPIFunc('pncommerce', $property['type'], 'newdata', array('property' => $property)); ! pncommerce_adminapi_propertydataAdd($property); ! } else { ! return showerrorpage('unable to load ' . $property['name'] . 'api', __FILE__, __LINE__); ! } } --- 3054,3061 ---- foreach($properties as $property) { ! pncloadapi($property['type'], __FILE__, __LINE__); ! $property['object_id']=$args['object_id']; ! $property=pnModAPIFunc('pncommerce', $property['type'], 'newdata', array('property' => $property)); ! pncommerce_adminapi_propertydataAdd($property); } Index: pnuser.php =================================================================== RCS file: /cvsroot/pn-commerce/pn-commerce/pnuser.php,v retrieving revision 1.280 retrieving revision 1.281 diff -C2 -d -r1.280 -r1.281 *** pnuser.php 30 Mar 2005 19:33:42 -0000 1.280 --- pnuser.php 21 Aug 2005 13:28:04 -0000 1.281 *************** *** 49,53 **** $smarty =& new pnRender('pncommerce'); $smarty->caching = false; ! return $smarty->fetch( 'pncommerce_shop_inactive.html' ); } return false; --- 49,53 ---- $smarty =& new pnRender('pncommerce'); $smarty->caching = false; ! return $smarty->fetch( 'pncommerce_shop_inactive.html' ); } [...1244 lines suppressed...] ! pncloadapi('user', __FILE__, __LINE__); ! $ret =pncommerce_user_ActiveShop(); if($ret){return $ret;} ! $input = pnVarCheckFromInput( 'directbuy' ); if( $input['errormsg'] != false ) *************** *** 2318,2322 **** addlogmessage( _PNC_LOG_GENERAL, "entering directbuy" ); ! $ItemSKU = $input['values']['ItemSKU']; $ItemQuantity = $input['values']['ItemQuantity']; --- 2219,2223 ---- addlogmessage( _PNC_LOG_GENERAL, "entering directbuy" ); ! $ItemSKU = $input['values']['ItemSKU']; $ItemQuantity = $input['values']['ItemQuantity']; Index: pnadmin.php =================================================================== RCS file: /cvsroot/pn-commerce/pn-commerce/pnadmin.php,v retrieving revision 1.267 retrieving revision 1.268 diff -C2 -d -r1.267 -r1.268 *** pnadmin.php 20 Aug 2005 08:13:29 -0000 1.267 --- pnadmin.php 21 Aug 2005 13:28:04 -0000 1.268 *************** *** 48,55 **** function pncAdminModURL($Module, $Section, $Function, $Args=array()) { ! if (!pnModAPILoad('pncommerce', 'user')) ! { ! return showerrorpage("unable to load pnuserapi", __FILE__, __LINE__); ! } return pnModAPIFunc( 'pncommerce', 'user','pncModURL', array( 'Module'=>$Module, --- 48,52 ---- function pncAdminModURL($Module, $Section, $Function, $Args=array()) [...1119 lines suppressed...] ! $newproperty = pnModAPIFunc('pncommerce', $newtype, 'newdata', array('property' => $newproperty)); ! pnModAPIFunc('pncommerce', 'admin', 'propertyAdd', $newproperty); ! pnModAPIFunc('pncommerce', 'admin', 'recalculatepropertiessortorder', array('scheme_id' => $scheme_id)); } pnRedirect(pnModURL('pncommerce', 'admin', 'editscheme', array('schemeid' => (int)$scheme_id))); *************** *** 3308,3314 **** return showerrorpage(_PNC_NOAUTH, __FILE__, __LINE__); } ! if(!pnModAPILoad('pncommerce', 'admin')) { ! return showerrorpage("unable to load pnadminapi", __FILE__, __LINE__); ! } list($dir, $scheme_id, $property_id) = pnVarCleanFromInput('dir', 'scheme_id', 'property_id'); --- 3168,3172 ---- return showerrorpage(_PNC_NOAUTH, __FILE__, __LINE__); } ! pncloadapi('admin', __FILE__, __LINE__); list($dir, $scheme_id, $property_id) = pnVarCleanFromInput('dir', 'scheme_id', 'property_id'); Index: common.php =================================================================== RCS file: /cvsroot/pn-commerce/pn-commerce/common.php,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** common.php 17 Mar 2005 13:19:41 -0000 1.10 --- common.php 21 Aug 2005 13:28:03 -0000 1.11 *************** *** 15,19 **** // // Date of revision $Date$ ! // // ---------------------------------------------------------------------- // LICENSE --- 15,19 ---- // // Date of revision $Date$ ! // // ---------------------------------------------------------------------- // LICENSE *************** *** 97,101 **** // add the message to the log addlogmessage( "", $error_text . " in file " . $file . " at line " . $line); ! $pnr =& new pnRender('pncommerce'); $pnr->caching = false; --- 97,101 ---- // add the message to the log addlogmessage( "", $error_text . " in file " . $file . " at line " . $line); ! $pnr =& new pnRender('pncommerce'); $pnr->caching = false; *************** *** 165,169 **** echo "</pre>"; } else echo "<pre>" . $data . "</pre>"; ! } /** --- 165,169 ---- echo "</pre>"; } else echo "<pre>" . $data . "</pre>"; ! } /** *************** *** 186,190 **** if(isset($tablename)) { $columnname = $tablename . '_column'; ! if( !array_key_exists($tablename, $pntables) || !array_key_exists($columnname, $pntables) ) {return false; } return array($dbconn, &$pntables[$tablename], &$pntables[$columnname]); --- 186,190 ---- if(isset($tablename)) { $columnname = $tablename . '_column'; ! if( !array_key_exists($tablename, $pntables) || !array_key_exists($columnname, $pntables) ) {return false; } return array($dbconn, &$pntables[$tablename], &$pntables[$columnname]); *************** *** 210,214 **** /** ! * pncExecuteSQL * executes an sql command and returns the result, shows error if necessary * --- 210,214 ---- /** ! * pncExecuteSQL * executes an sql command and returns the result, shows error if necessary * *************** *** 245,255 **** function is_serialized( $string ) { ! if( @unserialize( $string ) == "" ) ! { return false; } return true; ! } } ?> \ No newline at end of file --- 245,261 ---- function is_serialized( $string ) { ! if( @unserialize( $string ) == "" ) { return false; } return true; ! } } + function pncloadapi($api = 'user', $file = __FILE__, $line = __LINE__) + { + if(!pnModAPILoad('pncommerce', $api)) { + return showerrorpage('unable to load pn' . $api . 'api', $file, $line); + } + return; + } ?> \ No newline at end of file |
|
From: Jim H. <jim...@us...> - 2005-08-21 12:30:33
|
Update of /cvsroot/pn-commerce/pn-commerce In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16732 Modified Files: pnuserapi.php Log Message: I removed the temporary // lines. This is working on PN.750-php5, PN.750-php4 and PN.760-php5 now. Index: pnuserapi.php =================================================================== RCS file: /cvsroot/pn-commerce/pn-commerce/pnuserapi.php,v retrieving revision 1.272 retrieving revision 1.273 diff -C2 -d -r1.272 -r1.273 *** pnuserapi.php 21 Aug 2005 12:11:57 -0000 1.272 --- pnuserapi.php 21 Aug 2005 12:30:25 -0000 1.273 *************** *** 1487,1493 **** if( isset($object_id) && is_numeric($object_id) && isset($object_type) && is_numeric($object_type) ) { ! // $dbconn = &pnDBGetConn(true); ! // $pntable = &pnDBGetTables(); ! // list($dbconn, $pntable, $tablecolumn) = pncOpenDB('pncommerce_properties'); list($dbconn, $pntable, $tablecolumn) = pncOpenDB(); $propertiestable = $pntable['pncommerce_properties']; --- 1487,1491 ---- if( isset($object_id) && is_numeric($object_id) && isset($object_type) && is_numeric($object_type) ) { ! list($dbconn, $pntable, $tablecolumn) = pncOpenDB(); $propertiestable = $pntable['pncommerce_properties']; |
|
From: Jim H. <jim...@us...> - 2005-08-21 12:12:11
|
Update of /cvsroot/pn-commerce/pn-commerce In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13393 Modified Files: pnuserapi.php Log Message: test changes made to work on PN.750 and php5 Index: pnuserapi.php =================================================================== RCS file: /cvsroot/pn-commerce/pn-commerce/pnuserapi.php,v retrieving revision 1.271 retrieving revision 1.272 diff -C2 -d -r1.271 -r1.272 *** pnuserapi.php 8 Aug 2005 19:39:14 -0000 1.271 --- pnuserapi.php 21 Aug 2005 12:11:57 -0000 1.272 *************** *** 1487,1492 **** if( isset($object_id) && is_numeric($object_id) && isset($object_type) && is_numeric($object_type) ) { ! $dbconn = &pnDBGetConn(true); ! $pntable = &pnDBGetTables(); $propertiestable = $pntable['pncommerce_properties']; $propertiescolumn = &$pntable['pncommerce_properties_column']; --- 1487,1494 ---- if( isset($object_id) && is_numeric($object_id) && isset($object_type) && is_numeric($object_type) ) { ! // $dbconn = &pnDBGetConn(true); ! // $pntable = &pnDBGetTables(); ! // list($dbconn, $pntable, $tablecolumn) = pncOpenDB('pncommerce_properties'); ! list($dbconn, $pntable, $tablecolumn) = pncOpenDB(); $propertiestable = $pntable['pncommerce_properties']; $propertiescolumn = &$pntable['pncommerce_properties_column']; *************** *** 1512,1517 **** AND $propertiesdatacolumn[object_id]=".(int)pnVarPrepForStore($object_id); if(!$showhidden) $sql.=" AND $propertiescolumn[hidden]='0'"; ! $sql.=" ORDER BY $propertiescolumn[sortorder]"; ! $result = $dbconn->Execute($sql); // check for errors or no rows found, and if so return false if ($dbconn->ErrorNo() != 0) { --- 1514,1519 ---- AND $propertiesdatacolumn[object_id]=".(int)pnVarPrepForStore($object_id); if(!$showhidden) $sql.=" AND $propertiescolumn[hidden]='0'"; ! $sql.=" ORDER BY $propertiescolumn[sortorder]"; ! $result = $dbconn->Execute($sql); // check for errors or no rows found, and if so return false if ($dbconn->ErrorNo() != 0) { |
|
From: Patrick C. <pco...@us...> - 2005-08-20 13:00:56
|
Update of /cvsroot/pn-commerce/pn-commerce In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30067 Modified Files: pninit.php Log Message: parse error fixed in line 603 Index: pninit.php =================================================================== RCS file: /cvsroot/pn-commerce/pn-commerce/pninit.php,v retrieving revision 1.85 retrieving revision 1.86 diff -C2 -d -r1.85 -r1.86 *** pninit.php 8 Aug 2005 19:39:12 -0000 1.85 --- pninit.php 20 Aug 2005 13:00:48 -0000 1.86 *************** *** 601,605 **** case '0.95': pnModSetVar ('pncommerce', 'VatIncluded', 'off'); ! } } pnModSetVar( 'pncommerce', 'Version', '0.95' ); --- 601,605 ---- case '0.95': pnModSetVar ('pncommerce', 'VatIncluded', 'off'); ! } pnModSetVar( 'pncommerce', 'Version', '0.95' ); *************** *** 808,810 **** return true; } ! ?> --- 808,810 ---- return true; } ! ?> \ No newline at end of file |
|
From: Jim H. <jim...@us...> - 2005-08-20 10:41:14
|
Update of /cvsroot/pn-commerce/pn-commerce In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7175 Added Files: pnpmcreditapi.php Log Message: generic credit card paymethod. This is the 'fixed' version that Pat worked on. --- NEW FILE: pnpmcreditapi.php --- <?php // ---------------------------------------------------------------------- // pn-commerce Shopping Cart Solution for PostNuke // http://pncommerce.de // http://www.sourceforge.net/projects/pn-commerce/ // // It is based on PostKart 0.701QA from // Destin LeBlanc [ pos...@ze... ] // ---------------------------------------------------------------------- // Source file: $Source: /cvsroot/pn-commerce/pn-commerce/pnpmcreditapi.php,v $ // // Last changes from: $Author: jimhadfield $ // // Revision: $Revision: 1.37 $ // // Date of revision $Date: 2005/08/20 10:41:03 $ // // ---------------------------------------------------------------------- // LICENSE // // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License (GPL) // 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. // // To read the license please visit http://www.gnu.org/copyleft/gpl.html // ---------------------------------------------------------------------- require_once("modules/pncommerce/common.php"); /** * load the config array and return it * no arguments needed */ function pncommerce_pmcreditapi_getConfig ($args) { $data=pnModGetVar ('pncommerce', 'pmcreditData'); if(isset($data)) { return unserialize($data); } return false; } /** * save the config array * @param $args array of config values */ function pncommerce_pmcreditapi_setConfig ($args) { pnModSetVar ('pncommerce', 'pmcreditData',serialize($args)); } /** * This function is used during the checkout process * it's called after the checkout where the user agrees to * buy the items, so you can do the rest here to finish the * payment process if possible. otherwise just redirect to the next step * called processshippingfinal * don't forget to bypass all important informations * like ON,KID,maxStep * it's important when the user jumps back to earlier steps * * @param $args['KID'] string CustomerID * @param $args['ON'] string order number */ function pncommerce_pmcreditapi_processpayment ($args) { pnRedirect( pnModURL( 'pncommerce', 'user', 'processshippingfinal' ) ); return true; } /** * This function is used during the checkout process * you can let the user provide special information * you need for further processing * when you don't need any info just redirect the user to * getshippingmethod in the pnuser.php * don't forget to bypass all important informations * like BPM,BSM,KID,maxStep * it's important when the user jumps back to earlier steps * @param $args['user'] array with user data */ function pncommerce_pmcreditapi_getdata ($args) { extract ($args); if (!pnModAPILoad( 'pncommerce', 'user')) { return showerrorpage("unable to load pnuserapi", __FILE__, __LINE__); } $decryptedCCNum= decrypt($user['PayMethodData']['CCNum']); $config = pncommerce_pmcreditapi_getConfig(); $card[1]['num'] = 1; $card[2]['num'] = 2; $card[3]['num'] = 3; $card[1]['name'] = _PNC_CARD1; $card[2]['name'] = _PNC_CARD2; $card[3]['name'] = _PNC_CARD3; $card[1]['active'] = $config['card1']; $card[2]['active'] = $config['card2']; $card[3]['active'] = $config['card3']; $card[1]['checked'] = ""; $card[2]['checked'] = ""; $card[3]['checked'] = ""; // step 1: see if the users last used card is still active and mark this for now if( ( $config['card1'] == 'on' ) && ( $user['PayMethodData']['CCType'] == 1) ) { $card[1]['checked'] = "checked"; } elseif( ( $config['card2'] == 'on' ) && ( $user['PayMethodData']['CCType'] == 2) ) { $card[2]['checked'] = "checked"; } elseif( ( $config['card2'] == 'on' ) && ( $user['PayMethodData']['CCType'] == 3) ) { $card[3]['checked'] = "checked"; } else { // step 2: users last used card is invalid or he did not use a card yet // we will activate the first of the three cards we find as active (there is at // least one, the configuration takes care of this) if( $config['card1'] == 'on' ) { $card[1]['checked'] = "checked"; } elseif( $config['card2'] == 'on' ) { $card[2]['checked'] = "checked"; } elseif( $config['card3'] == 'on' ) { $card[3]['checked'] = "checked"; } } $smarty =& new pnRender('pncommerce'); $smarty->caching = false; $smarty->assign( 'decryptedCCNum', $decryptedCCNum ); $smarty->assign( 'cards', $card ); $smarty->assign( 'user', unserialize( pnSessionGetVar( 'PNCUserData' ) ) ); return $smarty->fetch( 'pncommerce_pmcredit_getdata.html' ); } /** * This function is used during the checkout process * you can save the provide information here * getshippingmethod in the pnuser.php * don't forget to bypass all important informations * like BPM,BSM,KID,maxStep * it's important when the user jumps back to earlier steps * * It's important to redirect to getshippingmethod if everything was ok here * * @param $args['KID'] string CustomerID * @param $args['BPM'] string selected Paymethod * @param $args['BSM'] string selected Shippingmethod * @param $args['maxStep'] int highest Step the user reached in this checkout process */ function pncommerce_pmcreditapi_getdataresponse($args) { if (!pnModAPILoad( 'pncommerce', 'user')) { return showerrorpage("unable to load pnuserapi", __FILE__, __LINE__); } $config = pncommerce_pmcreditapi_getConfig(); $user = unserialize( pnSessionGetVar( 'PNCUserData' ) ); list($user['PayMethodData']['CCType'], $CCNum, $user['PayMethodData']['CCExpire'], $user['PayMethodData']['CCVerifyCode']) = pnVarCleanFromInput( 'CCType', 'CCNum', 'CCExpire', 'CCVerifyCode'); // check if CCNum starts with 'XXXX XXXX XXXX', in this case we received a disguised card // number and must see if we already have a valid number in the users array if(strpos($CCNum, 'XXXX XXXX XXXX')===false) { $user['PayMethodData']['CCNum'] = encrypt($CCNum); // encrypt the ccnumber if wanted } pnSessionSetVar( 'PNCUserData', serialize( $user ) ); if($user['PayMethodData']['CCType'] == "0") { $errormsg[] = ""._PNC_YOUFORGOT." "._PNC_CCTYPECAPS.". "._PNC_PLEASEGOBACK; } if(empty($user['PayMethodData']['CCNum'])) { $errormsg[] = ""._PNC_YOUFORGOT." "._PNC_CCNUMBERCAPS.". "._PNC_PLEASEGOBACK; } if(empty($user['PayMethodData']['CCExpire'])) { $errormsg[] = ""._PNC_YOUFORGOT." "._PNC_CCEXPIRECAPS.". "._PNC_PLEASEGOBACK; } if(empty($user['PayMethodData']['CCVerifyCode'])) { $errormsg[] = ""._PNC_YOUFORGOT." "._PNC_CCVERIFYCODECAPS.". "._PNC_PLEASEGOBACK; } if ( count( $errormsg ) > 0 ) { $smarty = new pnRender(); $smarty->caching = false; $smarty->assign( 'errormsg', $errormsg ); $smarty->assign( 'user', $user ); return $smarty->fetch( 'pncommerce_pmcredit_getdataresponse.html' ); } else { // save the data to the db table users pncommerce_pmcreditapi_userinsert (array('user' => $user)); } pnRedirect( pnModURL ( 'pncommerce', 'user', 'getshippingmethod' ) ); return true; } function pncommerce_pmcreditapi_userinsert($args) { extract ($args); $user['PayMethodData']['CCNum'] = str_replace(" ", "", $user['PayMethodData']['CCNum'] ); if (!pnModAPILoad('pncommerce', 'user')) { return showerrorpage("unable to load pnuserapi", __FILE__, __LINE__); } list($dbconn, $pntables) = pncOpenDB(); $tablename = $pntables['pncommerce_users']; $column = $pntables['pncommerce_users_column']; $sql = "UPDATE $tablename SET $column[PayMethod]='pmcredit', $column[PayMethodData]='".pnVarPrepForStore(serialize($user['PayMethodData']))."' WHERE UserName='".pnVarPrepForStore($user['KID'])."'"; $result = pncExecuteSQL($dbconn, $sql, __FILE__, __LINE__); pncCloseDB($result); // pnModAPIFunc ('pncommerce', 'user', 'executesqlDB', // array ('sql' => $sql)); return; } function pncommerce_pmcreditapi_order($args) { extract ($args); if (!pnModAPILoad('pncommerce', 'user')) { return showerrorpage("unable to load pnuserapi", __FILE__, __LINE__); } $data = pnModAPIFunc ('pncommerce', 'user', 'readfromDB', array('table' => 'users', 'fields' => array ('payMethodData'), 'required' => array ('UserName', $KID))); if($data!=false) { $data=$data[0]; } else { pnSessionSetVar('errormsg', _PNC_NODATA); return false; } pnModAPIFunc ('pncommerce', 'user', 'executesqlDB', array ('sql' => "UPDATE ".pnConfigGetVar('prefix')."_pncommerce_orders SET PayMethodData='".pnVarPrepForStore($data)."' WHERE OrderNumber='".(int)$ON."'")); } function pncommerce_pmcreditapi_configintro ($args) { $Mode = pnVarCleanFromInput ('Mode'); if (!pnModAPILoad('pncommerce', 'user')) { return showerrorpage("unable to load pnuserapi", __FILE__, __LINE__); } if (pnSecAuthAction(0, '::', '::', ACCESS_ADMIN)) { switch ($Mode) { case 'install': $default=array('PMCalcFunc'=>'PMCFlat', 'PMCFlatPrice' => '0', 'card1' => 'on', 'card2' => 'on', 'card3' => 'on', 'usemcrypt' => 'on', 'mcryptkey' => 'pleasechangethesecretkey' ); pncommerce_pmcreditapi_setConfig($default); pnModSetVar ('pncommerce', 'pmcredit', 'on'); break; case 'remove': pncommerce_pmcreditapi_quietremove(); break; case 'activate': pnModSetVar ('pncommerce', 'pmcredit', 'on'); break; case 'deactivate': pnModSetVar ('pncommerce', 'pmcredit', 'off'); break; default: break; } pnRedirect( pnModAPIFunc('pncommerce','user','pncModURL', array('Module'=>'pncommerce', 'Section'=> 'admin', 'Function'=>'paymethodconfig'))); return true; } else { return showerrorpage( _PNC_NOAUTH, __FILE__, __LINE__ ); } } function pncommerce_pmcreditapi_showoption($args) { extract ($args); $temp ="<input type='radio' name='PayMethod' value='pmcredit'"; if ( $BPM == 'pmcredit' ) { $temp .= " checked "; } $temp .= ">"._PNC_CCORDER."<br>"; return $temp; } function pncommerce_pmcreditapi_info () { return (_PNC_CCORDER); } function pncommerce_pmcreditapi_footermsg ($args) // $ON or $KID, but never both at the same time !!! // only $ON : we already have an order and read the fields from there // only $KID : we don't have an order yet and read from the users table { extract ($args); $config = pncommerce_pmcreditapi_getConfig(); $cr = "<br>"; if (!pnModAPILoad('pncommerce', 'user')) { return showerrorpage("unable to load pnuserapi", __FILE__, __LINE__); } if(isset($KID)) { $data = pnModAPIFunc ('pncommerce', 'user', 'readfromDB', array('table' => 'users', 'fields' => array ('PayMethodData'), 'required' => array ('UserName', $KID))); } else if (isset($ON)) { $data = pnModAPIFunc ('pncommerce', 'user', 'readfromDB', array('table' => 'orders', 'fields' => array ('PayMethodData'), 'required' => array ('OrderNumber', $ON))); } else { // internal error return ("Internal error when creating footermsg in creditapi<br>"); } $ccdata = unserialize($data[0]); $decryptedCCNum = decrypt($ccdata['CCNum']); // "<font class=\"pn-normal\"> $cardname = array ('American Express', 'Euro/MasterCard', 'VisaCard'); $temp = "".$cardname[(int)$ccdata['CCType']-1].$cr; $temp = $temp._PNC_CCNUMBER.": " . $decryptedCCNum . " " . $cr; $temp = $temp._PNC_CCEXPIRE.": " . $ccdata['CCExpire'] . " " . $cr; $temp = $temp._PNC_WEWILLSHIPUPONAPPROVAL.$cr; return $temp; } function pncommerce_pmcreditapi_quietremove () { pnModDelVar ('pncommerce', 'pmcredit'); pnModDelVar ('pncommerce', 'pmcreditData'); } /** * This function is used during the checkout process * You can calculate a fee for the selected paymethod here * * @param $args['SubTotal'] Double the total costs with shipping included * @return double * @returns the fee for this paymethod */ function pncommerce_pmcreditapi_getPaymethodTotal($args) { //Return 0 = this Paymethod is for free if (!pnModAPILoad('pncommerce', 'user')) { return showerrorpage("unable to load pnuserapi", __FILE__, __LINE__); } $config=pncommerce_pmcreditapi_getConfig(); //add value to array to make the function able to calculate the fee $config['Value']=$args['SubTotal']; return pnModAPIFunc('pncommerce','user','getPMCalcValue',$config); } /** * Asks for special data for this paymethod, for example minimum fee or default fee, ... * Account numbers, ... * **** * You have to redirect to 'paymethodconfig' when you're done * **** * @return String * @returns the config page for this paymethod */ function pncommerce_pmcreditapi_config() { if (!pnModAPILoad('pncommerce', 'admin')) { return showerrorpage("unable to load pnadminapi", __FILE__, __LINE__); } if (!pnModAPILoad('pncommerce', 'user')) { return showerrorpage("unable to load pnuserapi", __FILE__, __LINE__); } if (pnSecAuthAction(0, '::', '::', ACCESS_ADMIN)) { $Submit = pnVarCleanFromInput( 'Submit' ); if( !$Submit ) { $smarty =& new pnRender('pncommerce'); $smarty->caching = false; $config = pncommerce_pmcreditapi_getConfig(); $smarty->assign( 'config', $config ); if( $config['usemcrypt'] == 'on' ) { $smarty->assign( 'usemcrypt', 'checked' ); } if( $config['card1'] == 'on' ) { $smarty->assign( 'card1checked', 'checked' ); } if( $config['card2'] == 'on' ) { $smarty->assign( 'card2checked', 'checked' ); } if( $config['card3'] == 'on' ) { $smarty->assign( 'card3checked', 'checked' ); } return $smarty->fetch( 'pncommerce_pmcredit_configuration.html' ); } else { // submit is set if( !pnSecConfirmAuthKey() ) { return showerrorpage( _PNC_BADAUTHKEY, __FILE__, __LINE__ ); } $storage=array(); $storage['mcryptkey'] = pnVarCleanFromInput( 'mcryptkey' ); $storage['usemcrypt'] = pnVarCleanFromInput( 'usemcrypt' ); $storage['card1'] = pnVarCleanFromInput( 'card1' ); $storage['card2'] = pnVarCleanFromInput( 'card2' ); $storage['card3'] = pnVarCleanFromInput( 'card3' ); $storage['PMCalcFunc'] = pnVarCleanFromInput('PMCalcFunc'); $storage=pnModAPIFunc('pncommerce','user','gatherPMCalcData',$storage); pncommerce_pmcreditapi_setConfig($storage); if( ($storage['card1']=='') && ($storage['card2']=='') && ($storage['card2']=='') ) { pnSessionSetVar( 'errormsg', _PNC_YOUMUSTENABLEATLEASTONECARD ); pnRedirect( pnModAPIFunc('pncommerce','user','pncModURL', array('Module'=>'pncommerce', 'Section'=> 'pmcreditapi', 'Function'=>'config'))); return true; } pnRedirect( pnModAPIFunc('pncommerce','user','pncModURL', array('Module'=>'pncommerce', 'Section'=> 'admin', 'Function'=>'paymethodconfig'))); return true; } } return false; } /** * encrypt * */ function encrypt($ccnum) { $config = pncommerce_pmcreditapi_getConfig(); if($config['usemcrypt']=='on') { // Encryption... $td = mcrypt_module_open(MCRYPT_TripleDES, "", MCRYPT_MODE_ECB, ""); srand((float)microtime() * 1000000); $iv = mcrypt_create_iv(mcrypt_enc_get_iv_size ($td), MCRYPT_RAND); mcrypt_generic_init($td, $config['mcryptkey'], $iv); $ccnum = mcrypt_generic($td, $ccnum ); // store CCNum|iv $ccnum = $ccnum."|".$iv; } return $ccnum; } /** * decrypt * */ function decrypt($ccnum) { $config = pncommerce_pmcreditapi_getConfig(); if( !empty($ccnum) && ($config['usemcrypt'] == 'on')) { // Decryption ... list($ccnum, $iv) = explode("|", $ccnum); $td = mcrypt_module_open(MCRYPT_TripleDES, "", MCRYPT_MODE_ECB, ""); mcrypt_generic_init($td, $config['mcryptkey'], $iv); $ccnum = trim(mdecrypt_generic($td, $ccnum)); if(!pnSecAuthAction(0, 'pncommerce::', '::', ACCESS_ADMIN)) { // replace CCNum w/ XXX's etc... $part = substr($ccnum, strlen($ccnum)-4); $ccnum = "XXXX XXXX XXXX $part"; } } return $ccnum; } ?> |
|
From: Patrick C. <pco...@us...> - 2005-08-20 08:13:37
|
Update of /cvsroot/pn-commerce/pn-commerce In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16186 Modified Files: pnadmin.php Log Message: made a small change to ignore md5 check and start it automatically if curl is present. older version fired up an error on some systems. Index: pnadmin.php =================================================================== RCS file: /cvsroot/pn-commerce/pn-commerce/pnadmin.php,v retrieving revision 1.266 retrieving revision 1.267 diff -C2 -d -r1.266 -r1.267 *** pnadmin.php 8 Aug 2005 19:39:05 -0000 1.266 --- pnadmin.php 20 Aug 2005 08:13:29 -0000 1.267 *************** *** 2607,2612 **** $checkmd5 = ($checkmd5==1) ? true : false; ! $curl = true; ! if( ($checkmd5==true) && (function_exists('curl_init')==false) ) { $checkmd5 = false; --- 2607,2612 ---- $checkmd5 = ($checkmd5==1) ? true : false; ! $curl = true;//($checkmd5==true) && ! if( (function_exists('curl_init')==false) ) { $checkmd5 = false; |
|
From: Jim H. <jim...@us...> - 2005-08-19 09:51:53
|
Update of /cvsroot/pn-commerce/pn-commerce/pnlang/deu In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12614/pnlang/deu Modified Files: global.php Log Message: I added a missing define. I do not know if I have the exact wording for the define. Will whoever created the define please check this and correct my definition of it?? Index: global.php =================================================================== RCS file: /cvsroot/pn-commerce/pn-commerce/pnlang/deu/global.php,v retrieving revision 1.185 retrieving revision 1.186 diff -C2 -d -r1.185 -r1.186 *** global.php 12 Jul 2005 18:02:46 -0000 1.185 --- global.php 19 Aug 2005 09:51:43 -0000 1.186 *************** *** 35,38 **** --- 35,39 ---- // neu + define("_PNC_VATINCLUDED", "VAT Included"); define("_PNC_INVALIDTEMPLATEFILE", "Vorlagendatei existiert nicht oder ist nicht lesbar"); define("_PNC_NEWTEMPLATEFILENAME", "Dateiname der Vorlage"); |
|
From: Jim H. <jim...@us...> - 2005-08-19 09:51:53
|
Update of /cvsroot/pn-commerce/pn-commerce/pnlang/eng In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12614/pnlang/eng Modified Files: global.php Log Message: I added a missing define. I do not know if I have the exact wording for the define. Will whoever created the define please check this and correct my definition of it?? Index: global.php =================================================================== RCS file: /cvsroot/pn-commerce/pn-commerce/pnlang/eng/global.php,v retrieving revision 1.195 retrieving revision 1.196 diff -C2 -d -r1.195 -r1.196 *** global.php 22 Mar 2005 11:47:32 -0000 1.195 --- global.php 19 Aug 2005 09:51:43 -0000 1.196 *************** *** 35,38 **** --- 35,39 ---- //New + define("_PNC_VATINCLUDED", "VAT Included"); define("_PNC_INVALIDTEMPLATEFILE", "Template file does not exist or is not accessible"); define("_PNC_NEWTEMPLATEFILENAME", "Template filename"); |
|
From: Ruediger H. <hae...@us...> - 2005-08-10 02:44:19
|
Update of /cvsroot/pn-commerce/pn-commerce In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24328 Modified Files: pnadmin.php pnadminapi.php pninit.php pnuserapi.php Log Message: Add facility to store prices with VATs included (gross prices) Index: pninit.php =================================================================== RCS file: /cvsroot/pn-commerce/pn-commerce/pninit.php,v retrieving revision 1.84 retrieving revision 1.85 diff -C2 -d -r1.84 -r1.85 *** pninit.php 17 Mar 2005 13:52:03 -0000 1.84 --- pninit.php 8 Aug 2005 19:39:12 -0000 1.85 *************** *** 599,602 **** --- 599,605 ---- return false; } + case '0.95': + pnModSetVar ('pncommerce', 'VatIncluded', 'off'); + } } pnModSetVar( 'pncommerce', 'Version', '0.95' ); *************** *** 781,784 **** --- 784,788 ---- pnModDelVar ('pncommerce', 'MinimumOrderValue'); pnModDelVar ('pncommerce', 'JumpToCartviewAfterAdd'); + pnModDelVar ('pncommerce', 'VatIncluded'); pnModDelVar ('pncommerce', 'status'); *************** *** 787,790 **** --- 791,795 ---- pnModDelVar( 'pncommerce', 'PreOrderModifierSequence' ); pnModDelVar( 'pncommerce', 'PostOrderModifierSequence' ); + // Remove module hooks Index: pnadminapi.php =================================================================== RCS file: /cvsroot/pn-commerce/pn-commerce/pnadminapi.php,v retrieving revision 1.182 retrieving revision 1.183 diff -C2 -d -r1.182 -r1.183 *** pnadminapi.php 26 Jul 2005 09:32:49 -0000 1.182 --- pnadminapi.php 8 Aug 2005 19:39:11 -0000 1.183 *************** *** 425,428 **** --- 425,429 ---- * @param $args['MinimumOrderValue'] String optional * @param $args['JumpToCartviewAfterAdd'] String optional + * @param $args['VatIncluded'] String optional * @param $args['UseAuthKeys'] String optional */ *************** *** 516,519 **** --- 517,521 ---- } pnModSetVar('pncommerce', 'JumpToCartviewAfterAdd', $JumpToCartviewAfterAdd); + pnModSetVar('pncommerce', 'VatIncluded', $VatIncluded); pnModSetVar('pncommerce', 'UseAuthKeys', $UseAuthKeys); *************** *** 551,554 **** --- 553,557 ---- * @param $args['MinimumOrderValue'] String optional * @param $args['JumpToCartviewAfterAdd'] String optional + * @param $args['VatIncluded'] String optional * @param $args['UseAuthKeys'] String optional * @param $args['TaxNumber'] String optional *************** *** 589,592 **** --- 592,596 ---- $args['MinimumOrderValue'] = ' '; $args['JumpToCartviewAfterAdd'] = ' '; + $args['VatIncluded'] = ' '; $args['UseAuthKeys'] = ' '; $args['TaxNumber'] = ' '; Index: pnadmin.php =================================================================== RCS file: /cvsroot/pn-commerce/pn-commerce/pnadmin.php,v retrieving revision 1.265 retrieving revision 1.266 diff -C2 -d -r1.265 -r1.266 *** pnadmin.php 27 Jul 2005 06:08:34 -0000 1.265 --- pnadmin.php 8 Aug 2005 19:39:05 -0000 1.266 *************** *** 185,188 **** --- 185,189 ---- $supplier['MinimumOrderValue']=' '; $supplier['JumpToCartviewAfterAdd']=' '; + $supplier['VatIncluded']=' '; $supplier['UseAuthKeys']=' '; $supplier['TaxNumber']=' '; *************** *** 190,193 **** --- 191,195 ---- $supplier['CountryList']=split(",", _PNC_COUNTRIES); $supplier['JumpToCartviewAfterAddchecked'] = ( $supplier['JumpToCartviewAfterAdd'] ) ? " checked" : ""; + $supplier['VatIncludedChecked'] = ( $supplier['VatIncluded'] ) ? " checked" : ""; $supplier['useauthkeyschecked'] = ( $supplier['UseAuthKeys'] =='on' ) ? " checked" : ""; *************** *** 311,315 **** $TNIMPath, $TMGDPath, $TNWidth, $TNHeight, $ShowItems, $EnablePolicies, $StorePolicies, $AgreeToPolicies, $AcknowledgeLaw, $IndexTemplate, ! $DefaultTaxExempt,$WeightUnit, $MinimumOrderValue, $JumpToCartviewAfterAdd, $UseAuthKeys, $ItemImageReplacement, $ItemImageTNReplacement, $CategoryImageReplacement, $CategoryImageTNReplacement, $UseImageReplacements, $TaxNumber ) --- 313,317 ---- $TNIMPath, $TMGDPath, $TNWidth, $TNHeight, $ShowItems, $EnablePolicies, $StorePolicies, $AgreeToPolicies, $AcknowledgeLaw, $IndexTemplate, ! $DefaultTaxExempt,$WeightUnit, $MinimumOrderValue, $JumpToCartviewAfterAdd, $VatIncluded, $UseAuthKeys, $ItemImageReplacement, $ItemImageTNReplacement, $CategoryImageReplacement, $CategoryImageTNReplacement, $UseImageReplacements, $TaxNumber ) *************** *** 325,329 **** 'TNIMPath', 'TMGDPath', 'TNWidth', 'TNHeight', 'ShowItems', 'EnablePolicies', 'StorePolicies', 'AgreeToPolicies', 'AcknowledgeLaw', 'IndexTemplate', ! 'DefaultTaxExempt','WeightUnit', 'MinimumOrderValue', 'JumpToCartviewAfterAdd', 'UseAuthKeys', 'ItemImageReplacement', 'ItemImageTNReplacement', 'CategoryImageReplacement', 'CategoryImageTNReplacement', 'UseImageReplacements', 'TaxNumber' ); --- 327,331 ---- 'TNIMPath', 'TMGDPath', 'TNWidth', 'TNHeight', 'ShowItems', 'EnablePolicies', 'StorePolicies', 'AgreeToPolicies', 'AcknowledgeLaw', 'IndexTemplate', ! 'DefaultTaxExempt','WeightUnit', 'MinimumOrderValue', 'JumpToCartviewAfterAdd', 'VatIncluded', 'UseAuthKeys', 'ItemImageReplacement', 'ItemImageTNReplacement', 'CategoryImageReplacement', 'CategoryImageTNReplacement', 'UseImageReplacements', 'TaxNumber' ); *************** *** 380,383 **** --- 382,386 ---- $supplier['MinimumOrderValue']=$MinimumOrderValue; $supplier['JumpToCartviewAfterAdd']=$JumpToCartviewAfterAdd; + $supplier['VatIncluded']=$VatIncluded; $supplier['UseAuthKeys']=$UseAuthKeys; pnModAPIFunc('pncommerce','admin','setConfigSupplier',$supplier); Index: pnuserapi.php =================================================================== RCS file: /cvsroot/pn-commerce/pn-commerce/pnuserapi.php,v retrieving revision 1.270 retrieving revision 1.271 diff -C2 -d -r1.270 -r1.271 *** pnuserapi.php 30 Mar 2005 19:34:19 -0000 1.270 --- pnuserapi.php 8 Aug 2005 19:39:14 -0000 1.271 *************** *** 1707,1713 **** } ! //make sure that we have no ,/. problems in the numberformat if( $Item['VatID'] != 0 ) { $val = split ( "[.,]", pnModGetVar( 'pncommerce', 'VATID'.$Item['VatID'] ) ); $Item['TrueVatID'] = true; --- 1707,1714 ---- } ! // make sure that we have no ,/. problems in the numberformat if( $Item['VatID'] != 0 ) { + // VAT from Item $val = split ( "[.,]", pnModGetVar( 'pncommerce', 'VATID'.$Item['VatID'] ) ); $Item['TrueVatID'] = true; *************** *** 1715,1718 **** --- 1716,1720 ---- else { + // VAT not defined for Item, use VAT from hierarchy of categories instead. $val = split ( "[.,]", pnModAPIFunc( 'pncommerce', 'user', 'GetVATbyItemID', array( 'ItemID' => $Item['ID'], *************** *** 1722,1729 **** $Item['Vat'] = $val[0] + ( $val[1] / 10 ); // $val = split ( "[.,]", $Cost ); ! ! //Continue calculating ! $Item['VatAmount'] = round( ( ( $Item['Cost'] * $Item['Vat'] ) / 100), 2 ); ! $Item['CostLong'] = $Item['Cost'] + $Item['VatAmount']; if( $Item['TaxExempt'] == 'on' ) { --- 1724,1740 ---- $Item['Vat'] = $val[0] + ( $val[1] / 10 ); // $val = split ( "[.,]", $Cost ); ! if (pnModGetVar('pncommerce', 'VatIncluded') != 'on') ! { ! // price doesn't contain vat, like in the US ! $Item['VatAmount'] = round( ( ( $Item['Cost'] * $Item['Vat'] ) / 100), 2 ); ! $Item['CostLong'] = $Item['Cost'] + $Item['VatAmount']; ! } ! else ! { ! // price already contains the vat, like for end user shops in Germany ! $Item['VatAmount'] = $Item['Cost'] / (100 + $Item['Vat']) * ($Item['Vat']); ! $Item['CostLong'] = $Item['Cost']; ! $Item['Cost'] = $Item['CostLong'] - $Item['VatAmount']; ! } if( $Item['TaxExempt'] == 'on' ) { *************** *** 1823,1828 **** $newcartdataitem['ItemCost'] = $cartdataitem['ItemCost']; $newcartdataitem['ItemVAT'] = $cartdataitem['ItemVAT']; ! ! $newcartdataitem['ItemVATAmount'] = round( ( ( $newcartdataitem['ItemCost'] * $newcartdataitem['ItemVAT'] ) / 100), 2 ); $newcartdataitem['ItemVATAmountTotal'] = $newcartdataitem['ItemVATAmount'] * $newcartdataitem['ItemQuantity']; $newcartdataitem['ItemCostLong'] = $newcartdataitem['ItemCost'] + $newcartdataitem['ItemVATAmount']; --- 1834,1848 ---- $newcartdataitem['ItemCost'] = $cartdataitem['ItemCost']; $newcartdataitem['ItemVAT'] = $cartdataitem['ItemVAT']; ! ! if (pnModGetVar('pncommerce', 'VatIncluded') != 'on') ! { ! $newcartdataitem['ItemVATAmount'] = round( ( ( $newcartdataitem['ItemCost'] * $newcartdataitem['ItemVAT'] ) / 100), 2 ); ! } ! else ! { ! // rounding will result in rounding errors here ! // modifier pncShowAsPrice will to this for us anyway ! $newcartdataitem['ItemVATAmount'] = ( ( $newcartdataitem['ItemCost'] * $newcartdataitem['ItemVAT'] ) / 100); ! } $newcartdataitem['ItemVATAmountTotal'] = $newcartdataitem['ItemVATAmount'] * $newcartdataitem['ItemQuantity']; $newcartdataitem['ItemCostLong'] = $newcartdataitem['ItemCost'] + $newcartdataitem['ItemVATAmount']; |
|
From: Ruediger H. <hae...@us...> - 2005-08-10 02:37:58
|
Update of /cvsroot/pn-commerce/pn-commerce/pntemplates In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24328/pntemplates Modified Files: pncommerce_admin_config.html pncommerce_admin_itemedit.html Log Message: Add facility to store prices with VATs included (gross prices) Index: pncommerce_admin_config.html =================================================================== RCS file: /cvsroot/pn-commerce/pn-commerce/pntemplates/pncommerce_admin_config.html,v retrieving revision 1.46 retrieving revision 1.47 diff -C2 -d -r1.46 -r1.47 *** pncommerce_admin_config.html 22 Mar 2005 12:14:59 -0000 1.46 --- pncommerce_admin_config.html 8 Aug 2005 19:39:17 -0000 1.47 *************** *** 161,166 **** <td><b><!--[pnml name='_PNC_CREATEITEMSASTAXEXEMPT' html=1 ]--></b></td></tr> ! <tr> ! <td align="right"><input TYPE="checkbox" NAME="JumpToCartviewAfterAdd" VALUE="on"<!--[ $shopConfigSupplier.JumpToCartviewAfterAddchecked ]-->> </td> <td> --- 161,166 ---- <td><b><!--[pnml name='_PNC_CREATEITEMSASTAXEXEMPT' html=1 ]--></b></td></tr> ! <tr> ! <td align="right"><input TYPE="checkbox" NAME="JumpToCartviewAfterAdd" VALUE="on"<!--[ $shopConfigSupplier.JumpToCartviewAfterAddchecked ]-->> </td> <td> *************** *** 168,171 **** --- 168,178 ---- </td> </tr> + <tr> + <td align="right"><input TYPE="checkbox" NAME="VatIncluded" VALUE="on" <!--[ $shopConfigSupplier.VatIncludedChecked ]-->> + </td> + <td> + <b><!--[ pnml name='_PNC_VATINCLUDED' html=1 ]--></b> + </td> + </tr> <tr> <td align="right"> Index: pncommerce_admin_itemedit.html =================================================================== RCS file: /cvsroot/pn-commerce/pn-commerce/pntemplates/pncommerce_admin_itemedit.html,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** pncommerce_admin_itemedit.html 13 Jul 2005 09:13:22 -0000 1.26 --- pncommerce_admin_itemedit.html 8 Aug 2005 19:39:18 -0000 1.27 *************** *** 17,20 **** --- 17,21 ---- <!--[ pncGetSchemes assign="schemes" ]--> <!--[ pncGetConfigThumbnail ]--> + <!--[ pncGetConfigSupplier ]--> <b><!--[ pnml name='_PNC_TYPENEWITEM' ]--></b><br> *************** *** 78,82 **** --- 79,87 ---- </td> <td align='left'> + <!--[ if $shopConfigSupplier.VatIncluded == 'on' ]--> + <input class='pn-text' type='text' name='ItemCost' size='50' value='<!--[ $Item.CostLong|pncShowAsPrice:true:false:false ]-->'> + <!--[ else ]--> <input class='pn-text' type='text' name='ItemCost' size='50' value='<!--[ $Item.Cost|pncShowAsPrice:true:false:false ]-->'> + <!--[ /if ]--> </td> </tr> |
|
From: Ruediger H. <hae...@us...> - 2005-07-27 06:08:46
|
Update of /cvsroot/pn-commerce/pn-commerce In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32151 Modified Files: pnadmin.php Log Message: Fix: xml can only have _one_ root tag / make xml "well formed" Enhancement: iterate through serialized arrays like "cartdata" in orders table Index: pnadmin.php =================================================================== RCS file: /cvsroot/pn-commerce/pn-commerce/pnadmin.php,v retrieving revision 1.264 retrieving revision 1.265 diff -C2 -d -r1.264 -r1.265 *** pnadmin.php 26 Jul 2005 09:32:50 -0000 1.264 --- pnadmin.php 27 Jul 2005 06:08:34 -0000 1.265 *************** *** 1897,1900 **** --- 1897,1961 ---- function pncommerce_admin_export_table_send() { + + function array2xml($items, $xml, $parent = '') + { + $arrays = array(); + + // first process all elementary types, treat them as xml attributes, + // not as xml tags. + foreach($items as $key => $item) + { + if (is_array($item)) + { + // we need to remember arrays and process them at the end + $arrays[$key] = $item; + } + else + { + $item = str_replace( + array('&', '<', '>', '"'), + array('&', '<', '>', '"'), + $item); + if (ereg('^[0-9]', $key)) + { + // Special case for arrays items indexed with integers: + // xml attributenames must not start with a digit. + // Make tags of them. + $xml .= '>' . "\r\n" . '<' . $parent . '_row id="' . $key . '" value="' . $item . '" /'; + } + else + { + $xml .= $key . '="' . $item .'" '; + } + } + } // foreach(elementary data types... + $xml .= '>' . "\r\n"; + + // all elementary types have been processed, now continue with the + // arrays: + foreach($arrays as $key => $item) + { + if (ereg('^[0-9]', $key)) + { + // special case for arrays just indexed with integers: + // xml tagnames must not start with a digit + $startTag = '<' . $parent . '_row id="' . $key . '" '; + $endTag = '</' . $parent . '_row>' . "\r\n"; + } + else + { + // named keys / associative arrays + $startTag = '<' . $key . ' '; + $endTag = '</' . $key . '>' . "\r\n"; + } + + $xml .= $startTag; + // recursively call this function + array2xml($item, &$xml, $key); + $xml .= $endTag; + } // foeach(arrays... + } // function array2xml + + if (!pnModAPILoad('pncommerce', 'admin')) { *************** *** 1965,1975 **** $mime_type = 'text/xml'; // first add the xml tag ! $dump_buffer .= '<?xml version="1.0" encoding="iso-8859-1"?>'."\n"; // some comments ! $dump_buffer .= '<!-- pncommerce '.pnModGetVar( 'pncommerce', 'Version').' XML-Dump http://www.pncommerce.de (main site)-->'."\n"; // the data foreach ($result as $line) { ! $dump_buffer .= ' <' . $table . '>'."\n"; for ($k=0; $k<count($tablecolumn);$k++) { --- 2026,2037 ---- $mime_type = 'text/xml'; // first add the xml tag ! $dump_buffer .= '<?xml version="1.0" encoding="iso-8859-1"?>'."\r\n"; // some comments ! $dump_buffer .= '<!-- pncommerce '.pnModGetVar( 'pncommerce', 'Version').' XML-Dump http://www.pncommerce.de (main site)-->'."\r\n"; // the data + $dump_buffer .= '<' . $table . '>' . "\r\n"; foreach ($result as $line) { ! $dump_buffer .= '<' . $table . '_row>'."\r\n"; for ($k=0; $k<count($tablecolumn);$k++) { *************** *** 1982,1991 **** $col=$tablecolumnas[$k]; } ! $dump_buffer .=" <".$col.">"; ! $dump_buffer .=$line[$k]; ! $dump_buffer .="</".$col.">\n"; } ! $dump_buffer .= " </" . $table .">\n"; } } else --- 2044,2084 ---- $col=$tablecolumnas[$k]; } ! // fix for incorrect serialized data ! $line[$k] = str_replace('\\"', '"', $line[$k]); ! // end of fix ! if (is_array(unserialize($line[$k]))) ! { ! if (false) ! { ! // write arrays down as CDATA being ignored by xml ! // processors. ! $dump_buffer .="<".$col.">"; ! $dump_buffer .= '<![CDATA[' . "\r\n"; ! $dump_buffer .= $line[$k] . "\r\n"; ! $dump_buffer .= ']]>' . "\r\n"; ! } ! else ! { ! // Array: just open tag, array items will be ! // added as attributes ! $dump_buffer .="<".$col . " "; ! array2xml(unserialize($line[$k]), &$dump_buffer); ! } ! } ! else ! { ! // elementary data type ! $dump_buffer .="<".$col.">"; ! $line[$k] = str_replace( ! array('<', '>', '&' , '"'), ! array('<', '>', '&', '"'), ! $line[$k]); ! $dump_buffer .= $line[$k]; ! } ! $dump_buffer .="</".$col.">\r\n"; } ! $dump_buffer .= "</" . $table ."_row>\r\n"; } + $dump_buffer .= '</' . $table . '>' . "\r\n"; } else |
|
From: Ruediger H. <hae...@us...> - 2005-07-26 09:32:59
|
Update of /cvsroot/pn-commerce/pn-commerce In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8590 Modified Files: pnadminapi.php pnadmin.php Log Message: finish code for recalculating ordered quantities of all items Index: pnadminapi.php =================================================================== RCS file: /cvsroot/pn-commerce/pn-commerce/pnadminapi.php,v retrieving revision 1.181 retrieving revision 1.182 diff -C2 -d -r1.181 -r1.182 *** pnadminapi.php 12 Jul 2005 13:14:57 -0000 1.181 --- pnadminapi.php 26 Jul 2005 09:32:49 -0000 1.182 *************** *** 2481,2523 **** */ - // unfinished code // - function pncommerce_adminapi_rebuildOrderedQuantity() { ! if( !pnModAPILoad( 'pncommerce', 'user' ) ) { return showerrorpage("unable to load pnuserapi", __FILE__, __LINE__); - } if (!pnSecAuthAction(0, 'pncommerce::', "::", ACCESS_ADMIN)) { return showerrorpage(_PNC_NOAUTH, __FILE__, __LINE__); - } // get the number of orders in the db ! $ordercount = pnModAPIFunc( 'pncommerce', 'user', 'gethighidfromDB', ! array( 'table' => 'orders', ! 'indexfield' => 'OrderNumber' ) ); ! if( $ordercount > 0 ) { ! for($i=1;$i<=$ordercount;$i++) { // read the userid for order $i ! list( $UserID ) = pnModAPIFunc( 'pncommerce', 'user', 'readfromDB', ! array( 'table' => 'orders', ! 'fields' => array( 'UserID' ), ! 'required' => array( 'OrderNumber', $i ) ) ); ! $order = pnModAPIFunc( 'pncommerce', 'user', 'getOrder', ! array( 'ON' => $i, ! 'KID' => $UserID ) ); ! if( $order <> false ) { // cycle through the order items ! foreach( $order['CartItems'] as $Item ) { ! } } } return true; } --- 2481,2540 ---- */ function pncommerce_adminapi_rebuildOrderedQuantity() { ! if (!pnModAPILoad('pncommerce', 'user')) { return showerrorpage("unable to load pnuserapi", __FILE__, __LINE__); } if (!pnSecAuthAction(0, 'pncommerce::', "::", ACCESS_ADMIN)) { return showerrorpage(_PNC_NOAUTH, __FILE__, __LINE__); } + + // Array to store itemIDs and their ordered quantities + $orderedItems = array(); + // get the number of orders in the db ! $ordercount = pnModAPIFunc('pncommerce', 'user', 'gethighidfromDB', ! array('table' => 'orders', ! 'indexfield' => 'OrderNumber')); ! if ($ordercount > 0) { ! for ($i = 1; $i <= $ordercount; $i++) { // read the userid for order $i ! list($UserID) = pnModAPIFunc('pncommerce', 'user', 'readfromDB', ! array('table' => 'orders', ! 'fields' => array('UserID'), ! 'required' => array('OrderNumber', $i))); ! $order = pnModAPIFunc('pncommerce', 'user', 'getOrder', ! array('ON' => $i, ! 'KID' => $UserID)); ! // only count items of orders which haven't been deleted ! if (($order <> false) && ($order['OrderStatus'] <> 99)) { // cycle through the order items ! foreach( $order['CartData']['Items'] as $cartItem ) { ! $itemID = $cartItem['ItemID']; ! $quantity = $cartItem['ItemQuantity']; ! if (isset($orderedItems[$itemID])) ! { ! $orderedItems[$itemID] += $quantity; ! } ! else ! { ! $orderedItems[$itemID] = $quantity; ! } } } } + + // update the QuantityOrdered in the items table + foreach($orderedItems as $itemId => $quantity) + { + $sql = 'UPDATE ' . pnConfigGetVar('prefix') . '_pncommerce_items SET QuantityOrdered = ' . $quantity . ' WHERE ItemID = ' . $itemId; + pncommerce_userapi_executesqlDB(array('sql' => $sql)); + } return true; } Index: pnadmin.php =================================================================== RCS file: /cvsroot/pn-commerce/pn-commerce/pnadmin.php,v retrieving revision 1.263 retrieving revision 1.264 diff -C2 -d -r1.263 -r1.264 *** pnadmin.php 13 Jul 2005 15:49:18 -0000 1.263 --- pnadmin.php 26 Jul 2005 09:32:50 -0000 1.264 *************** *** 2797,2801 **** { // rebuild OrderedQuantity ! // $res = pnModAPIFunc( 'pncommerce', 'admin', 'rebuildOrderedQuantity' ); } // make the shop active again --- 2797,2801 ---- { // rebuild OrderedQuantity ! $res = pnModAPIFunc( 'pncommerce', 'admin', 'rebuildOrderedQuantity' ); } // make the shop active again |
|
From: Ruediger H. <hae...@us...> - 2005-07-13 20:50:48
|
Update of /cvsroot/pn-commerce/pn-commerce/pntemplates/plugins In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21102 Modified Files: function.pncCategoryPath.php Log Message: Enable translations for category names Index: function.pncCategoryPath.php =================================================================== RCS file: /cvsroot/pn-commerce/pn-commerce/pntemplates/plugins/function.pncCategoryPath.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** function.pncCategoryPath.php 2 Jul 2004 14:49:46 -0000 1.5 --- function.pncCategoryPath.php 13 Jul 2005 20:50:39 -0000 1.6 *************** *** 69,78 **** { break; ! } if( $categoryentry['ID'] == $startcategoryid ) { // we reached the starting category (the one recently shown) so we simply // show its name here instead of showing a redundant link ! $cattree .= $categoryentry['Name']; } else --- 69,85 ---- { break; ! } ! // try to translate the category name ! $categoryname = constant($categoryentry['Name']); ! if ($categoryname == "") ! { ! // no translation found, use original text ! $categoryname = $categoryentry['Name']; ! } if( $categoryentry['ID'] == $startcategoryid ) { // we reached the starting category (the one recently shown) so we simply // show its name here instead of showing a redundant link ! $cattree .= $categoryname; } else *************** *** 84,88 **** 'Function' => 'categoryview', 'Args' => array( 'CategoryID' => $categoryentry['ID'] ) ) ); ! $cattree .= "<a $class href='$url'>".$categoryentry['Name']."</a> $separator "; } } --- 91,95 ---- 'Function' => 'categoryview', 'Args' => array( 'CategoryID' => $categoryentry['ID'] ) ) ); ! $cattree .= "<a $class href='$url'>".$categoryname."</a> $separator "; } } |
|
From: Ruediger H. <hae...@us...> - 2005-07-13 15:49:29
|
Update of /cvsroot/pn-commerce/pn-commerce In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12724 Modified Files: pnadmin.php Log Message: Fix: correct typo in function name Index: pnadmin.php =================================================================== RCS file: /cvsroot/pn-commerce/pn-commerce/pnadmin.php,v retrieving revision 1.262 retrieving revision 1.263 diff -C2 -d -r1.262 -r1.263 *** pnadmin.php 13 Jul 2005 09:16:45 -0000 1.262 --- pnadmin.php 13 Jul 2005 15:49:18 -0000 1.263 *************** *** 3075,3079 **** { $sql.=" $searcharea LIKE '%".pnVarPrepForStore($searchstring)."%' ! ORDER BY ".pnVarPrepStore($orderby).";"; } // for later use we store the query in a session variable --- 3075,3079 ---- { $sql.=" $searcharea LIKE '%".pnVarPrepForStore($searchstring)."%' ! ORDER BY ".pnVarPrepForStore($orderby).";"; } // for later use we store the query in a session variable |
|
From: Ruediger H. <hae...@us...> - 2005-07-13 09:16:53
|
Update of /cvsroot/pn-commerce/pn-commerce/pntemplates/plugins In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32238/pntemplates/plugins Modified Files: modifier.pncShowAsPrice.php Log Message: Enable use of country specific separators for item weight. Index: modifier.pncShowAsPrice.php =================================================================== RCS file: /cvsroot/pn-commerce/pn-commerce/pntemplates/plugins/modifier.pncShowAsPrice.php,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** modifier.pncShowAsPrice.php 1 Aug 2004 15:45:19 -0000 1.13 --- modifier.pncShowAsPrice.php 13 Jul 2005 09:16:45 -0000 1.14 *************** *** 50,54 **** $temp = number_format( $amount, $decimals, $decimaldelimiter, $thousandssep); ! if( ($showcurrency==true) || ($locsetting['DefaultCurrencySymbol']>0) ) { switch($locsetting['DefaultCurrencySymbol']) --- 50,54 ---- $temp = number_format( $amount, $decimals, $decimaldelimiter, $thousandssep); ! if ($showcurrency==true) { switch($locsetting['DefaultCurrencySymbol']) *************** *** 98,100 **** } ! ?> \ No newline at end of file --- 98,100 ---- } ! ?> |
|
From: Ruediger H. <hae...@us...> - 2005-07-13 09:16:53
|
Update of /cvsroot/pn-commerce/pn-commerce In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32238 Modified Files: pnadmin.php Log Message: Enable use of country specific separators for item weight. Index: pnadmin.php =================================================================== RCS file: /cvsroot/pn-commerce/pn-commerce/pnadmin.php,v retrieving revision 1.261 retrieving revision 1.262 diff -C2 -d -r1.261 -r1.262 *** pnadmin.php 12 Jul 2005 13:19:05 -0000 1.261 --- pnadmin.php 13 Jul 2005 09:16:45 -0000 1.262 *************** *** 1240,1244 **** $ItemCost = pnModAPIFunc('pncommerce', 'admin', 'convertToNumber', array('value' => $ItemCost)); ! // $Weight = pnModAPIFunc('pncommerce', 'admin', 'convertToNumber', array('value' => $Weight)); $ItemSKU = ereg_replace( "[\/]", "", $ItemSKU); $ItemName = trim($ItemName); --- 1240,1244 ---- $ItemCost = pnModAPIFunc('pncommerce', 'admin', 'convertToNumber', array('value' => $ItemCost)); ! $Weight = pnModAPIFunc('pncommerce', 'admin', 'convertToNumber', array('value' => $Weight)); $ItemSKU = ereg_replace( "[\/]", "", $ItemSKU); $ItemName = trim($ItemName); *************** *** 2281,2284 **** --- 2281,2285 ---- } + $search = pnVarCleanFromInput( 'search' ); |