Jump to content
zefeena

Sorting items in basket for invoice

Recommended Posts

Hi, Can anyone point me to an add on to sort the items in the basket upon checkout. Previously I used to paste the order into word and sort on column 2 (the description), but as i'm printing directly from the screen now I'm not able to do this. My customers buy 20-30 items each time and they are located in different places, sometimes I miss an item and have to go back to the same place twice (which may be my outbuilding or upstairs!) its very time consuming. As they checkout I'd like the basket to sort itself in order, so all the 'elastic' for example is together. When I list items I list them in a way they automatically sort on my website: i.e Elastic - Strap - plush backed - 12mm, Black, per metre. and the next items may look exactly the same, but be white, red etc. Anyone know of such an add-on? thank you Kellie


Running a botched up version of  osCommerce Online Merchant v2.3.4 bootstrap with the dresscode theme installed, numerous add-ons, terrible coding, terrible website, but will have to make do until I have made up for my losses and can risk shutting down for a couple of weeks while I start all over again. - I did not install my program but am endeavouring to fix it with your help.

Share this post


Link to post
Share on other sites

I would list the products I need to go and pick (on a mix of orders basis), and have a checkbox near each item, this would be a new admin page where you can select the order to pick or a date range of orders (or whatever). The page would then update to list all the items you need to pick...I would open this admin page in my smartphone or tablet, and when I've picked the items, I would check them off my list.

 

There is I think no data in the cart array to sort products in the manner you describe.


This is a signature that appears on all my posts.  
IF YOU MAKE A POST REQUESTING HELP...please state the exact version
of osCommerce that you are using. THANKS

 
Get the latest Responsive osCommerce CE (community edition) here

Share this post


Link to post
Share on other sites

You could add an extra field to the product

 

product_pick_loacation

 

Then sort the pick list in that order.

 

HTH

 

G


Need help installing add ons/contributions, cleaning a hacked site or a bespoke development, check my profile

 

Virus Threat Scanner

My Contributions

Basic install answers.

Click here for Contributions / Add Ons.

UK your site.

Site Move.

Basic design info.

 

For links mentioned in old answers that are no longer here follow this link Useful Threads.

 

If this post was useful, click the Like This button over there ======>>>>>.

Share this post


Link to post
Share on other sites

Thank you, but neither option is very suitable, I currently print an order and put it into its own basket and take these to the various locations I keep the stock and add the items I need to add, their location changes - i'm always moving items around, and I have a huge product range with a fast turn-over and ever changing stock, so I don't want to make life more complicated!


Running a botched up version of  osCommerce Online Merchant v2.3.4 bootstrap with the dresscode theme installed, numerous add-ons, terrible coding, terrible website, but will have to make do until I have made up for my losses and can risk shutting down for a couple of weeks while I start all over again. - I did not install my program but am endeavouring to fix it with your help.

Share this post


Link to post
Share on other sites

The first question would be -- would having a "pick location" on the order help? It means that it's something else for you to keep updated, but if the benefit outweighs the effort...

 

The second question would be -- do you need the pick location sorted on the order printout? That would be an extra step, but once it's in the database, it should be a minor code change to print out the order sorted on the new field. Would customers also see this sort, and would it matter to them? Do they care what order (if any) the order summary is in? Would it be important to present this sorted differently for customers and you?

 

You say that you used to copy and paste the order into Word, and sort on a particular column. Is there some reason that you can no longer do that? You could sort on the pick location rather than the description.

 

@@burt -- I don't think she wants to "wander" around the warehouse location(s) picking as she comes across something. I think she wants to plan her route methodically to minimize pick time.

Edited by MrPhil

Share this post


Link to post
Share on other sites

I'm thinking way too far forward, maybe because this system already exists...and is in use, with smartphone barcode scanning in fact.

 

The point is that should this shopowner want it, she could have a system that reads a bunch of orders, totalises the products to pick & puts the products into the correct pick schedule. In other words a picking system geared up to multiple orders with multiple products based on a route around the warehouse...just like how GSI do it.


This is a signature that appears on all my posts.  
IF YOU MAKE A POST REQUESTING HELP...please state the exact version
of osCommerce that you are using. THANKS

 
Get the latest Responsive osCommerce CE (community edition) here

Share this post


Link to post
Share on other sites

Well yeah, she could buy that robotic pick/pack system from Amazon, too! :) Depending on how much she can carry in a basket (or push in a cart... up and down stairs?), she may not be interested in handling multiple orders at once, but does want to avoid wandering back and forth up and down the aisles, and make one pass straight through.

Share this post


Link to post
Share on other sites

Thank you for your comments, I live in a different 'shop' world to most! Its pretty small, stock is in my home and out buildings. I don't tell bar coded items! I sell bra making supplies. someone might order, one metre of one elastic, 2 of another (out of a box of 1000m). I need to keep them separate or when I got back to my packing desk i'd never now what was what - much of it looks similar! Smart phones etc are not so smart here! My location is very rural, internet is very poor, slow and unreliable. I set my invoice as a 'fancier' one, now if I paste it into Word it just goes funny and is essentially useless! The customer may actually benefit from items being sorted in the basket, often items are bought to match', i.e they buy 10mm silver rings, 10mm silver sliders, 16mm gold rings, 16mm gold sliders etc,. I just thought it might be an easy fix, but I guess its more complicated than I envisaged! Thank you anyway


