Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Populate Cart


Nipsy

Recommended Posts

Populate Cart v 1.0 with Product Picker

 

This contrib allows you to populate a user's cart from the admin using model numbers and quantities up to 20 items at a time. This is designed to help phone operators quickly enter orders, translate fax order into web orders, and create orders for walk-in customers. For larger stores, a pop-up product picker is included to help choose the correct items.

 

Installation

Upload populate_cart.php and product_picker.php to the admin root (usually /catalog/admin/).

Add the following line to /catalog/admin/includes/boxes/customers.php:

	'<a href="' . tep_href_link('populate_cart.php', '', 'NONSSL') . '" class="menuBoxContentLink">Populate Cart</a><br>' .

I chose to add it after:

	'<a href="' . tep_href_link(FILENAME_ORDERS, '', 'NONSSL') . '" class="menuBoxContentLink">' . BOX_CUSTOMERS_ORDERS . '</a><br>' .

 

 

That is it.

 

 

Code is not fully OSC compliant yet, as it does not yet take care of using defined filenames or language text, but it may in the near future.

 

I am a horrible tech writer, and apologize in advance for the lack of documentation.

 

If this contrib saves you time and you would like to see it evolve, I accept PayPal donations at [email protected]

Link to comment
Share on other sites

Hi there,

I tried installing and running the contributions, here are my observations on it:

1-The code points to your web page (the form submit) and it has to be modified according to the server it runs.

2-The product picker points to /admin/ but since it's in the same dir (based on the installation instructions) it has to be just the filename as path for the javascript call

3-The contributions can't add items with attributes

4-When it say "success" i can't see any order placed....also if i use a valid email address already registered.

And here are the suggestion:

1-2 Easy to fix, just check code :)

3-Dunno, seems hard when attributes comes....i hate them :P

4-maybe having a search and select popup for looking into existing customers can help :)

Keep up the good work and thanks for the contribution, once tuned i think it maybe very useful!

Cheers

Fabrizio :thumbsup:

Advice on forum are Free, Email or Pm to fix your site is work...which I charge for :)

-------------------

Link to comment
Share on other sites

1 and 2 have been addressed in a new release I just posted.

 

4 I will look into shortly. My main reason for making this was to quickly add items to a cart belonging to a caller, so I ask them their email before beginnig, but I can see the value in having a customer/email list available! Also, just to clarify, this will not place an order, it will put the items in the user's cart. If you then log in as that user, you'll see the items you added.

 

3 Attributes....I just don't know if there is a good way to handle attributs in this scenario. In the future I may take some time to investigate.

 

 

Hi there,

I tried installing and running the contributions, here are my observations on it:

1-The code points to your web page (the form submit) and it has to be modified according to the server it runs.

2-The product picker points to /admin/ but since it's in the same dir (based on the installation instructions) it has to be just the filename as path for the javascript call

3-The contributions can't add items with attributes

4-When it say "success" i can't see any order placed....also if i use a valid email address already registered.

And here are the suggestion:

1-2 Easy to fix, just check code :)

3-Dunno, seems hard when attributes comes....i hate them :P

4-maybe having a search and select popup for looking into existing customers can help :)

Keep up the good work and thanks for the contribution, once tuned i think it maybe very useful!

Cheers

Fabrizio :thumbsup:

Link to comment
Share on other sites

This doesn't work for me at all.

 

 

Add these to become OSC compliant.

 

 

populate_cart.php

replace form with this.

 

<?php echo '<form name="populate_cart" action="' . tep_href_link(FILENAME_POPULATE_CART, 'action=populate_cart.php', 'NONSSL') . '" method="post">'; ?>

 

 

admin/inc/filenames.php add this

define('FILENAME_POPULATE_CART', 'populate_cart.php');

 

admin/inc/lang/english.php add this

define('BOX_POPULATE_CART', 'Populate Cart');

 

admin/inc/boxes/customers.php

 

correct the file references to FILENAME_POPULATE_CART, and BOX_POPULATE_CART

 

 

 

Personally I think the best method for this whole situation would be to add check boxes next to every product in categories.php in the listing and a add to cart button at the bottom of the list. I am going to post an extensive post on the edit-orders contribution on how I think it would be best setup.

 

1. Log into customer account backend

2. Browse through products in categories.php and check off items and add to cart.

3. check out through edit_orders.php

 

I can see value in this contribution if it works on populating a customers cart for them to check out.

 

But I am getting nothing at all.

 

Let me know if you can fix it.

 

Thanks,

 

Brad

Link to comment
Share on other sites

You will not see newly added items until you logout and login as the customer.

 

Log out of your customer accounts entirely, populate a cart, and then log into the account. You should see the items in question.

 

The reason I have chosen not to use check boxes is simple. I have 6000 items on my site. I can touch type to select by model number in a pull down that loads in 15 seconds. I could not even find the relevant product in a 6000 item list of check boxes in that amount of time.

 

I will try to find the time to make it OSC compliant in the near future (or welcome anyone else to do so).

 

 

 

This doesn't work for me at all.

Add these to become OSC compliant.

