From: <te...@us...> - 2013-07-03 07:18:42
|
Revision: 6043 http://sourceforge.net/p/web-erp/reponame/6043 Author: tehonu Date: 2013-07-03 07:18:37 +0000 (Wed, 03 Jul 2013) Log Message: ----------- Added ShopAdditionalStockLocations to Web-Store and re-organize settings Modified Paths: -------------- trunk/ShopParameters.php trunk/sql/mysql/upgrade4.10-4.11.sql Modified: trunk/ShopParameters.php =================================================================== --- trunk/ShopParameters.php 2013-07-02 03:22:26 UTC (rev 6042) +++ trunk/ShopParameters.php 2013-07-03 07:18:37 UTC (rev 6043) @@ -72,6 +72,10 @@ $SQL[] = "UPDATE config SET confvalue = '".$_POST['X_ShopShowQOHColumn']."' WHERE confname = 'ShopShowQOHColumn'"; } + if ($_SESSION['ShopAdditionalStockLocations'] != $_POST['X_ShopAdditionalStockLocations'] ) { + $SQL[] = "UPDATE config SET confvalue = '".$_POST['X_ShopAdditionalStockLocations']."' WHERE confname = 'ShopAdditionalStockLocations'"; + } + if ($_SESSION['ShopAllowSurcharges'] != $_POST['X_ShopAllowSurcharges'] ) { $SQL[] = "UPDATE config SET confvalue = '".$_POST['X_ShopAllowSurcharges']."' WHERE confname = 'ShopAllowSurcharges'"; } @@ -189,10 +193,22 @@ <th>' . _('Notes') . '</th> </tr>'; -echo '<tr> - <th colspan="3">' . _('General Settings') . '</th></tr>'; +echo '<tr><th colspan="3">' . _('General Settings') . '</th></tr>'; echo $TableHeader; +echo '<tr> + <td>' . _('Test or Live Mode') . ':</td> + <td><select name="X_ShopMode">'; + if ($_SESSION['ShopMode']== 'test' OR $AllowDemoMode){ + echo '<option selected="selected" value="test">' . _('Test') . '</option> + <option value="live">' . _('Live') . '</option>'; + } else { + echo '<option value="test">' . _('Test') . '</option> + <option selected="selected" value="live">' . _('Live') . '</option>'; + } + echo '</select></td> + <td>' . _('Must change this to live mode when the shop is activie. No PayPal or credit card transactions will be processed in test mode') . '</td> + </tr>'; //Shop Name echo '<tr> <td>' . _('Shop Name') . ':</td> @@ -243,6 +259,10 @@ <td>' . _('This text will appear on the web-store page that spells out the freight policy of the web-shop') . '</td> </tr>'; + +echo '<tr><th colspan="3">' . _('Web-Store Behaviour Settings') . '</th></tr>'; +echo $TableHeader; + echo '<tr> <td>' . _('Show Only Items With Available Stock') . ':</td> <td><select name="X_ShopShowOnlyAvailableItems">'; @@ -270,8 +290,14 @@ echo '</select></td> <td>' . _('Shows / Hides the QOH column Select Hide if you do not want customers to know how many stock do you currently hold.') . '</td> </tr>'; + +echo '<tr> + <td>' . _('Additional Stock Locations') . ':</td> + <td><input type="text" size="80" maxlength="100" name="X_ShopAdditionalStockLocations" value="' . $_SESSION['ShopAdditionalStockLocations'] . '" /></td> + <td>' . _('List of additional stock location codes, sepparated by comma. Web-Stote will consider stock at the default customer location plus these ones. + Leave empty if only will consider default customer location. Example: LOC01, LOC02, LOC03') . '</td> + </tr>'; - echo '<tr> <td>' . _('Allow Payment Surcharges') . ':</td> <td><select name="X_ShopAllowSurcharges">'; @@ -301,6 +327,11 @@ <td>' . _('Select the webERP service item to use for payment surcharges to be processed as') . '</td> </tr>'; + + +echo '<tr><th colspan="3">' . _('Bank Transfer Settings') . '</th></tr>'; +echo $TableHeader; + echo '<tr> <td>' . _('Allow Bank Transfer Payment') . ':</td> <td><select name="X_ShopAllowBankTransfer">'; @@ -320,6 +351,9 @@ <td>' . _('The bank transfer surcharge') . '</td> </tr>'; +echo '<tr><th colspan="3">' . _('Paypal Settings') . '</th></tr>'; +echo $TableHeader; + echo '<tr> <td>' . _('Allow PayPal Payment') . ':</td> <td><select name="X_ShopAllowPayPal">'; @@ -355,6 +389,32 @@ <td>' . _('The PayPal surcharge') . '</td> </tr>'; +if ($AllowDemoMode){ + echo '<tr> + <td>' . _('Paypal user account details') . '</td> + <td colspan="2">' . _('Cannot be set in the demo') . '</td> + </tr>'; +} else { + echo '<tr> + <td>' . _('PayPal User') . ':</td> + <td><input type="text" class="noSpecialChars" size="40" maxlength="40" name="X_ShopPayPalUser" value="' . $_SESSION['ShopPayPalUser'] . '" /></td> + <td>' . _('The PayPal Merchant User account for Pay Pal Express Checkout') . '</td> + </tr>'; + echo '<tr> + <td>' . _('PayPal Password') . ':</td> + <td><input type="text" size="20" maxlength="20" name="X_ShopPayPalPassword" value="' . $_SESSION['ShopPayPalPassword'] . '" /></td> + <td>' . _('The PayPal Merchant account password for Pay Pal Express Checkout') . '</td> + </tr>'; + echo '<tr> + <td>' . _('PayPal Signature') . ':</td> + <td><input type="text" size="80" maxlength="100" name="X_ShopPayPalSignature" value="' . $_SESSION['ShopPayPalSignature'] . '" /></td> + <td>' . _('The PayPal merchant account signature for Pay Pal Express Checkout') . '</td> + </tr>'; +} + +echo '<tr><th colspan="3">' . _('Credit Card Processing Settings') . '</th></tr>'; +echo $TableHeader; + echo '<tr> <td>' . _('Allow Credit Card Payments') . ':</td> <td><select name="X_ShopAllowCreditCards">'; @@ -417,20 +477,8 @@ <td>' . _('Select the webERP bank account to use for receipts processed by credit card') . '</td> </tr>'; -echo '<tr> - <td>' . _('Test or Live Mode') . ':</td> - <td><select name="X_ShopMode">'; - if ($_SESSION['ShopMode']== 'test' OR $AllowDemoMode){ - echo '<option selected="selected" value="test">' . _('Test') . '</option> - <option value="live">' . _('Live') . '</option>'; - } else { - echo '<option value="test">' . _('Test') . '</option> - <option selected="selected" value="live">' . _('Live') . '</option>'; - } - echo '</select></td> - <td>' . _('Must change this to live mode when the shop is activie. No PayPal or credit card transactions will be processed in test mode') . '</td> - </tr>'; + if ($AllowDemoMode){ echo '<tr> <td>' . _('Credit card user account details') . '</td> @@ -438,21 +486,6 @@ </tr>'; } else { echo '<tr> - <td>' . _('PayPal User') . ':</td> - <td><input type="text" class="noSpecialChars" size="40" maxlength="40" name="X_ShopPayPalUser" value="' . $_SESSION['ShopPayPalUser'] . '" /></td> - <td>' . _('The PayPal Merchant User account for Pay Pal Express Checkout') . '</td> - </tr>'; - echo '<tr> - <td>' . _('PayPal Password') . ':</td> - <td><input type="text" size="20" maxlength="20" name="X_ShopPayPalPassword" value="' . $_SESSION['ShopPayPalPassword'] . '" /></td> - <td>' . _('The PayPal Merchant account password for Pay Pal Express Checkout') . '</td> - </tr>'; - echo '<tr> - <td>' . _('PayPal Signature') . ':</td> - <td><input type="text" size="80" maxlength="100" name="X_ShopPayPalSignature" value="' . $_SESSION['ShopPayPalSignature'] . '" /></td> - <td>' . _('The PayPal merchant account signature for Pay Pal Express Checkout') . '</td> - </tr>'; - echo '<tr> <td>' . _('PayPal Pro User') . ':</td> <td><input type="text" class="noSpecialChars" size="40" maxlength="40" name="X_ShopPayPalProUser" value="' . $_SESSION['ShopPayPalProUser'] . '" /></td> <td>' . _('The PayPal Pro Merchant User account for credit card payment available in only USA and Canada') . '</td> Modified: trunk/sql/mysql/upgrade4.10-4.11.sql =================================================================== --- trunk/sql/mysql/upgrade4.10-4.11.sql 2013-07-02 03:22:26 UTC (rev 6042) +++ trunk/sql/mysql/upgrade4.10-4.11.sql 2013-07-03 07:18:37 UTC (rev 6043) @@ -161,6 +161,7 @@ INSERT INTO config VALUES ('ShopShowOnlyAvailableItems','0'); INSERT INTO config VALUES ('ShopShowQOHColumn','1'); +INSERT INTO config VALUES ('ShopAdditionalStockLocations',''); UPDATE config SET confvalue='4.11.0' WHERE confname='VersionNumber'; |