Running a botched up version of  osCommerce Online Merchant v2.3.4 bootstrap with the dresscode theme installed, numerous add-ons, terrible coding, terrible website, but will have to make do until I have made up for my losses and can risk shutting down for a couple of weeks while I start all over again. - I did not install my program but am endeavouring to fix it with your help.

Share this post


Link to post
Share on other sites

So what do you mean by "it goes funny"? Do you end up with an unprintable file? Was the invoice plain text before and is now HTML? It's hard to believe that a sortable, printable list couldn't be salvaged from the new invoice. It may be as simple as doing some sort of "special paste" into Word rather than a plain "paste".

Share this post


Link to post
Share on other sites

basically, it seems like it is an html page that is huge and so all I see is a big shadow on the left and such wide columns my 'page' isn't big enough! I've tried all the 'special paste' options, but nothing is remotely close to useable!


Running a botched up version of  osCommerce Online Merchant v2.3.4 bootstrap with the dresscode theme installed, numerous add-ons, terrible coding, terrible website, but will have to make do until I have made up for my losses and can risk shutting down for a couple of weeks while I start all over again. - I did not install my program but am endeavouring to fix it with your help.

Share this post


Link to post
Share on other sites

Have you tried either or both of the following:

  1. Instead of copying the entire email, just select the item description and quantity to copy over for printing
  2. Using a spreadsheet (such as Excel or Open Office Calc) instead, or a different word processor (e.g., Open Office Writer)

Share this post


Link to post
Share on other sites

Hi, I'm not copying from email. I click the 'invoice' button, and print that, but if I 'select all', then copy and paste into word is a no go! I was trying to find an easier way, as although I installed the sloppy words clean up, that gets bypassed if someone chooses the express check-out, and people rarely set their address out correctly - and often incompletely! Someone had their paypal address simply as - Flat 3 London!


Running a botched up version of  osCommerce Online Merchant v2.3.4 bootstrap with the dresscode theme installed, numerous add-ons, terrible coding, terrible website, but will have to make do until I have made up for my losses and can risk shutting down for a couple of weeks while I start all over again. - I did not install my program but am endeavouring to fix it with your help.

Share this post


Link to post
Share on other sites

@@zefeena

so, sorting the shopping cart is quite tricky, but sorting the order products when printing the invoice, is easier.

I don't have a standard copy of osC handy, but if you post your catalog/admin/includes/classes/order.php file here in code brackets, we can tell you where to add or change the order by clause

Edited by bruyndoncx

KEEP CALM AND CARRY ON

I do not use the responsive bootstrap version since i coded my responsive version earlier, but i have bought every 28d of code package to support burts effort and keep this forum alive (albeit more like on life support).

So if you are still here ? What are you waiting for ?!

 

Find the most frequent unique errors to fix:

grep "PHP" php_error_log.txt | sed "s/^.* PHP/PHP/g" |grep "line" |sort | uniq -c | sort -r > counterrors.txt

Share this post


Link to post
Share on other sites

<?php

/*

$Id$

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

Copyright © 2003 osCommerce

Released under the GNU General Public License

*/