populate_cart.php

replace form with this.

 

<?php echo '<form name="populate_cart" action="' . tep_href_link(FILENAME_POPULATE_CART, 'action=populate_cart.php', 'NONSSL') . '" method="post">'; ?>

admin/inc/filenames.php add this

  define('FILENAME_POPULATE_CART', 'populate_cart.php');

 

admin/inc/lang/english.php add this

define('BOX_POPULATE_CART', 'Populate Cart');

 

admin/inc/boxes/customers.php

 

correct the file references to FILENAME_POPULATE_CART, and BOX_POPULATE_CART

Personally I think the best method for this whole situation would be to add check boxes next to every product in categories.php in the listing and a add to cart button at the bottom of the list. I am going to post an extensive post on the edit-orders contribution on how I think it would be best setup.

 

1. Log into customer account backend

2. Browse through products in categories.php and check off items and add to cart.

3. check out through edit_orders.php

 

I can see value in this contribution if it works on populating a customers cart for them to check out.

 

But I am getting nothing at all.

 

Let me know if you can fix it.

 

Thanks,

 

Brad

Link to comment
Share on other sites

I think that the reason that a live cart is not updated is that an active user's cart is cookie based. When the user logs out, their cart is written to the db. When they log in again, the cart is restored from the db.

 

My contrib writes to the db, which may only be queried on login/logout.

 

This is just conjecture, but it looks like it may be the case.

Edited by Nipsy
Link to comment
Share on other sites

I LOVE IT!!!! I've been modifying osCommerce carts for nearly 2 years now and this is the coolest item I've installed yet.

 

I'm in the process now of integrating the concept into the Step by Step manual order entry contribution. One of the stores I do work for has close to 8,000 items and the drop dwon to palce an order is ridiculous.

 

Good work.

Link to comment
Share on other sites

  • 3 months later...

Monk, how did this inetgration go? Is all working as anticipated? Does manual order entry (for phone orders) work without the use of pull downs? I..e so when a phone order comes in we can just type in the SKU, the quantity, and go to the next SKU, etc.?

John Beech - GM (and janitor)

Link to comment
Share on other sites

  • 4 months later...

Hey guys,

 

Did you check the newest file for the "Populate Cart" contrib? I added the attributes support. I have been working a few hours around it and tested it in Mozilla and IE.

 

Please, share your comments. I wouldlike to make the integration more seemless (eliminate the popup)... still trying to find some time for it.

 

Waiting for your comments :)

----------------------------------------------------

 

Stephan Mitchev

Link to comment
Share on other sites

  • 3 weeks later...
Populate Cart v 1.0 with Product Picker

 

This contrib allows you to populate a user's cart from the admin using model numbers and quantities up to 20 items at a time. This is designed to help phone operators quickly enter orders, translate fax order into web orders, and create orders for walk-in customers. For larger stores, a pop-up product picker is included to help choose the correct items.

 

Installation

Upload populate_cart.php and product_picker.php to the admin root (usually /catalog/admin/).

Add the following line to /catalog/admin/includes/boxes/customers.php:

	'<a href="' . tep_href_link('populate_cart.php', '', 'NONSSL') . '" class="menuBoxContentLink">Populate Cart</a><br>' .

I chose to add it after:

	'<a href="' . tep_href_link(FILENAME_ORDERS, '', 'NONSSL') . '" class="menuBoxContentLink">' . BOX_CUSTOMERS_ORDERS . '</a><br>' .

That is it.

Code is not fully OSC compliant yet, as it does not yet take care of using defined filenames or language text, but it may in the near future.

 

I am a horrible tech writer, and apologize in advance for the lack of documentation.

 

If this contrib saves you time and you would like to see it evolve, I accept PayPal donations at [email protected]

Link to comment
Share on other sites

I am new at this and I have a problem. I followed the instructions and i get

Call to a member function on a non-object in /my path/catalog/admin/populate_cart.php on line 20

Luckly I'm tried this on my test site first. This would be realy helpfull on my site. Thanks

Link to comment
Share on other sites

  • 2 weeks later...
I am new at this and I have a problem. I followed the instructions and i get

Call to a member function on a non-object in /my path/catalog/admin/populate_cart.php on line 20

Luckly I'm tried this on my test site first. This would be realy helpfull on my site. Thanks

 

Which version did you try?

----------------------------------------------------

 

Stephan Mitchev

Link to comment
Share on other sites

  • 2 months later...
  • 4 weeks later...

The handling of product options/attributes in OSC (and in most contibutions) is generally poor - but at last this contibution shows the way forward.. A fast easy method of handling attributes on orders, which I am sure will be copied.. great contribution, thanks

 

A couple of features..

 

1. If a product has multiple attributes (eg size and colour), then although the attrpopup handles all of the attributes properly, only the last attribute seems to be added into the cart. I have looked at the code, and can see lots of code that looks like it should handle this but i cannot identify where it is losing the early attribute info.

 

2. If the order has multiple lines for the same item but with different attributes (eg shirt-green AND shirt-red) then only the last line item is added to the cart.

 

Any ideas ?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...