I have never been one to quit too easily, we will get this done, I firmly believe that this could be incredibly valuable to a lot of people. So, when you get something, let me know. Craig
Multi_Vendor_Shipping new thread
#61
Posted 01 August 2004 - 06:36 PM
I have never been one to quit too easily, we will get this done, I firmly believe that this could be incredibly valuable to a lot of people. So, when you get something, let me know. Craig
Craig Garrison Sr
Anything worth having, is worth working for.
Multi Vendor Shipping V1.1 Demo Catalog
3 Vendors, each category, "buy" a product from each category to see how MVS works during checkout.
Multi Vendor Shipping V1.1 Demo Admin
login: webmaster@blucollarsales.com
pass: mvs_demo
MVS Thread:
Multi-Vendor Shipping
My contribs:
Download Multi Vendor Shipping V1.1
Vendor Email
Vendor Info in easypopulate
EZ Price Updater
And more to come!
#62
Posted 02 August 2004 - 10:41 AM
Searched like crazy to find some answers. Tried code to save v-zip directly to session, no luck. Tried querying form the ship module directly, customer_id, basket_id and therefore products_id not accessible. Posted a request for explanaination of how the info gets to ship modules in the "general discussion" section, no response so far. Not sure where to go to find this info, but it must be out there some where. We are stuck until we figure this part out. Craig
Craig Garrison Sr
Anything worth having, is worth working for.
Multi Vendor Shipping V1.1 Demo Catalog
3 Vendors, each category, "buy" a product from each category to see how MVS works during checkout.
Multi Vendor Shipping V1.1 Demo Admin
login: webmaster@blucollarsales.com
pass: mvs_demo
MVS Thread:
Multi-Vendor Shipping
My contribs:
Download Multi Vendor Shipping V1.1
Vendor Email
Vendor Info in easypopulate
EZ Price Updater
And more to come!
#63
Posted 02 August 2004 - 11:28 PM
Export your table structure of your new table(s) and I'll put in my own rows so we have that in common.
Joey
#64
Posted 03 August 2004 - 12:14 AM
I wanted to add my 2 cents to the conversation and provide everyone with a synopsis of how our company was looking to enhance the original MVS:
- Vendor Based zipcode origins seem to be the most effective method of calling data from the mySQL tables;
- We currently have the original MVS running, along with a couple added shipping methods in place (Individual Shipping, Free Shipping, etc);
- Mike, the original author of EMVS (tahuti@netzero.net), has tried to work closely with our IT team to integrate global zipcode variables into his updated code. However, we were having problems since it appeared Mike wrote only a portion of the code needed to simply reference the zips from the Vendor table, but not an actual call to the shopping cart when checking out. The shopping cart class was running into problems and wasnt producing the correct shipping quote based in ziporigins.
- MVS and EMVS were also having problems with combining 2 or more items in the cart with 2 or more vendors/shipping origins. Perhaps this is a wrongly designed calculation function in the shopping cart?
********
On a personal note, I believe this new version of Enhanced Vendors will easily supercede older releases. The zipcode origin functionality alone is worth its weight in gold. This kind of contribution will make the concept of dropshipping very doable, and we hope to introduce the code into our family of websites.
Please let me know what I can do to help!
Thanks,
-Codi
#65
Posted 03 August 2004 - 02:16 AM
Joey, which table do you want, the Vendors table? Here is the sql to create the Vendors table and add rows to "products" table
Quote
ALTER TABLE `products` ADD `vendors_id` VARCHAR( 11 ) DEFAULT NULL ;
ALTER TABLE `products` ADD `vendors_product_price` DECIMAL( 15, 4 ) DEFAULT '0.0000' NOT NULL ;
ALTER TABLE `products` ADD `vendors_prod_id` VARCHAR( 24 ) NOT NULL AFTER `vendors_product_price` ;
ALTER TABLE `products` ADD `vendors_prod_comments` TEXT DEFAULT NULL AFTER `vendors_prod_id` ;
# --------------------------------------------------------
# Table structure for table `vendors`
#
CREATE TABLE `vendors` (
`vendors_id` int(11) NOT NULL auto_increment,
`vendors_price_id` int(32) NOT NULL default '0',
`vendors_contact` varchar(32) NOT NULL default '',
`account_number` varchar(32) NOT NULL default '',
`vendors_name` varchar(32) NOT NULL default '',
`vendors_phone1` varchar(20) NOT NULL default '',
`vendors_fax` varchar(20) NOT NULL default '',
`vendors_email` varchar(64) NOT NULL default '',
`vendors_url` varchar(64) NOT NULL default '',
`date_added` datetime default NULL,
`last_modified` datetime default NULL,
`vendors_image` varchar(24) default NULL,
`vendors_send_email` tinyint(1) default '0',
`vendor_street` varchar(64) NOT NULL default '',
`vendor_city` varchar(32) NOT NULL default '',
`vendor_state` varchar(32) default NULL,
`vendor_country` varchar(64) NOT NULL default '',
`vendors_zipcode` varchar(11) NOT NULL default '',
`vendor_add_info` text,
`method_name` varchar(32) NOT NULL default '',
`module_names` varchar(64) NOT NULL default '',
`handling_charge` decimal(5,2) NOT NULL default '0.00',
`handling_per_box` tinyint(1) NOT NULL default '0',
`tare_weight` decimal(4,2) NOT NULL default '0.00',
`max_box_weight` tinyint(3) unsigned NOT NULL default '0',
PRIMARY KEY (`vendors_id`)
) TYPE=MyISAM COMMENT='Vendors table add-in' AUTO_INCREMENT=34 ;
Quote
`module_names` varchar(64) NOT NULL default '',
`handling_charge` decimal(5,2) NOT NULL default '0.00',
`handling_per_box` tinyint(1) NOT NULL default '0',
`tare_weight` decimal(4,2) NOT NULL default '0.00',
`max_box_weight` tinyint(3) unsigned NOT NULL default '0',
Note that at this point in our progress I have not botheres to call for the addinitional info you see in the Vendors table here, just the zipcode. But you can see that it is a copy of what was being used in the original MVS contrib. I can explain this portion further if you want, but I think you can see what would be available from each Vendor.
If there is any other info you need, just let me know. If you want a copy of the */*/classes/shopping_cart.php file or any of the other files I have worked with, email me and I will email all related files for you to see what I have done.
It still comes down to "how" we will pass the "vendors_zipcode" to the ship module itself. After talking to Codi, we have a couple of other possibilities. I will explore them a little further before posting anything on those. For now, I think we should continue on our current track. Lets see what we can do! Craig
Craig Garrison Sr
Anything worth having, is worth working for.
Multi Vendor Shipping V1.1 Demo Catalog
3 Vendors, each category, "buy" a product from each category to see how MVS works during checkout.
Multi Vendor Shipping V1.1 Demo Admin
login: webmaster@blucollarsales.com
pass: mvs_demo
MVS Thread:
Multi-Vendor Shipping
My contribs:
Download Multi Vendor Shipping V1.1
Vendor Email
Vendor Info in easypopulate
EZ Price Updater
And more to come!
#66
Posted 03 August 2004 - 04:51 PM
Joey
#67
Posted 03 August 2004 - 06:33 PM
The whole concept of this thread isn't hard. When I get an extra hour I will show you that it can be done.
#68
Posted 03 August 2004 - 09:53 PM
How? I have gotten the queries to collect the data in the classes/shopping_cart.php no problem, but I have not been able to successfully pass that info to the module by any means. If you know how to store the info once we have collected it please post that instead of a snotty post implying I had not read your previous post. Apparently, you did not bother to read the last page or 2 of this thread or you would have know that.
Craig
Craig Garrison Sr
Anything worth having, is worth working for.
Multi Vendor Shipping V1.1 Demo Catalog
3 Vendors, each category, "buy" a product from each category to see how MVS works during checkout.
Multi Vendor Shipping V1.1 Demo Admin
login: webmaster@blucollarsales.com
pass: mvs_demo
MVS Thread:
Multi-Vendor Shipping
My contribs:
Download Multi Vendor Shipping V1.1
Vendor Email
Vendor Info in easypopulate
EZ Price Updater
And more to come!
#69
Posted 03 August 2004 - 11:36 PM
but apparently you don't want my help here, so BYE.
#70
Posted 04 August 2004 - 02:15 AM
Quote
CODE
$country_name = tep_get_countries(SHIPPING_ORIGIN_COUNTRY, true);
$this->_Origin(SHIPPING_ORIGIN_ZIP, $country_name['countries_iso_code_2']);
changed to
CODE
global $origininfo;
$country_name = tep_get_countries($origininfo['country'], true);
$this->_Origin($origininfo['zipcode'], $country_name['countries_iso_code_2']);
the key here is rewriting the shipping class to change the value of $origininfo before calling each need module.
the shipping class uses the cart class to get the products and coresponding vendors, it sorts the items by vendor, adds up the weights and calls the valid shipping modules for each vendor. it then returns the totals of all the different items and methods.
Now if I just had some time I would code it....
and
Quote
so far I have this
CODE
$prodvendors=$cart->get_products();
foreach ($prodvendors as $product){
$sortvendor[$product['vendors_id']]['vendors_id']=$product['vendors_id'];
$sortvendor[$product['vendors_id']][]=$product;
$sortvendor[$product['vendors_id']]['weight']+=$product['weight'];
}
foreach ($sortvendor as $vendor){
$vendor_info_query=tep_db_query("Select * from vendors where vendors_id='".$vendor['vendors_id']."'");
$vendor_info=tep_db_fetch_array($vendor_info_query);
$sortvendor[$vendor['vendors_id']]=array_merge($sortvendor[$vendor['vendors_id']],$vendor_info);
}
You end up with an array of all the products order grouped by vendor with the vendor infomation in an array
We need all the help we can get.
Quote
Posted: Jul 12 2004, 06:11 AM
Craig Garrison Sr
Group: Community Member
Posts: 164
Joined: 25-April 04
I'm gonna give it a shot. I am no coding genius but I may be able to figure it out with a little help here and there. the features you write about are exactly the functionality I am hoping to accomplish.
As I said from the beginning, I am no genius. Craig
Craig Garrison Sr
Anything worth having, is worth working for.
Multi Vendor Shipping V1.1 Demo Catalog
3 Vendors, each category, "buy" a product from each category to see how MVS works during checkout.
Multi Vendor Shipping V1.1 Demo Admin
login: webmaster@blucollarsales.com
pass: mvs_demo
MVS Thread:
Multi-Vendor Shipping
My contribs:
Download Multi Vendor Shipping V1.1
Vendor Email
Vendor Info in easypopulate
EZ Price Updater
And more to come!
#71
Posted 04 August 2004 - 03:09 AM
global $origininfo; $origininfo['zipcode']=$vendor['vendors_ship_zip']; $origininfo['country']=$vendor['vendors_ship_country']; $origininfo['state']=$vendor['vendors_ship_state'];
then each module need to has code likethis also in the quote function.
global $origininfo; $countries_array = tep_get_countries($origininfo['country'], true); $this->country = $countries_array['countries_iso_code_2']; $this->originZip=$origininfo['zipcode'];
of coarse each module sets the zipcode and country in a different place.
I set the top code in a loop for all of the vendors, which gives me a shipping quote for each vendor. I now have to combin the array and display the contents and have that quote get carried over to the next step of the checkout process, ( 1 quote can contain multiple quotes from different shipping companies) th current way will not work.
#72
Posted 04 August 2004 - 03:17 AM
This is where it has been breaking for me, what is the code to carry or define what we get from the query? I have been able to get all the data, but I have not been able to retain it all the way through to the ship module. Can you explain how this works? Craig
Craig Garrison Sr
Anything worth having, is worth working for.
Multi Vendor Shipping V1.1 Demo Catalog
3 Vendors, each category, "buy" a product from each category to see how MVS works during checkout.
Multi Vendor Shipping V1.1 Demo Admin
login: webmaster@blucollarsales.com
pass: mvs_demo
MVS Thread:
Multi-Vendor Shipping
My contribs:
Download Multi Vendor Shipping V1.1
Vendor Email
Vendor Info in easypopulate
EZ Price Updater
And more to come!
#73
Posted 04 August 2004 - 03:26 AM
Like this?
Quote
function show_origininfo() {
$this->contents();
return $this->origininfo;
}
At the end of the classes/shopping_cart file?
Craig Garrison Sr
Anything worth having, is worth working for.
Multi Vendor Shipping V1.1 Demo Catalog
3 Vendors, each category, "buy" a product from each category to see how MVS works during checkout.
Multi Vendor Shipping V1.1 Demo Admin
login: webmaster@blucollarsales.com
pass: mvs_demo
MVS Thread:
Multi-Vendor Shipping
My contribs:
Download Multi Vendor Shipping V1.1
Vendor Email
Vendor Info in easypopulate
EZ Price Updater
And more to come!
#74
Posted 04 August 2004 - 05:26 PM
Zebrax, your suggestion is helpful!
Craig, I think I finally understand your problem because you said it yourself, sessions. If I understand you corectly, you want to know how to carry the data to the next page? I figure this is only a small part of the bigger problem but a very basic necessity. Global variables are not the same as Session variables, global variables are usable in every function where local variables are usable only in that function, session variables would be usable in every page, and function. Session variables are officially registered (see http://us2.php.net/session).
I hope this help a little. I apologize if I still misunderstand.
I'll take a closer look at Zebrax's code example.
Joey
#75
Posted 04 August 2004 - 06:15 PM
So at no time do we need to directly set the session with the shipping info, it should be done automaticly when the method is chosen. But this is where the problems start. We are using multiple modules and methods so the standard input of "module_method" will not work in our situation. we may have to change it to somethng like "vendor_number" where the number would be the quote that could consist of many modules and method prices added together.
example
2 items from vendor A
1 item from vendor B
Vendor A ships with UPS
Vendor B ships with Fedex
For 1 box from Vendor A would would have a few methods: Ground and express
the same for box 2 from vendor B: ground and Express
so now you have a quote 1 which is ups ground and fedex ground added together.
and quote 2 for UPS express and Fedex express.
now the customer would choose the shipping they want..normaly that would be posted as fedex_express or ups_ground but we could change that to vendor_1
so now the price for quote 1 get entered into the session with title "2 boxes fedex and UPS" and price "$" and the checkout process continues as normal.
I understand that we could end up with multiple methods and multiple modules, and it could be very confusing. But we should be able to manage it.
#76
Posted 04 August 2004 - 09:20 PM
Something else that I am thinking is, are we too far into the shipping quote process? I mean should we be looking for some function called "getQuote($vendor['zipcode'])" that we could change to "getQuote($vendor[$i]['zipcode'])" or something like this and just call this method for each vendor's zip code we have and let the quote write out the display as normal with a line separator for each vendor? The problem is finding that specific location in the code.
#77
Posted 04 August 2004 - 09:23 PM
Craig Garrison Sr
Anything worth having, is worth working for.
Multi Vendor Shipping V1.1 Demo Catalog
3 Vendors, each category, "buy" a product from each category to see how MVS works during checkout.
Multi Vendor Shipping V1.1 Demo Admin
login: webmaster@blucollarsales.com
pass: mvs_demo
MVS Thread:
Multi-Vendor Shipping
My contribs:
Download Multi Vendor Shipping V1.1
Vendor Email
Vendor Info in easypopulate
EZ Price Updater
And more to come!
#78
Posted 04 August 2004 - 09:44 PM
Quote
By making a variable "global" you can access from any function anywhere in the script , so this is what it is doing, changing a variable and then the including modules use the changed variable you could also use $GLOBALS['origininfo'] to get the info in the modules.
#79
Posted 04 August 2004 - 11:48 PM
Quote
Dax,
This may be an obsolete observation, but I remember something about osCommerce having some kind of problem with registering/enabling global variables???
Take a look at this thread:
http://forums.oscommerce.com/index.php?&showtopic=93343
This might be a mute point, but I wanted to bring it to everyone's attention anyway.
Thx,
-Codi
#80
Posted 05 August 2004 - 01:03 AM
Dax, I will play with global variable some more, but I had tried to get it working before with no success. It could have been an issue with the older version of php that was on my live site (the globals issue) or my code was probably not right. I am in the process of changing hosts and I will now have 4.3.3 to work with out in the real world. Good luck with the code Dax, if you need anything, let us know. Craig
Craig Garrison Sr
Anything worth having, is worth working for.
Multi Vendor Shipping V1.1 Demo Catalog
3 Vendors, each category, "buy" a product from each category to see how MVS works during checkout.
Multi Vendor Shipping V1.1 Demo Admin
login: webmaster@blucollarsales.com
pass: mvs_demo
MVS Thread:
Multi-Vendor Shipping
My contribs:
Download Multi Vendor Shipping V1.1
Vendor Email
Vendor Info in easypopulate
EZ Price Updater
And more to come!