class order {

var $info, $totals, $products, $customer, $delivery;

function order($order_id) {

$this->info = array();

$this->totals = array();

$this->products = array();

$this->customer = array();

$this->delivery = array();

$this->query($order_id);

}

function query($order_id) {

$order_query = tep_db_query("select customers_name, customers_company, customers_street_address, customers_suburb, customers_city, customers_postcode, customers_state, customers_country, customers_telephone, customers_email_address, customers_address_format_id, delivery_name, delivery_company, delivery_street_address, delivery_suburb, delivery_city, delivery_postcode, delivery_state, delivery_country, delivery_address_format_id, billing_name, billing_company, billing_street_address, billing_suburb, billing_city, billing_postcode, billing_state, billing_country, billing_address_format_id, payment_method, cc_type, cc_owner, cc_number, cc_expires, currency, currency_value, date_purchased, orders_status, last_modified from " . TABLE_ORDERS . " where orders_id = '" . (int)$order_id . "'");

$order = tep_db_fetch_array($order_query);

$totals_query = tep_db_query("select title, text from " . TABLE_ORDERS_TOTAL . " where orders_id = '" . (int)$order_id . "' order by sort_order");

while ($totals = tep_db_fetch_array($totals_query)) {

$this->totals[] = array('title' => $totals['title'],

'text' => $totals['text']);

}

$this->info = array('currency' => $order['currency'],

'currency_value' => $order['currency_value'],

'payment_method' => $order['payment_method'],

'cc_type' => $order['cc_type'],

'cc_owner' => $order['cc_owner'],

'cc_number' => $order['cc_number'],

'cc_expires' => $order['cc_expires'],

'date_purchased' => $order['date_purchased'],

'orders_status' => $order['orders_status'],

'last_modified' => $order['last_modified']);

$this->customer = array('name' => $order['customers_name'],

'company' => $order['customers_company'],

'street_address' => $order['customers_street_address'],

'suburb' => $order['customers_suburb'],

'city' => $order['customers_city'],

'postcode' => $order['customers_postcode'],

'state' => $order['customers_state'],

'country' => $order['customers_country'],

'format_id' => $order['customers_address_format_id'],

'telephone' => $order['customers_telephone'],

'email_address' => $order['customers_email_address']);

$this->delivery = array('name' => $order['delivery_name'],

'company' => $order['delivery_company'],

'street_address' => $order['delivery_street_address'],

'suburb' => $order['delivery_suburb'],

'city' => $order['delivery_city'],

'postcode' => $order['delivery_postcode'],

'state' => $order['delivery_state'],

'country' => $order['delivery_country'],

'format_id' => $order['delivery_address_format_id']);

$this->billing = array('name' => $order['billing_name'],

'company' => $order['billing_company'],

'street_address' => $order['billing_street_address'],

'suburb' => $order['billing_suburb'],

'city' => $order['billing_city'],

'postcode' => $order['billing_postcode'],

'state' => $order['billing_state'],

'country' => $order['billing_country'],

'format_id' => $order['billing_address_format_id']);

$index = 0;

$orders_products_query = tep_db_query("select orders_products_id, products_name, products_model, products_price, products_tax, products_quantity, final_price from " . TABLE_ORDERS_PRODUCTS . " where orders_id = '" . (int)$order_id . "'");

 

 

while ($orders_products = tep_db_fetch_array($orders_products_query)) {

$this->products[$index] = array('qty' => $orders_products['products_quantity'],

'name' => $orders_products['products_name'],

'model' => $orders_products['products_model'],

'tax' => $orders_products['products_tax'],

'price' => $orders_products['products_price'],

'final_price' => $orders_products['final_price']);

$subindex = 0;

$attributes_query = tep_db_query("select products_options, products_options_values, options_values_price, price_prefix from " . TABLE_ORDERS_PRODUCTS_ATTRIBUTES . " where orders_id = '" . (int)$order_id . "' and orders_products_id = '" . (int)$orders_products['orders_products_id'] . "'");

if (tep_db_num_rows($attributes_query)) {

while ($attributes = tep_db_fetch_array($attributes_query)) {

$this->products[$index]['attributes'][$subindex] = array('option' => $attributes['products_options'],

'value' => $attributes['products_options_values'],

'prefix' => $attributes['price_prefix'],

'price' => $attributes['options_values_price']);

$subindex++;

}

}

$index++;

}

}

}

?>

 

 

Thank you so much for looking at this for me. I have a terrible time with the coding as it makes no sense to me. I am kind of dyslexic. I have no problem with the English language - I guess cos I've had 40 years at it, but coding or numbers, because they appear quite random to me, I find it really hard to see the wood amongst the trees. It takes me hours!!! Hopefully I've done the quote thing right!

[/


Running a botched up version of  osCommerce Online Merchant v2.3.4 bootstrap with the dresscode theme installed, numerous add-ons, terrible coding, terrible website, but will have to make do until I have made up for my losses and can risk shutting down for a couple of weeks while I start all over again. - I did not install my program but am endeavouring to fix it with your help.

Share this post


Link to post
Share on other sites

Find this line

 $orders_products_query = tep_db_query("select orders_products_id, products_name, products_model, products_price, products_tax, products_quantity, final_price from " . TABLE_ORDERS_PRODUCTS . " where orders_id = '" . (int)$order_id . "'");

 

change it to

 $orders_products_query = tep_db_query("select orders_products_id, products_name, products_model, products_price, products_tax, products_quantity, final_price from " . TABLE_ORDERS_PRODUCTS . " where orders_id = '" . (int)$order_id . "' order by products_name ");

by adding

order by products_name

just before the last double quote and closing paranthesis, making sure to have a space inserted just before order by


KEEP CALM AND CARRY ON

I do not use the responsive bootstrap version since i coded my responsive version earlier, but i have bought every 28d of code package to support burts effort and keep this forum alive (albeit more like on life support).

So if you are still here ? What are you waiting for ?!

 

Find the most frequent unique errors to fix:

grep "PHP" php_error_log.txt | sed "s/^.* PHP/PHP/g" |grep "line" |sort | uniq -c | sort -r > counterrors.txt

Share this post


Link to post
Share on other sites

Thank you so much. That works perfectly and will save me so much time. Kellie


Running a botched up version of  osCommerce Online Merchant v2.3.4 bootstrap with the dresscode theme installed, numerous add-ons, terrible coding, terrible website, but will have to make do until I have made up for my losses and can risk shutting down for a couple of weeks while I start all over again. - I did not install my program but am endeavouring to fix it with your help.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×