Oh no! Where's the JavaScript?
Your Web browser does not have JavaScript enabled or does not support JavaScript. Please enable JavaScript on your Web browser to properly view this Web site, or upgrade to a Web browser that does support JavaScript.
Sign In
Not a member yet? Click here to register.


You could add a static field and pull the next increment for order id that is created for each order. The order ID is based on database increment.
Naturally it would update each time the section was visited until the order is put.
Then you would need to insert that field to the saveorder(); in functions.php

Code to get next increment ID
$result = dbarray(dbquery("SHOW TABLE STATUS LIKE '".".DB_ESHOP_ORDERS."."'"));
$orderid = $result['Auto_increment'];

Paste this above </table></fieldset></div>"; and right below
<td align='left'>".nl2br($message)."</td>
in saveorder() function.

<td align='left' style='width:120px;padding:4px;'>OrderId</td>
<td align='left'>".$orderid."</td>

Regarding shipping, yeah I tried to cover most.
Initial Rates, Flat rates, free rate per sum and also cost per weight.
I guess a setting in a product to exclude from shipping would be viable. I will add it to the list anyway!

I am glad that you like to tinker with it, the whole idea was to make a shop that can do many things but dosen´t feel way to complicated to work with.
With your comments, I atleast feel that it have reached it´s goal for you and it makes me glad !
The way I understand this code is that it would create a purchase order # for me. Am I correct.

If this is the case, in this format it can not be used.

I just need a blank field that the customer can add the number. Because the next time they purchase, they will enter a new number that is not in order.

One time they could enter B-7852014, then the next time their number might be C-5832014 and so on.

It cant be auto generated by the system. It just needs to be something like if they entered their phone number.

The other thing is, it can not be a required field. Since some will use it, and others will not.
How would I add in a field called Business Name under the shipping and billing information at checkout. It just happens to be a field that I found I needed.
Vyper, are you printing an invoice or packing list with product that's shipped? Food for thought, keep that in mind. Otherwise there's simply no point in having that option either. Maybe this should be printed on the shipping label, to simplify it. Like a ref#.

* PO# is a name/number given to the order, by the customer, which may be from their point of sale system.
Yes exactly. I will be dealing with Law Enforcment Agencies around the United States, and they only use Purchase Orders when they order. I need their Purchase Order # so when I go to print an invoice to bill them I can add it to the invoice.

This is why I suggested this field. Also having the field for Business or Organization. I might be sending a product to a specific person, but it is the business/organization that will be actually billed.

For these 2 reasons these fields are needed.

I can add them in I just need the code to do it and the location where to make the changes.

I understand that not everyone needs these items, and if I was not dealing with these agencies, I would not need them just for a standard eshop.

With these options, I can use it for businesses/organizations or for individuals within these organizations.

Items of this nature are for my use. It does not mean that code needs to be added to the infusion and a new version created. Like I said before. The eshop for php-fusion is something that I have been wanting for a long time. As it stands now, it is probably one of the best additions to the php-fusion community in a long time. Domi did a great job on getting this done, and it works great.

I just need a few tweaks to it on my end.
Ive made a quick fix for you.

Replace the files functions/checkout with the two attached files..
No database changes are needed, the fields content are pure dynamics and the values will be saved to the printable order for each order if filled.

Just rename extra field 1 / extra field 2 with the text you need.

Basically you can just clone the name and address fields to alternate shipping addresses with no database changes.

The saveorder function makes a HTML construct out of the values put as you can see with these extra fields, then we save it like a HTML screenshot to the db.
Ive selected that method because put orders are not suppose to be editable in order to stay legal in many countries when it comes to yearly reviews.
As a bonus it also comes handy for these type of modifications.
Falk attached the following file:
twoextrafields.rar [18.89kB / 301 Downloads]
Got it, and made the changes. Works great. Thanks.

I did notice some things that need to be modified. When you get the confirmation of your order it still says extra field 1 and extra field 2. When you go to the admin panel to review the order these fields still exist there also.

They show up properly, when placing the order, but after that they are the orginal fields.

And is there a way to modify the order things are displayed like.

First name
Last name
Address (line 2)
Zip/Postal code
Purchase Order
Customer Comments
Ok so I was looking at the price field. As it stands now, you have to create a seperate entry for each size and a seperate price.

Would it not be reasonable to have a dropdown where you can say.

1 for 4.99
2 for 9.98
1 case 69.99

