Zen Cart Logo
Forums / All Other Contributions/Addons / OLD Super Orders 2.0 (See v3.0 thread instead)

OLD Super Orders 2.0 (See v3.0 thread instead)

Locked

Views: 456,060

Results 61 to 80 of 2,020
This thread is locked. New replies are disabled.
1 Sep 2006, 1:26 PM
#61
peterbkk avatar

peterbkk

Zen Follower

Join Date:
Jun 2006
Posts:
178
Plugin Contributions:
0

OLD Super Orders 2.0 (See v3.0 thread instead)

RESOLVED - almost :down: But super_upgrade.php still dont work as it should.

I had to paste every sql comand line one by one.
I HAD to edit the super_upgrade.php by adding zen_

// migrate PO's from zen_payment_purchase_order to so_purchase_orders
$po = $db->Execute("select * from **zen_**payment_purchase_order");
while(!$po->EOF) {
unset($new_po);
$new_po = array();

And:

// migrate PO's from zen_payment_purchase_order to so_purchase_orders
$po = $db->Execute("select * from **zen_**payment_purchase_order");
while(!$po->EOF) {
unset($new_po);
$new_po = array();

And:

// migrate the data from zen_payment_check to so_payments
$payments = $db->Execute("select * from **zen_**payment_check");
while (!$payments->EOF) {
unset($new_payment);
$new_payment = array();

And:

// migrate the extra check data from zen_payment_check_balance to zen_so_payments
$extra_checks = $db->Execute("select * from **zen_**payment_check_balance
where check_direction = 1");

And:

<td><br /><INPUT TYPE="BUTTON" VALUE="SUBMIT" ONCLICK="window.location.href='/**babystore**/admin/super_upgrade.php?action=upgrade'"></td> </tr>

Anything else??

Now i got this message:

1062 Duplicate entry '1' for key 1
in:
[insert into zen_so_purchase_orders (purchase_order_id, orders_id, po_number, date_posted, last_modified) values ('1', '21316', '21316', '2006-08-17 19:07:54', '2006-08-17 19:07:54')]
If you were entering information, press the BACK button in your browser and re-check the information you had entered to be sure you left no blank fields.

Peter:huh:

1 Sep 2006, 1:39 PM
#62
peterbkk avatar

peterbkk

Zen Follower

Join Date:
Jun 2006
Posts:
178
Plugin Contributions:
0

Re: OLD Super Orders 2.0 (See v3.0 thread instead)

UPGRADE COMPLETE!
Welcome to Super Orders v 2.0

I just deleted the first row in zen_so_purchase_orders as it was old information from the old attempt to run the super_upgrade.php

**"The upgrade procedure is simple.":no: :no: :no:

Peter :thumbsup:

1 Sep 2006, 1:55 PM
#63
peterbkk avatar

peterbkk

Zen Follower

Join Date:
Jun 2006
Posts:
178
Plugin Contributions:
0

Re: OLD Super Orders 2.0 (See v3.0 thread instead)

Still not handles mulitiple currencies:

1 Sep 2006, 2:27 PM
#64
blindside avatar

blindside

Totally Zenned

Join Date:
Sep 2004
Posts:
1,237
Plugin Contributions:
1

Re: OLD Super Orders 2.0 (See v3.0 thread instead)

Peter, I'm glad you were able to get it to work, however I have a problem with continued insistence that my scripts and instructions were at fault. You clearly were having server issues, and your first attempt was botched because you did not account for your table prefix. From your messages the SQL was clearly overwriting itself, so you did not properly restore for a backup. You've also made it obvious that you do not have any SQL experience. Finally, you are the only person out of almost 200 downloads to experience these kinds of issues and at this severity.

I don't mind when users have a problem, it happens. However I will not stand here and let you blame my code when your own setup and ability clearly played a part in your issues.

Given all the editing you've done to the SQL and upgrade scripts, I still cannot rule out a bad install as the source of your currency issues. Unless you can get the install process to run 100% smooth, there's no tellign what might be causing the odd currency displays.

PeterBKK:

I just deleted the first row in zen_so_purchase_orders as it was old information from the old attempt to run the super_upgrade.php

**"The upgrade procedure is simple.":no: :no: :no:

1 Sep 2006, 2:32 PM
#65
blindside avatar

blindside

Totally Zenned

Join Date:
Sep 2004
Posts:
1,237
Plugin Contributions:
1

Re: OLD Super Orders 2.0 (See v3.0 thread instead)

inksale:

Just DL and installed.
With limited testing everything seems to working fine, however,
Super orders does appear in the Admin> Configure menu.

Any clue.
So you have a problem because it is appearing in the configuration menu? I'll assume that's a typo. Did you install any other modules that add a configuration menu? SO groups its configs under configuration group id #28. It's one of the next ones in line, numerically.

Let's try this. Log into the Admin, and manually type in a URL similar to this:

http://www.my_store.com/admin/configuration.php?gID=28

The "gID=28" is the key here. See what you get and report back.

1 Sep 2006, 2:45 PM
#66
madk avatar

madk

Zen Follower

Join Date:
Jun 2006
Location:
Michigan
Posts:
162
Plugin Contributions:
0

Re: OLD Super Orders 2.0 (See v3.0 thread instead)

I just wanted to update my prevous posts.

I solved all my problems. The only thing I ran into is that the configuration_group is defaulted to take the id of 28 and a previously installed plugin had already taken that id.

So I went and changed that and still things weren't working properly and I figured out that all the ids in the configuration table had to be changed fro m28 to my new id as well.

After that was all said and done things are working perfectly. Thanks again.

1 Sep 2006, 2:46 PM
#67
inksale avatar

inksale

Zen Follower

Join Date:
Jan 2005
Location:
Gold Country CA
Posts:
265
Plugin Contributions:
0

Re: OLD Super Orders 2.0 (See v3.0 thread instead)

Sorry about the typo... It was getting late.
When I use the above addy I get an admin screen with functioning menus but only a grey title bar with the words Title , action, value across the top.

The only admin contribution I have installed is:
Info at a Glance Admin V1.2
Image Handler2

-Mr Ed

1 Sep 2006, 4:02 PM
#68
peterbkk avatar

peterbkk

Zen Follower

Join Date:
Jun 2006
Posts:
178
Plugin Contributions:
0

Re: OLD Super Orders 2.0 (See v3.0 thread instead)

Hey, "The upgrade procedure is simple. – But not for a novice as me…:wacko: The mod is great and i can’t live without it.

It is obvious that my SQL knowledge is almost zero …And clearly, I’m not the right person to judge your code for sure, no questions about that…..i think everyone undertand that………… :huh: I just thought that some others had some of my issues and could direct me in right direction…
And yes, it seems to been a server issue… It seems that something happens at line

INSERT INTO configuration VALUES ('', 'Store Fax', 'STORE_FAX', '', 'Enter the fax number for your store.<br>You can call upon this by using the define <strong>STORE_FAX</strong>.', 1, 4, now(), now(), NULL, NULL);

because after that, all my paste was accepted in “install sql patches” in admin/tools without any fuss.

Could some of my other installed mod made this happen???? SO1.2, PDF order etc.??

When i had successly installed the sql patches from your original and untouched super_orders_sql.sql file, I could not get the super_upgrade.php to work. It not even started so at first i added /babystore/ in the file and woalla it started. But got the message:

1146 Table 'siamon_zc1.payment_purchase_order' doesn't exist
in:
[select * from payment_purchase_order]
If you were entering information, press the BACK button in your browser and re-check the information you had entered to be sure you left no blank fields.

So i thought it could be that i hade to add the zen_ prefix…. And it worked.. But as you mention earlier in this thread that it was wrong, so really i hope it did not corrupted anything… But, yes i do have made backups…:yes:

So again, im sorry but i was not attempting to offend you and your creation in any way as i NEED your support :yes: ............ and my English is not the best…

1 Sep 2006, 4:09 PM
#69
merlinpa1969 avatar

merlinpa1969

Totally Zenned

Join Date:
Mar 2004
Posts:
13,031
Plugin Contributions:
4

Re: OLD Super Orders 2.0 (See v3.0 thread instead)

IF you are using the sql patch updater in zen carts admin you dont need to add the db_prefix, if you are adding one it will add it for you

1 Sep 2006, 4:11 PM
#70
peterbkk avatar

peterbkk

Zen Follower

Join Date:
Jun 2006
Posts:
178
Plugin Contributions:
0

Re: OLD Super Orders 2.0 (See v3.0 thread instead)

PeterBKK:

Still not handles mulitiple currencies:

The above picture is when THB=Bt. as current currency.

And next picture is with SEK=kr. as current currency.
Everything looks fine but if i edit it will use THB=bt instead??

Is it my installation that is wrong?? So no one can recreate this???

Thanks,
Peter

1 Sep 2006, 4:14 PM
#71
peterbkk avatar

peterbkk

Zen Follower

Join Date:
Jun 2006
Posts:
178
Plugin Contributions:
0

Re: OLD Super Orders 2.0 (See v3.0 thread instead)

Merlinpa1969:

IF you are using the sql patch updater in zen carts admin you dont need to add the db_prefix, if you are adding one it will add it for you

Yes, and therefor i used the original sql file without any prefixes and it worked, but just by run one or few comands at the time.

Peter

1 Sep 2006, 5:24 PM
#72
s_mack avatar

s_mack

Totally Zenned

Join Date:
Jun 2005
Location:
Kelowna, BC Canada
Posts:
1,033
Plugin Contributions:
4

Re: OLD Super Orders 2.0 (See v3.0 thread instead)

I'm not 100% sure. But if your default currency is BT and that customer chose Kr during checkout, I think there lies your problem.

I have considerable experience with currencies from my store having to have multiple default currencies (don't ask). This seems to be a slight limitation of SO, but nothing that can't be worked with.

What is happening (again, this is a guess because I haven't seen the code) is that the SO order adjustments get placed using the default currency instead of that order's currency.

Really, there should probably be an option to choose the currency that the payment has been made in, because in some situations it is possible (not ideal) that a customer goes through checkout in EUR and then sends a check in GBP. Obviously this is a nightmare from the bank's perspective because by the time you cash it, the exchange rates will have changed... but I suppose it would be nice if SO gave that ability in case it did happen. Bad customer, sure...but its unlikely you're going to send his cheque back right? Although - a more prudent thing to do might be to cash the cheque and see what amount you ACTUALLY get in your currency (which should be the store currency) and then apply that amount in SO.

But I'm getting off-track... I think the code probably at least needs to be adjusted so that the order's currency is used when a payment is processed, not the store's currency, presuming that the payment will be made in the same currency that the customer checked out with. If you can't accept payments in that currency, then don't offer it as a choice to the customer.

One thing I can't tell because I'm not at all familiar with those currencies, is when and how SO is making the conversions.

You should use ISO-4217 3-digit currency codes for your currencies for clarity (see list) instead of outdated 2-digit codes. But that's just advice from a financial analyst, so I'm picky :)

Whether or not there may or may not be a limitation of the code, of course depends (as BS stated above) on if the install was finally done correctly. However, this should easily be verifiable by someone else to see if they can duplicate the problem.

  1. set up default currency to XXX
  2. make availabe to user another currency of YYY
  3. set the exchange rate to something simple but large, like 100 for YYY and 1 for XXX
  4. buy a 100XXX item using currency YYY paying by an SO payment method
  5. in admin, apply the payment (in YYY) and see what happens.

This should allow you to troubleshoot. I'd be more than happy to do it, but I'm too early in my redevelopment and don't have SO installed yet.

  • Steven
2 Sep 2006, 2:12 PM
#73
peterbkk avatar

peterbkk

Zen Follower

Join Date:
Jun 2006
Posts:
178
Plugin Contributions:
0

Re: OLD Super Orders 2.0 (See v3.0 thread instead)

Hi, I had the same currency problem in the old SO-1.3 that i had no problem to install (exept for a small typo of me) The highly wanted SO2.0 is a bless but i still cant get the currency right.

It looks like all other non-default currencies ar calculated from the default currency and stored in the database as plain text. Actually i do not have a clue but i want to learn....

See:

2 Sep 2006, 3:18 PM
#74
s_mack avatar

s_mack

Totally Zenned

Join Date:
Jun 2005
Location:
Kelowna, BC Canada
Posts:
1,033
Plugin Contributions:
4

Re: OLD Super Orders 2.0 (See v3.0 thread instead)

Yes, that's correct - ALL currencies get stored value-wise in your DB as converted to your store's currency. Thanks for that last screen-shot, that clears up what is going on.

What SuperOrders seems to be doing is using those converted values as well. Which is fine and correct for the backend - the problem is, you see an order for 955.54Kr (stored as 4995Kr, so you have an exchange rate of .1913) then you receive a payment of 955.54Kr... what do you enter? SO is expecting you to enter 4995 (units ignored- internally ZC only uses one unit on the backend) but you enter 955.45, which is logical because a) that's what is being displayed to you and b) that's what your cheque says! Unfortunately, that 955.45 is recorded as BT (store currency) which is worth only 955.54 X .1913 = 182.79Kr. Since SO wants to only use default currency it seems, we're left with

Owed: 4995 (unitless value)
paid: 955.54 (unitless value)
Remaining: 4039.46 (unitless value)

So there's nothing wrong with SO's math. But in my opinion, if I've interpreted it correctly, there is something wrong with its logic.

Here's my logical solution:

Have SO convert the payment received using the exchange rate recorded at the time of the transaction, which is stored in the "orders" table under the column "currency_value". Units can be preserved by using the value stored in the same table under column "currency". You won't even have to worry about flow control since this will be universally correct - even for stores that use only one currency (because then the value is recorded as 1... and as we know from gradeschool, you can multiply and divide all you want by 1 without any effect).

If folks can wait, I'll take this on and supply BS with the fixed code so he can roll it in. I'm going to be in the exact same situation as you, as I use many currencies, and I'm also able to find, fix, and test the code. But patience is needed because I haven't gotten that far and I'm not going to change the order or my development at this stage. I'm doing my site from scratch in V1.3 and I'm still only working on the visual templates. Otherwise, if BS or someone else wants to do it - I'm fairly certain on what I said above.

  • Steven
2 Sep 2006, 3:24 PM
#75
peterbkk avatar

peterbkk

Zen Follower

Join Date:
Jun 2006
Posts:
178
Plugin Contributions:
0

Re: OLD Super Orders 2.0 (See v3.0 thread instead)

:clap: :clap: :clap: :clap:

3 Sep 2006, 12:37 AM
#76
rkeppert avatar

rkeppert

New Zenner

Join Date:
Aug 2006
Posts:
60
Plugin Contributions:
0

Re: OLD Super Orders 2.0 (See v3.0 thread instead)

I am having one small (kinda) problem. I installed the so2rev45 mod. everything ran just fine, however I do not have an option under configuration that says super orders.... any ideas would be great. thanks

3 Sep 2006, 1:28 AM
#77
rkeppert avatar

rkeppert

New Zenner

Join Date:
Aug 2006
Posts:
60
Plugin Contributions:
0

Re: OLD Super Orders 2.0 (See v3.0 thread instead)

BTW, i just removed the entire zen cart from my site and did a fresh install, with the super orders module being the first one i am installing. I have no option called "super orders" under configuration.... however i do have the other parts of so that installed just fine... any help please?

3 Sep 2006, 2:44 AM
#78
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: OLD Super Orders 2.0 (See v3.0 thread instead)

From what I can tell, the option is under "customers", not "configuration".

Oh wait ... you were looking for settings.... duh....

It's possible that the various SQL statements you ran didn't complete properly ... namely:

-- Purchase Order payment module configs
INSERT INTO configuration VALUES (NULL, 'Enable Purchase Order Module', 'MODULE_PAYMENT_PURCHASE_ORDER_STATUS', 'True', 'Do you want to accept Purchase Order payments?', 6, 1, now(), now(), NULL, 'zen_cfg_select_option(array(''True'', ''False''), ');
INSERT INTO configuration VALUES (NULL, 'Make payable to:', 'MODULE_PAYMENT_PURCHASE_ORDER_PAYTO', 'Destination ImagiNation, Inc.', 'Who should payments be made payable to?', 6, 2, now(), now(), NULL, NULL);
INSERT INTO configuration VALUES (NULL, 'Sort order of display.', 'MODULE_PAYMENT_PURCHASE_ORDER_SORT_ORDER', '0', 'Sort order of display. Lowest is displayed first.', 6, 4, now(), now(), NULL, NULL);
INSERT INTO configuration VALUES (NULL, 'Payment Zone', 'MODULE_PAYMENT_PURCHASE_ORDER_ZONE', '0', 'If a zone is selected, only enable this payment method for that zone.', 6, 5, now(), now(), 'zen_get_zone_class_title', 'zen_cfg_pull_down_zone_classes(');
INSERT INTO configuration VALUES (NULL, 'Set Order Status', 'MODULE_PAYMENT_PURCHASE_ORDER_ORDER_STATUS_ID', '2', 'Set the status of orders made with this payment module to this value', 6, 6, now(), now(), 'zen_get_order_status_name', 'zen_cfg_pull_down_order_statuses(');

-- Super Orders configuration group
INSERT INTO `configuration_group` VALUES (28, 'Super Orders', 'Settings for Super Order features', 100, 1);

-- Super Orders configs (Admin > Configuration > Super Orders)
-- Automatic Status Updating
INSERT INTO `configuration` VALUES ('', 'Auto Status - Purchase Order', 'AUTO_STATUS_PO', '2', 'Number of the status assigned to an order when a purchase order is added to the payment data.', 28, 11, now(), now(), 'zen_get_order_status_name', 'zen_cfg_pull_down_order_statuses(');
INSERT INTO `configuration` VALUES ('', 'Auto Status - Payment', 'AUTO_STATUS_PAYMENT', '2', 'Number of the order status assigned when a payment (<B>not</B> attached to a purchase order) is added to the payment data.', 28, 10, now(), now(), 'zen_get_order_status_name', 'zen_cfg_pull_down_order_statuses(');
INSERT INTO `configuration` VALUES ('', 'Auto Status - P.O. Payment', 'AUTO_STATUS_PO_PAYMENT', '2', 'Number of the order status assigned when a payment <B>attached to a purchase order</B> is added to the payment data.', 28, 10, now(), now(), 'zen_get_order_status_name', 'zen_cfg_pull_down_order_statuses(');
INSERT INTO `configuration` VALUES ('', 'Auto Status - Refund', 'AUTO_STATUS_REFUND', '2', 'Number of the order status assigned when a refund is added to the payment data.', 28, 13, now(), now(), 'zen_get_order_status_name', 'zen_cfg_pull_down_order_statuses(');
INSERT INTO `configuration` VALUES ('', 'Auto Comments - Payment', 'AUTO_COMMENTS_PAYMENT', 'Payment received in our office. Payment ID: %s', 'You''ll have the option of adding these pre-configured comments to an order when a payment is entered.  You can attach the payment number to the comments by typing <b>%s</b>.', 28, 14, now(), now(), NULL, NULL);
INSERT INTO `configuration` VALUES ('', 'Auto Comments - P.O. Payment', 'AUTO_COMMENTS_PO_PAYMENT', 'Payment on purchase order received in our office. Payment ID: %s', 'You''ll have the option of adding these pre-configured comments to an order when a purchase order payment is entered.  You can attach the payment number to the comments by typing <b>%s</b>.', 28, 14, now(), now(), NULL, NULL);
INSERT INTO `configuration` VALUES ('', 'Auto Comments - Purchase Order', 'AUTO_COMMENTS_PO', 'Purchase Order #%s received in our office', 'You''ll have the option of adding these pre-configured comments to an order when a purchase order is entered.  You can attach the payment number to the comments by typing <b>%s</b>.', 28, 15, now(), now(), NULL, NULL);
INSERT INTO `configuration` VALUES ('', 'Auto Comments - Refund', 'AUTO_COMMENTS_REFUND', 'Refund #%s has been issued from our office.', 'You''ll have the option of adding these pre-configured comments to an order when a refund is entered.  You can attach the refund number to the comments by typing <b>%s</b>.', 28, 17, now(), now(), NULL, NULL);
INSERT INTO `configuration` VALUES ('', 'Federal Tax Exempt Number', 'FED_TAX_ID_NUMBER', '00-000000', 'If your tax exempt, then you should have a federal tax ID number. Enter the number here and the tax columns will not appear on the invoice. The number will also be displayed at the top of the invoice.', 28, 50, now(), now(), NULL , NULL);
INSERT INTO `configuration` VALUES ('', 'Closed Status - "Cancelled"', 'STATUS_ORDER_CANCELLED', '0', 'Insert the order status ID # you would like to assign to an order when you press the special "Cancelled!" button on super_orders.php.<p>If you do not have a "cancel" status, or do not want assign one automatically, choose <B>default</B> and this option will be ignored.<p><strong>You cannot attach comments or notify the customer using this option.</strong>', 28, 30, now(), now(), 'zen_get_order_status_name', 'zen_cfg_pull_down_order_statuses(');
INSERT INTO `configuration` VALUES ('', 'Closed Status - "Completed"', 'STATUS_ORDER_COMPLETED', '0', 'Insert the order status ID # you would like to assign to an order when you press the special "Completed!" button on super_orders.php.<p>If you do not have a "complete" status, or do not want assign one automatically, choose <B>default</B> and this option will be ignored.<p><strong>You cannot attach comments or notify the customer using this option.</strong>', 28, 30, now(), now(), 'zen_get_order_status_name', 'zen_cfg_pull_down_order_statuses(');
INSERT INTO `configuration` VALUES ('', 'Closed Status - "Reopened"', 'STATUS_ORDER_REOPEN', '0', 'Insert the order status ID # you would like to assign to an order when you undo an order\'s cancelled/completed status.<p>If you do not have a "reopened" status, or do not want assign one automatically, choose <B>default</B> and this option will be ignored.<p><strong>You cannot attach comments or notify the customer using this option.</strong>', 28, 30, now(), now(), 'zen_get_order_status_name', 'zen_cfg_pull_down_order_statuses(');
3 Sep 2006, 3:39 AM
#79
inksale avatar

inksale

Zen Follower

Join Date:
Jan 2005
Location:
Gold Country CA
Posts:
265
Plugin Contributions:
0

Re: OLD Super Orders 2.0 (See v3.0 thread instead)

rkeppert:

BTW, i just removed the entire zen cart from my site and did a fresh install, with the super orders module being the first one i am installing. I have no option called "super orders" under configuration.... however i do have the other parts of so that installed just fine... any help please?

I have the same issue and posted it yesterday.
Haven't got an answer back yet. wonder if something is missing from the newest upload?

I ran the SQL file from the zen tools browsing to the file I unziped if it matters.

3 Sep 2006, 3:47 AM
#80
rkeppert avatar

rkeppert

New Zenner

Join Date:
Aug 2006
Posts:
60
Plugin Contributions:
0

Re: OLD Super Orders 2.0 (See v3.0 thread instead)

ok. i had to manually execute the queries, however it seems to have worked. thanks for the help