Re: Super Orders v4.0 Support Thread (for ZC v1.5.x)
Is it possible to use this plugin to create a order for a customer ? I have one that is older and couldn't figure out how to make an account. So i made one for them and just sent them an invoice for payment from square. However I would like to print them up and packing slip and have a place in the future where they can look up their order information. I have installed the add customer plugin already. Just need none to add orders to those customers.
zencart 1.5.6c
php 7.4
Re: Super Orders v4.0 Support Thread (for ZC v1.5.x)
Yes, you can create an order on behalf of a customer. It includes the Purchase Order payment module. That allows you to bill them after checkout, then collect and apply payment later.
Re: Super Orders v4.0 Support Thread
Hello, After upgrading from zencart 1.55f + SO 4.09 to zencart 1.57d + SO 5.0. (using PHP 743, MySql 555) I got this error message when I try to excute "Cash report"
#6 require(D:\xampp734\htdocs\pechesud\bureau\super_report_cash.php) called at [D:\xampp734\htdocs\pechesud\bureau\index.php:11]
--> PHP Fatal error: 1146:Table 'bdpechesud.zen_so_payment_types_description' doesn't exist :: SELECT ptd.payment_type_full
FROM zen_so_payment_types pt
LEFT JOIN zen_so_payment_types_description ptd ON ptd.payment_type_id = pt.payment_type_id
AND ptd.language_id = 3
WHERE pt.payment_type_code LIKE ''
LIMIT 1 ==> (as called by) D:\xampp734\htdocs\pechesud\bureau\includes\functions\extra_functions\super_orde rs_functions.php on line 150 <== in D:\xampp734\htdocs\pechesud\includes\classes\db\mysql\query_factory.php on line 171.
What I did:
0-Uninstall SO with a_super_orders_uninstall.sql in my V155f database
1-I delete all Deprecated files
2-Upgrade Zencart database with (zc_install)
3-Copy all new files from 1_Base_Files into the ROOT
4-Open Zencart in Admin section
5-SO update passed without error
But it seems missing on table in my database : so_payment_types_description
Does someone know how I create recreate this table, I didn't find where this table is create.
Thanks
Re: Super Orders v4.0 Support Thread
I have updated the Github link on this plugin's home page to point to @strelitzia's repo.
Re: Super Orders v4.0 Support Thread
> But it seems missing on table in my database : so_payment_types_description
> Does someone know how I create recreate this table, I didn't find where this table is create.
You'll need to remove (or change) the prefix per your configuration.
Code:
-- phpMyAdmin SQL Dump
-- version 5.2.0
-- https://www.phpmyadmin.net/
--
-- Host: localhost:8889
-- Generation Time: Nov 24, 2022 at 06:05 PM
-- Server version: 5.7.34
-- PHP Version: 8.1.11
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;
--
-- Database: `security`
--
-- --------------------------------------------------------
--
-- Table structure for table `zen_so_payment_types`
--
CREATE TABLE `zen_so_payment_types` (
`payment_type_id` int(11) NOT NULL,
`language_id` int(11) NOT NULL DEFAULT '1',
`payment_type_code` varchar(4) NOT NULL,
`payment_type_full` varchar(20) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
--
-- Dumping data for table `zen_so_payment_types`
--
INSERT INTO `zen_so_payment_types` (`payment_type_id`, `language_id`, `payment_type_code`, `payment_type_full`) VALUES
(1, 1, 'CA', 'Cash'),
(2, 1, 'CK', 'Check'),
(3, 1, 'MO', 'Money Order'),
(4, 1, 'WU', 'Western Union'),
(5, 1, 'ADJ', 'Adjustment'),
(6, 1, 'REF', 'Refund'),
(7, 1, 'CC', 'Credit Card'),
(8, 1, 'MC', 'MasterCard'),
(9, 1, 'VISA', 'Visa'),
(10, 1, 'AMEX', 'American Express'),
(11, 1, 'DISC', 'Discover'),
(12, 1, 'DINE', 'Diners Club'),
(13, 1, 'SOLO', 'Solo'),
(14, 1, 'MAES', 'Maestro'),
(15, 1, 'JCB', 'JCB');
--
-- Indexes for dumped tables
--
--
-- Indexes for table `zen_so_payment_types`
--
ALTER TABLE `zen_so_payment_types`
ADD PRIMARY KEY (`payment_type_id`),
ADD UNIQUE KEY `type_code` (`payment_type_code`),
ADD KEY `type_code_2` (`payment_type_code`);
--
-- AUTO_INCREMENT for dumped tables
--
--
-- AUTO_INCREMENT for table `zen_so_payment_types`
--
ALTER TABLE `zen_so_payment_types`
MODIFY `payment_type_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=16;
COMMIT;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
Re: Super Orders v4.0 Support Thread
I check the source code and I really don't understand why so_payment_types_description table is needed to get the payment type description, the information is already inside SO_PAYMENT_TYPES, so I change this file :
Edit /admin/includes/functions/extra_functions/super_orders_functions.php
Find the function below, comment the original SQL query and add the new SQL query, that fixes the "cash report" issue
function zen_get_payment_type_name($payment_type_code, $language_id = '')
{
global $db;
if (empty($language_id)) {
$language_id = $_SESSION['languages_id'];
}
// $payment_type = $db->Execute("SELECT ptd.payment_type_full
// FROM " . TABLE_SO_PAYMENT_TYPES . " pt
// LEFT JOIN " . TABLE_SO_PAYMENT_TYPES_DESCRIPTION . " ptd ON ptd.payment_type_id = pt.payment_type_id
// AND ptd.language_id = " . (int)$language_id . "
// WHERE pt.payment_type_code LIKE '" . $payment_type_code . "'
// LIMIT 1");
$payment_type = $db->Execute("SELECT payment_type_full
FROM " . TABLE_SO_PAYMENT_TYPES . " WHERE language_id = " . (int)$language_id . "
AND payment_type_code LIKE '" . $payment_type_code . "' LIMIT 1");
return $payment_type->fields['payment_type_full'];
}
Re: Super Orders v4.0 Support Thread (for ZC v1.5.x)
I installed v1.5.8, I got "HTTP ERROR 500 " on the admin backend when I copied files in super order admin directory to my admin directory. How to fix this ?
Re: Super Orders v4.0 Support Thread (for ZC v1.5.x)
Getting the same error and cannot get in to admin. Looking at the logs I had an error with a TaxIDNumber define missing in a file called lcsd_merged_packing_slips.php
Removing this file I can get back into admin but I get further errors and not sure it has installed. getting an error now on version checking in includes\init_includes\init_so_config.php
using a local hosted WAMP zc 1.5.8a and Bootstrap installed. Superorders only other module attempted to install.
Any ideas on how to solve?
Re: Super Orders v4.0 Support Thread (for ZC v1.5.x)
To remove (most of?) the SO-related admin processing (so you don't get that error log), rename its file in the /YOUR_ADMIN/includes/auto_loaders directory (it'll be named config.{something-with-so-or-superorders-in-its-name}.php to have a .php~ extension.
Re: Super Orders v4.0 Support Thread (for ZC v1.5.x)
Random question, I'm starting to use this on a fresh install of 1.5.8a and reached the steps in the installation where you have to modify core files.
The /admin/invoice.php, /admin/orders.php, /admin/packingslip.php files don't exist any more and was supplanted by /admin/lang.invoice.php, /admin/lang.orders.php, and /admin/packingslip.php . Am I to assume that the file changes needed to be made should be made there? Also the formatting between the version seem have changed alot and my PHP is a bit on the rusty side.
Am I to assume that the old
PHP Code:
define('SOME_CONSTANT', "Some value.");
have been replaced with the new $define array?
PHP Code:
//Proposed Super Orders START
$define['HEADER_INVOICE'] = 'Invoice - Order #';
$define['HEADER_INVOICES'] = 'Invoices';
$define['HEADER_TAX_ID'] = 'Tax ID #';
$define['HEADER_PHONE'] = 'Phone:';
$define['HEADER_FAX'] = 'Fax:';
$define['HEADER_CUSTOMER_NOTES'] = 'Order Notes:';
$define['HEADER_PO_NUMBER'] = 'P.O. Number:';
$define['HEADER_PO_INVOICE_DATE'] = 'Invoice Date:';
$define['HEADER_PO_TERMS'] = 'Terms:';
$define['HEADER_PO_TERMS_LENGTH'] = '30 Days';
$define['TABLE_HEADING_PRICE_NO_TAX'] = 'Unit Price';
$define['TABLE_HEADING_TOTAL_NO_TAX'] = 'Total';
$define['ENTRY_BILL_TO'] = 'BILL TO:';
$define['ENTRY_PO_INFO'] = 'P.O. DETAILS';
$define['ENTRY_NO_TAX'] = 'Tax Exempt';
$define['ENTRY_PAYMENT_METHOD'] = 'Payment Method:';
$define['ENTRY_AMOUNT_APPLIED_CUST'] = 'Amount Applied:';
$define['ENTRY_BALANCE_DUE_CUST'] = 'Balance Due:';
$define['ENTRY_AMOUNT_APPLIED_SHOP'] = 'Amount Applied: (Default Store Currency)';
$define['ENTRY_BALANCE_DUE_SHOP'] = 'Balance Due: (Default Store Currency)';
//Proposed Super Orders END
Additionally, is there a better way to modify these so they don't overwrite core files?