and so on.

I deal with multiple sizes for the same products. I have bottles, gallons, cases, and other types of styles. And right now I have to create a seperate product for each one.

Or is there already a function to do that, maybe I just didn't see it.


1 for 4.99
2 for 9.98
1 case 69.99

I'd comment on my experience on accounting systems. In professional accounting systems even, like Intuit Quickbooks, they did have this called "build" items or "assembly" items. What you do is to take another item's quantity reduced during the assembly to create stock for the new ones.

For example on this scenario:
6 x Budweiser (1 Bottle) @ 2.00 each = 12.00 total.
1 x Bud pack (6 bottles) @ 11.00 total.

It's normal. Unless we want to do a "build assembly" which involves internal transfer of items @ cost level to create a new item @ cost level in 1 bill.

So Vyper, you're on the right track. Even if we're to automate it, the cost is always your purchase bill regardless what you call your sales item name and yes, every accounting system treats it same way:

1. 1.5 Liter Pepsi = 3.00
2. 600ml Pepsi = 2.50

Both are different product. So we cannot take bulk like 1000 liter Pepsi order and then let the system sort itself which is which. The auditors are gonna be mad.

I hope I cleared the issue out about item differences. I've not tested the E-Shop yet due to some time constraints on what I am doing now. But it's definitely my no.1 list must-have app for 8.
Well I was looking at it like if using paypal.
Paypal let's you add multiple prices for a product lets say like.

Bronze Web Hosting 4.99 per Month
Silver Web Hosting 8.99 per Month
Gold Web Hosting 14.99 per Month

So you would have one Title saying Web Hosting, and then with a drop down menu it would let you choose the package you want. Then the system would charge you this amount.

I'm just looking at it as if i say


2 oz 9.99
4 oz 14.99
2oz & 4oz 21.99

Right now I have to create a seperate product for each one. Allowing for the fact that you could add them all under one name with the various price options in the same box.

@hien Well as far as bugs, I have seen none. Works great. Just some minor modifications to fit ones needs. Other than that. Right out of the box it is a great feature for php-fusion. It is one of those items that has been needed, and Domi did a great job on this.

I know I won't use any other eshop, now that we have this. Easy to install, and setup. There are no headaches that is for sure.
Great to hear that.

About your question, I was checking on other online carts mods. Sorry took a while. We can have it.. If we can have hierarchy. Meaning a category under a category can be turned into a product container which stores sibling products.

An example is IPhone. iPhone Gold 32mb, 64mb, 128mb different pricing. Other color different price too. They can combine in a page or in a drop down for display purposes.
But inventory still must be individual items as I mentioned earlier. Audit must be clean.

So make your product now, later we can have category modded into a container. It will just need a template.
The changes I gave you only affects viewable order and are not visual to the customer fields.
If you need to change extra field 1 , 2 text you also need to edit functions and find them there.

To change the order you simply need to cut and paste the sections in checkout.php.
They are all divided with this method.

echo "
<td align='left' style='width:100px;'> Extra Field 1 </td>
<td align='left'><input type='text' name='ef1' value='' class='textbox' style='width:160px; !important'></td>

Happy coding ;)
@Domi I made all my changes concerning the order of the fields. Thanks

Here is my issue. When I view and order in the eshop admin, I must be able to see the Purchase Order # and the Business or Organization. At this time I can not see them.

I would assume they would go in this section in the functions.php, but I am not sure.

How can I view these fields in the eshop admin when the order is completed.

