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,062

Results 361 to 380 of 2,020
This thread is locked. New replies are disabled.
12 Dec 2006, 5:13 AM
#361
blindside avatar

blindside

Totally Zenned

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

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

I'm pretty sure it's a DB setting via the configuration table but, again, no sure idea. :unsure:

12 Dec 2006, 9:02 AM
#362
ahelis avatar

ahelis

New Zenner

Join Date:
Sep 2006
Location:
Taipei
Posts:
4
Plugin Contributions:
0

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

Hello harlyman,

I did a little reseach into your problem and here are my findings. These are my opinons and how I would approach solving the problem. I am sure there are other ways inwhich to get to the same solution which maybe easier, but I have not found.

As Super Orders 2.0 works right now the subtotal amount is retrieved directly from the 'orders_totals' table in the db which I assume gets written after a customer has submitted their order. Ok, so lets review how this value is set when you view a customer's order in the admin:

admin/includes/classes/order.php 'Line #43-46'

$totals = $db->Execute("select title, text, class
  from " . TABLE_ORDERS_TOTAL . "
  where orders_id = '" . (int)$order_id . "'
  order by sort_order");

So, this part of the class stores the subtotal with tax from the 'orders_totals' table in the db.

admin/super_data_sheet.php 'Line#32'

$order = new order($oID);

The $order object gets created (instantiated) here and at this time $order->totals[$i]['text'] is assigned the order's subtotal with tax.

admin/super_orders.php 'Line#773'

<td align="right" class="'. str_replace('_', '-', $order->totals[$i]['class']) . '-Amount">' . $order->totals[$i]['text'] . '</td>' . "\n" .

This line actually displays the subtotal from $order->totals[$i]['text'] on the order's detail page in the admin.

Ok, but you want subtotal without tax. I will outline my solution but I have not tried this or tested it and it will need through testing to get it right.

  1. Inside 'admin/includes/classes/order.php', add a new method/function like getSubTotalwoTax( ) to query the 'orders_product' table which lists all the items in an order. Loop through all the product lines and calculate the sum of fields 'products_quantity' x 'products_price' and return the total amount.

  2. In 'admin/super_data_sheet.php' after Line 32, add a new variable, say $subTotalwoTax and call your new function from the $order object as:

$subTotalwoTax = $order->getSubTotalwoTax($oID);

  1. Inside 'admin/super_orders.php - Line#773' change $order->totals[$i]['text'] to $subTotalwoTax.

Ok, this is a rough hack, and personally, it would be better to edit the orders.php class and add another array variable to the totals member variable to make it cleaner. In that case, you could simply change the display line from $order->totals[$i]['text'] to say, $order->totals[$i]['subTotalwoTax'], but you get the idea.

Of course you need to document the exact changes you make, because any future upgrade of zen-cart will likely overwrite the orders.php file and your will lose your changes.

12 Dec 2006, 7:42 PM
#363
bgroup99 avatar

bgroup99

Zen Follower

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

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

Hi,

I installed Super Orders on my store, but I don't see any of the functionality.

I can go to Admin>Config>Super Orders

But I can't find Admin>Customers>Super Orders

and I see no links to super orders on any of my existing orders.

Does it only work with new orders or did I mess up in the installation process?

Thanks,

Nate

12 Dec 2006, 11:21 PM
#364
harlyman avatar

harlyman

Zen Follower

Join Date:
Jan 2004
Posts:
100
Plugin Contributions:
1

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

ahelis:

Hello harlyman,

I did a little reseach into your problem and here are my findings. These are my opinons and how I would approach solving the problem. I am sure there are other ways inwhich to get to the same solution which maybe easier, but I have not found.

As Super Orders 2.0 works right now the subtotal amount is retrieved directly from the 'orders_totals' table in the db which I assume gets written after a customer has submitted their order. Ok, so lets review how this value is set when you view a customer's order in the admin:

admin/includes/classes/order.php 'Line #43-46'

$totals = $db->Execute("select title, text, class
from " . TABLE_ORDERS_TOTAL . "
where orders_id = '" . (int)$order_id . "'
order by sort_order");

> 
> So, this part of the class stores the subtotal with tax from the 'orders_totals' table in the db.
> 
> admin/super_data_sheet.php 'Line#32'
> 
> ```
$order = new order($oID);

The $order object gets created (instantiated) here and at this time $order->totals[$i]['text'] is assigned the order's subtotal with tax.

admin/super_orders.php 'Line#773'

<td align="right" class="'. str_replace('_', '-', $order->totals[$i]['class']) . '-Amount">' . $order->totals[$i]['text'] . '</td>' . "\n" . ``` > > This line actually displays the subtotal from $order->totals[$i]['text'] on the order's detail page in the admin. > > Ok, but you want subtotal without tax. I will outline my solution but I have not tried this or tested it and it will need through testing to get it right. > > 1. Inside 'admin/includes/classes/order.php', add a new method/function like getSubTotalwoTax( ) to query the 'orders_product' table which lists all the items in an order. Loop through all the product lines and calculate the sum of fields 'products_quantity' x 'products_price' and return the total amount. > > 2. In 'admin/super_data_sheet.php' after Line 32, add a new variable, say $subTotalwoTax and call your new function from the $order object as: > > $subTotalwoTax = $order->getSubTotalwoTax($oID); > > 3. Inside 'admin/super_orders.php - Line#773' change $order->totals[$i]['text'] to $subTotalwoTax. > > Ok, this is a rough hack, and personally, it would be better to edit the orders.php class and add another array variable to the totals member variable to make it cleaner. In that case, you could simply change the display line from $order->totals[$i]['text'] to say, $order->totals[$i]['subTotalwoTax'], but you get the idea. > > Of course you need to document the exact changes you make, because any future upgrade of zen-cart will likely overwrite the orders.php file and your will lose your changes.

looks easy when you explain it, but i think i need someone with more php skills that me to help out.

anyone here that wants this challange?? i'll pay $$ for this fix if someone are able to solve this for me.

12 Dec 2006, 11:57 PM
#365
frank_lyy avatar

frank_lyy

New Zenner

Join Date:
Sep 2006
Posts:
38
Plugin Contributions:
0

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

bgroup99:

Hi,

I installed Super Orders on my store, but I don't see any of the functionality.

I can go to Admin>Config>Super Orders

But I can't find Admin>Customers>Super Orders

and I see no links to super orders on any of my existing orders.

Does it only work with new orders or did I mess up in the installation process?

Thanks,

Nate

Recheck your installation. You seem to have missed a few core files.

14 Dec 2006, 4:57 PM
#366
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)

bgroup99:

I can go to Admin>Config>Super Orders

But I can't find Admin>Customers>Super Orders

and I see no links to super orders on any of my existing orders.
You ran the SQL file properly, but did not upload the files correctly. Re-read the readme so you know exactly where the files need to go.

14 Dec 2006, 6:44 PM
#367
cedomir avatar

cedomir

New Zenner

Join Date:
Nov 2006
Posts:
10
Plugin Contributions:
0

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

Batch_status_update not sending emails...

Well, this is no real solution but yo should know that SO 1.3 batch status update works just fine on Zen-Cart 1.3.6...

So if you need it (the only thing I really need from SO) you might consider down-grading :blush:

Still interested in 2.0 solution though :lookaroun

Cedo

14 Dec 2006, 7:35 PM
#368
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)

