Hi,
A Manufacturer has an address that is used when calculating the shipping cost between the Manufacturer and the Customer.
On Amazon.com multiple suppliers for a single product are shown, each with their own price and shipping cost. Are there other ubercarters who could take advantage of having multiple suppliers for a single product?
at http://www.ubercart.org/docs/user/304/manufacturer_settings it says:
Multiple selection -- Products may be listed under multiple manufacturers, but this should be avoided because it's probably not true. This property is required for "free tagging" vocabularies.
The result is that multiple manufacturers may be associated with a product but they are not intended to be.
I've found a few hiccups before multiple manufacturers/suppliers could be supported:
The Import module only expects one manufacturer on line 852:
if (module_exists('uc_manufacturer') && $manufacturer = variable_get('uc_manufacturer_vid', 0)){
$product->taxonomy['tags'][$manufacturer] = html_entity_decode((string)$product_data->manufacturer);
}whereas it expects multiple categories on line 843:
if (module_exists('uc_catalog')){
foreach ($product_data->categories->category as $category_data){
$product->taxonomy[] = $id_map['categories'][(string)$category_data->id];
}
}The XML schema at http://www.ubercart.org/docs/user/354/importing_data also specifies only one occurrence of the manufacturer tag:
XPath: /store/products/product/manufacturer
Type: String
Required/Occurrences: No, 1
And when exporting products with multiple manufacturers only the first one is exported.
The rationale for having multiple manufacturers:
I have products I can source from multiple suppliers. I was entering the suppliers as Manufacturers. I have checked off the 'Allow multiple' on the Manufacturers vocabulary to allow a single product to have multiple addresses from which it may be shipped.
I am considering modifying the shipping logic to calculate shipping rates for each of the suppliers and then choosing the cheapest rate. Suppliers may have different prices for the same product so possibly the lowest sum of price+shipping would be selected.
Any thoughts or suggestions for a better way to achieve this type of functionality?
Thanks
-C