$order.="<div style='width:680px;margin: 0 auto;'>";
$order.="<div style='float:left;margin-top:5px;padding:3px;'>";
$order.="<fieldset style='width:100%;padding:2px;'><legend style='width:90% !important;'>&nbsp; ".$locale['ESHPF112']." &nbsp;</legend>";
$order.="<table width='310' height='100%' align='center' cellspacing='0' cellpadding='0' border='0'><tr>
<td align='left' style='width:120px;padding:4px;'>".$locale['ESHPF113']."</td>
<td align='left'>$firstname</td>
<td align='left' style='width:120px;padding:4px;'>".$locale['ESHPF114']."</td>
<td align='left'>$lastname</td>
<td align='left' style='width:120px;padding:4px;'>".$locale['ESHPF115']."</td>
<td align='left'>$dob</td></tr>
<td align='left' style='width:120px;padding:4px;'>Extra field 1</td>
<td align='left'>$ef1</td></tr>
<td align='left' style='width:120px;padding:4px;'>Extra field 2</td>
<td align='left'>$ef2</td></tr>
<td align='left' style='width:120px;padding:4px;'>".$locale['ESHPF116']."</td>
<td align='left'>".$country[$country_code]."</td>
<td align='left' style='width:120px;padding:4px;'>".$locale['ESHPF117']."</td>
<td align='left'>$region</td></tr>
<td align='left' style='width:120px;padding:4px;'>".$locale['ESHPF118']."</td>
<td align='left'>$city</td>
<td align='left' style='width:120px;padding:4px;'>".$locale['ESHPF119']."</td>
<td align='left'>$address</td>
<td align='left' style='width:120px;padding:4px;'>".$locale['ESHPF120']."</td>
<td align='left'>$address2</td>
<td align='left' style='width:120px;padding:4px;'>".$locale['ESHPF121']."</td>
<td align='left'>$postcode</td>
<td align='left' style='width:120px;padding:4px;'>".$locale['ESHPF122']."</td>
<td align='left'>$phone</td>
<td align='left' style='width:120px;padding:4px;'>".$locale['ESHPF123']."</td>
<td align='left'>$fax</td>
<td align='left' style='width:120px;padding:4px;'>".$locale['ESHPF124']."</td>
<td align='left'>$email</td>
<td align='left' style='width:120px;padding:4px;'>".$locale['ESHPF125']."</td>
<td align='left'>".nl2br($message)."</td>

Here is hat it looks like:

You need to make a new test order with the modifications, It will show up for each new order you do after the mod but not before.
Ok so everything is good. I can see everything that needs to be seen, and they have been arranged in the proper order.

Now all I need to do is to get the theme fixed, and all will be perfect.
Ok so this is what I discovered with the Modish theme when using the eshop.

I need use of the side panels, but everytime I add a new panel it pushes the eshop down. Any ideas of how to stop this.
Hello, Thanks for advice, but if i click on CONFIRM ORDER, it throws error: DENIED

It's something with this in functions.php:
 if (isset($_POST['cupon'])) { if (!preg_match("/^[-0-9A-Z@\s]+$/i", $_POST['cupon'])) { die("Denied"); exit; }  }

I tried to delete this condition, and it works.


Domi wrote:

You need to change mysql tables first it´s
eshop_price from int to varchar 10
Then it´s eshop_cart the cprice to varchar 10 from int

You need to edit functions.php

var cprice = parseInt($("#cprice_"+id+"").val(),10);

and change it to
var cprice =  $("#cprice_"+id+"").val();

You need to edit cartaction.php

if (isset($_GET['cprice']) && !isnum($_GET['cprice'])) die("Denied");

Find and replace

if (isset($_GET['cprice'])) { $cprice = stripinput($_GET['cprice']); }


if (isset($_GET['cprice'])) { if (!preg_match("/^[0-9.@\s]+$/i", $_GET['cprice'])) { die("Denied"); exit; } $cprice = stripinput($_GET['cprice']); }

Please read this post about that http://www.php-fusion.co.uk/forum/viewthread.php?thread_id=33799&rowstart=20#post_184662
I have made evey conceivable change to the theme.php and styles.css for the Modish theme. I have not been able to make anything work.

@Domi Could there be a possible change that could be made to the Infusion itself, that would correct the issue.

I just need this one issue resolved, before I can finish the rest of the site.

Once this is done, then I can focus on finishing the site, and obtaining a CCL, before I make the site public on a paid hosting plan.


Vyper69 wrote:

I have made evey conceivable change to the theme.php and styles.css for the Modish theme. I have not been able to make anything work.

@Domi Could there be a possible change that could be made to the Infusion itself, that would correct the issue.

I just need this one issue resolved, before I can finish the rest of the site.

Once this is done, then I can focus on finishing the site, and obtaining a CCL, before I make the site public on a paid hosting plan.

I would be willing to debug it for you if you give me ftp access as well as site admin access. While I do not suggest doing this (never give your site info out to anyone, ever), I will be able to find your issue quickly and get you on your way. Let me know through PM.
Thread Information
275 posts
69488 times
Last Post
Last updated on 30 days ago
You can view all discussion threads in this forum.
You cannot start a new discussion thread in this forum.
You cannot reply in this discussion thread.
You cannot start on a poll in this forum.
You cannot upload attachments in this forum.
You can download attachments in this forum.