Only one thing has changed in that file between major versions. Open admin/super_batch_status.php. Find this line...

$notify = (int)$_POST['notify'];

Change it to read as follows....

$notify = $_POST['notify'];

Upload and give it a whirl.

15 Dec 2006, 4:41 AM
#369
mkm avatar

mkm

New Zenner

Join Date:
Nov 2006
Posts:
18
Plugin Contributions:
0

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

I just downloaded Super Orders 2.0, great features!

But, before I install it, want to make sure if it works with current ZenCart 1.3.6 and Stock by Attributes mod that I am using, doesn't it?

Thanks!

15 Dec 2006, 2:38 PM
#370
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)

Yes, SO is fully compatible with Zen Cart 1.3.6

16 Dec 2006, 5:45 AM
#371
mkm avatar

mkm

New Zenner

Join Date:
Nov 2006
Posts:
18
Plugin Contributions:
0

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

BlindSide:

Yes, SO is fully compatible with Zen Cart 1.3.6

Do you know if it works with Stock by Attributes by any chance? Can't wait to give it a try...

Thanks!

16 Dec 2006, 10:11 PM
#372
svanis avatar

svanis

Zen Follower

Join Date:
May 2005
Location:
Sweden
Posts:
145
Plugin Contributions:
0

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

What happened to the functionality of adding products on an existing order?
I found this very useful..

18 Dec 2006, 1:53 AM
#373
tajul_ashyqin avatar

tajul_ashyqin

Zen Follower

Join Date:
Apr 2006
Location:
Labuan Island
Posts:
362
Plugin Contributions:
1

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

Svanis:

What happened to the functionality of adding products on an existing order?
I found this very useful..

fyi, its not included in this latest mod...

18 Dec 2006, 5:40 AM
#374
happyworker avatar

happyworker

New Zenner

Join Date:
Sep 2006
Posts:
40
Plugin Contributions:
0

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

BlindSide:

The so_* tables were not the problem, but rather the inserts made to the configuration table. Do a search in the SQL file for the following:

insert into configuration

> 
> Or just read the whole README file. Most of it is covered in there. I'd like to comment on your installation procedures (which are great! :thumbsup: ), in hopes they save others from this recurring issue...
> 
> This should typically be a given. The file should be run using a tool that already knows which DB to run on (i.e. phpmyadmin). Your step 2 would be the correct procedure if using the command line (which most shared hosts don't allow). 
> 
> (Aside: As an FYI, I have a dedicated server like you, and I never use the command line. I think you'll find it far easier to maintain your DB's using phpMyAdmin. Just my opinion, though.)
> 
> Bolding is my emphasis. This is for everyone who gets "duplicate entry" errors when running the SQL. Re-running the file simply won't work; comment out the duplicate line ('cause it went in properly on the first try), or reload your DB, fix the problem that caused the first failure, and try again.
> 
> See?  DB properly selected; SQL file and DB properly configured; alls well! :yes:


I'm having this problem ```
1062 Duplicate entry 'CA' for key 2
in:
[INSERT INTO so_payment_types VALUES (NULL, 1, 'CA', 'Cash');]
``` and I can't re-install my db from a backup because it's too old :( [I know for next time].  Just wondering how I can solve this problem.  I can't see Admin-->Config-->Super orders and my Tax # is not displaying in on my invoices.

Any help would really be appreciated.
Thanks for your patience as this was probably covered, I just don't understand.
Cheers,
Happyworker
18 Dec 2006, 3:21 PM
#375
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)

I understand this stuff can be tough for a beginner, but did you even read the message you quoted, Happy? Let's try again...

This is for everyone who gets "duplicate entry" errors when running the SQL. Re-running the file simply won't work; comment out the duplicate line ('cause it went in properly on the first try)...
You cant properly re-run the SQL file without first resetting your DB to the way it was before running it the first time. It sets up tables and entries that cannot be duplicated.

Commenting out the offending line only solves a fraction of the problem, as you'll undoubtedly have other duplicate lines. Since you don't have a viable backup, you'll now have to go through the SQL file line by line, and compare it to your DB's current state. Remove any duplicate entries it made (e.g. the configuration table is not set to prevent dupes), and manually execute each SQL statement that did not go in the first time.

Shame on you for not following all those big backup warnings. :wink2: :cry:

18 Dec 2006, 3:24 PM
#376
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)

Svanis:

What happened to the functionality of adding products on an existing order?
I found this very useful..
If you used any kind of attributes, it was totally broken with the latest versions of Zen Cart, so I scrapped it. Go back a few pages and you'll see a list of upcoming features. Adding new products is on there.
mkm:

Do you know if it works with Stock by Attributes by any chance? Can't wait to give it a try...
The current version will be fine with that, as far as I know. Super Orders only changes order reporting output, not input. The next version includes adding products and doing returns and exchanges, which definitely will not work with Stocks by Attribute.

18 Dec 2006, 3:35 PM
#377
happyworker avatar

happyworker

New Zenner

Join Date:
Sep 2006
Posts:
40
Plugin Contributions:
0

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

Thanks Blindside

Yes I read the text, I didn't understand the "commenting out of the offending line".
How do I comment this out and manually insert the sql that didn't go the first time?
I'm going to go through the configuration table and take out any duplicate.
Thanks again, much appreciated.

18 Dec 2006, 3:41 PM
#378
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)

Happyworker:

Thanks Blindside

Yes I read the text, I didn't understand the "commenting out of the offending line".
How do I comment this out and manually insert the sql that didn't go the first time?
I'm going to go through the configuration table and take out any duplicate.
Thanks again, much appreciated.
No problem, I'm sorry to see you suffering through. You can comment out a line in SQL by adding a double slash (//) double dash (--) to the beginning of the line. Whole sections can be commented using the /* */ format. In your case, I recommend you keep the file open and just copy and paste the necessary lines into the SQL field in phpMyAdmin. Go one line at a time to avoid further possible damage.

18 Dec 2006, 11:36 PM
#379
happyworker avatar

happyworker

New Zenner

Join Date:
Sep 2006
Posts:
40
Plugin Contributions:
0

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

Thanks for the help Blindside,

Okay, everthing seems to be in order now and I see the admin-->config-->super orders.
Excellent

Now, just something has caught my eye....

When I click on the Invoices I notice that under the Tax column it says "None!".

Well I have set all my configurations to show tax and it shows it along the right hand side like normal....it's just underneath that column that it shows "None!"

Thanks again for your help
Cheers,
Happyworker

19 Dec 2006, 3:56 AM
#380
happyworker avatar

happyworker

New Zenner

Join Date:
Sep 2006
Posts:
40
Plugin Contributions:
0

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

Nevermind about the last post....figured it out.

Thanks again for your help.

Cheers,
Happyworker