Jump to content

mugitty

Members
  • Content count

    1,193
  • Joined

  • Last visited

Everything posted by mugitty

  1. mugitty

    UPSXML setup for MS2

    I have just set up the UPSXML shipping module with dimensional support in a clean MS2 store and found the following which should be watched for: The module is UPSXML Rates and Services and the version used is the most recent (17 Aug 2004 - 1.03.02 Author: Fox Morrey) The installation instructions (dimensions.txt) for the dimensional support option are outdated - here are some of the things I found: 1) Steps 3 and 4 refer to some queries which have changed a bit in MS2, so to install I just searched for any instance of "weight" in the files catalog/includes/classes/shopping_cart.php admin/includes/classes/shopping_cart.php admin/categories.php and added the appropriate entries for products_length products_width products_height products_ready_to_ship using the same code format as used for products_weight where ever it was found. 2) Step 6 puts the file and database table defines in application_top - they should be put in the appropriate filenames.php or database_tables.php files ======================= There have been a number of posts regarding the osC UPS interface not matching the rates shown on the UPS website. The stock UPS module does appear to produce some of these non-matching results and I am not certain where the error occurs. However, I just ran several packages under differing circumstances using the UPSXML contribution and was able to get ABSOLUTELY IDENTICAL RESULTS from both the module and the UPS website. Some of the setting options in both the module and the UPS website shipping calculator may be causing people to think that there are inaccurate results coming from the module (since there are a number of choices that must be made in both the module and the website calculator). Here are some sets of settings that yielded IDENTICAL results in my testing. In each instance the dollar amount shown is for Ground shipping, but EVERY METHOD RATE was identical in all of the test situations that I ran: These rates were all for the same package being shipped to the same location. As you can see, the settings can make a dramatic difference in the quote received (in this example the quote ranged from $4.76 to $9.15). For our store, since we are not sure if an address is residential or commercial, we leave the setting at residential. Even though we have Daily Pickup, which would cost us an actual of $6.91 for residential delivery in the above example, we set the UPSXML module to yield the $8.40 rate, which allows us to cover some of the packaging/handling expense and errors from inaccurate product weights which might occur.
  2. mugitty

    Free Shipping per Product

    I have a need to present certain items with Free Shipping to the lower 48 US states. I installed the Free Shipping per Product, which I believe I can make work pretty much the way I want it to except for one issue: In the setup for the mod, there is a provision to ship designated items worldwide or just to the shop's own country. I need to amend the code to reflect just the lower 48 US States instead of the entire US. There is already a zone set up in the cart for the lower 48, but I can't sort out which code to change to exclude Alaska and Hawaii from the free shipping availability. The amended section of catalog/checkout_shipping.php is below, though I'm not sure if the last section of this where it says if ($order->delivery['country_id'] != STORE_COUNTRY && FREE_SHIPPING_TO_ALL_COUNTRIES == "false") { is the correct area to be looking or not: 94: if ($free_shipping == false) { 95: $check_free_shipping_basket_query = tep_db_query("select products_id from " . TABLE_CUSTOMERS_BASKET . " where customers_id = '" . (int)$customer_id . "'"); 96: while ($check_free_shipping_basket = tep_db_fetch_array($check_free_shipping_basket_query)) { 97: $check_free_shipping_query = tep_db_query("select products_free_shipping from " . TABLE_PRODUCTS . " where products_id = '" . (int)$check_free_shipping_basket['products_id'] . "'"); 98: $check_free_shipping = tep_db_fetch_array($check_free_shipping_query); 99: $check_free_shipping_array[] = $check_free_shipping['products_free_shipping']; 100: } 101: if (in_array("1", $check_free_shipping_array) && !in_array("0", $check_free_shipping_array)) { 102: $free_shipping = true; 103: include_once(DIR_WS_LANGUAGES . $language . '/checkout_shipping.php'); 104: } 105: } 106: 107: if ($order->delivery['country_id'] != STORE_COUNTRY && FREE_SHIPPING_TO_ALL_COUNTRIES == "false") { 108: $free_shipping = false; 109: } I believe that other files affected by the contribution only deal with text identification for free shipping items (index, product_info and product_listing in the catalog area) or with providing for selecting whether an item gets free shipping (categories in the admin area). Anyone have an ides how to make $order->delivery['country_id'] != call the zone rather than the whole country?
  3. I know that this mod is a bear to set up and still needs some tweaks here and there, but it really has some neat features. I've managed to get it working pretty much to an acceptable level with one exception that I can't figure out, so I'm hoping that someone else who is using it has found the solution already. In the status and email section of the admin interface: When you update the status with "Notify Customer" checked (1), it automatically sends an email to the customer, advising them of the status of their order. This is really neat, because it will also place a checkmark (2) to let you know that the customer was notified of that particular status change. Trouble is, when you use this feature, the mail goes but, instead of the order status particulars, you get this: You can send email with the email function (3), but it doesn't give you the visual record like number (2) and it is in a different format that doesn't show the comments you may have added. If anyone has gotten this up and running correctly, I would really appreciate (select one or more): advice, pointers, direction, code changes, a drink Thanks :!:
  4. InfoPages_v0.1 This is a variation of the Information Unlimited v1.1a contribution from Joeri Stegeman. The vast majority of the code is what was submitted by him, with a few modifications: InfoPages allows for unlimited additions to either the existing "Information" infobox or the creation of a new infobox for holding links to additional pages you may want to create. Either option is achieved through the Admin area of osC. http://www.oscommerce.com/community/contributions,1040 (hmmm, notice the contribution number - the tax man cometh)
  5. There had been prior discussion and a proposed fix for the UPS rates being incorrect when displaying the totals in Ship-In-Cart. I don't recall if I had the fix in UPSXML in place and found that it corrected the problem, or if I had just decided to not show the totals to my customers... at any rate, I just made some mods to provide for the weight of attributes to be added when they are selected so that the shipping quotes would be accurate for the actual weight being shipped, and I find the same issue has cropped up again: The UPS rates for each individual method appear to be OK but if you show the total $ amount for the order, it seems that the weight is being doubled, producing almost double the shipping charge. This only occurs when a UPS rate is selected (USPS appears correctly), and it only appears in the total section... the individual method rate remains correct. Has anyone else encountered this and found a solution?
  6. I have installed the attribute sorter/copier with weight support and it is working quite nicely, however... The tables with the selectable attributes appear every time an item add/edit page is opened in the admin. With several thousand products, several hundred attributes and only a few dozen items which actually have attributes, the tables become a problem when editing. Is there a way to 1) only have the tables appear if an item has attributes and then 2) only have the specific table(s) appear for attributes that have been indicated as valid for a given item?
  7. Anita; Thank you for all of your eforts on this contribution. It's very nicely done and provides excellent options from the Admin interface. Install was a breeze and your instructions and user guide are first rate! My little suggestion for upcoming versions (I've looked at doing this and just don't have the capability to bring it off) would be to make the item selection from within the Admin interface a search function rather than dropdowns (similar to what was done in Select Specials) I've also noticed that whenever I do an addition or update, there is a long pause before the screen refreshes. I have around 3000 products in the database, and I suspect that the delay is due to the number of products. I don't know if there's a way to streamline the queries that are being done to improve the speed (and possibly reduce the query load) or not...
  8. Anita; Thank you for all of your eforts on this contribution. It's very nicely done and provides excellent options from the Admin interface. Install was a breeze and your instructions and user guide are first rate! My little suggestion for upcoming versions (I've looked at doing this and just don't have the capability to bring it off) would be to make the item selection from within the Admin interface a search function rather than dropdowns (similar to what was done in Select Specials) I've also noticed that whenever I do an addition or update, there is a long pause before the screen refreshes. I have around 3000 products in the database, and I suspect that the delay is due to the number of products. I don't know if there's a way to streamline the queries that are being done to improve the speed (and possibly reduce the query load) or not...
  9. mugitty

    Information Pages Unlimited v1.0

    Joeri; Great contribution, Thank You! I use this extensively to provide pages of additional information that relates to the products I sell. I have amended things slightly to show the page title in the browser title bar, but I notice that the breadcrumb only reflects the current page. Is it possible to have the breadcrumb reflect the entire path to whatever page you happen to be on (as the catalog itself does)? Thus, if you have a parent and a child page, the breadcrumb would show Home >> Catalog >> Parent Info Page >> Child Info Page It would also be neat if the child pages appeared in the body of the parent page (as they do in the catalog categories)
  10. I have installed All Manufacturers and their Products Categories 1.0 (thank you Carine). Since I have some manufacturers that have products in many categories and others with just a few, the stock 3 column layout left big gaps when a manufacturer with many categories fell next to one with just a few. I changed the output so that there is just 1 column with the manufacturer name followed by its product categories. I also amended the manufacturer logo/name line to show both the logo and the name. Having done that, I am left with the following problems: 1) The logo appears to be formatted so that any text next to it is aligned at the bottom of the logo - I need to have it aligned along the centerline of the logo 2) The category output will break a category name that has a space in it so that part of the name wraps to the next line - how can I prevent breaks and/or specify a given number of category names to appear before there is a break to the next line My amended code is below <!-- all manufacturers begin //--> <?php $row = -1; $manufacturers_query = tep_db_query("SELECT DISTINCT count(p2c.products_id) as prodcount, cd.categories_id, cd.categories_name, m.manufacturers_id, manufacturers_name, manufacturers_image FROM " . TABLE_PRODUCTS . " p, " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd, " . TABLE_MANUFACTURERS ." m, " . TABLE_PRODUCTS_TO_CATEGORIES ." p2c WHERE p.manufacturers_id = m.manufacturers_id AND p.products_id = p2c.products_id AND p.products_status = 1 AND p2c.categories_id = c.categories_id and c.categories_id = cd.categories_id and cd.language_id = " . (int)$languages_id . " GROUP BY m.manufacturers_name, cd.categories_name"); $last_manid = ''; while ($manufacturers = tep_db_fetch_array($manufacturers_query)) { if ($manufacturers['manufacturers_id'] <> $last_manid ) { $row++; if ($last_manid) { echo '</td>'; if ((($row / 1) == floor($row / 1))) { ?> </tr> <tr> <?php } } $last_manid = $manufacturers['manufacturers_id']; echo '<td align="left" valign="top" width="100%" class="main">'; echo '<a href="' . tep_href_link(FILENAME_DEFAULT, 'manufacturers_id=' . $manufacturers['manufacturers_id'] , 'NONSSL', false) . '">'; //If you'd like to have an image shown, remove the comment slashes from the next lines if ($manufacturers['manufacturers_image']) { echo tep_image(DIR_WS_IMAGES . $manufacturers['manufacturers_image'], $manufacturers['manufacturers_name'], '', '') . tep_draw_separator('pixel_trans.gif', '50', '1') . '<font size="+1"><b>'. $manufacturers['manufacturers_name'] . '</b></font><br>'; } else { echo '<h4>'. $manufacturers['manufacturers_name'] .'</h4>'; } echo "</a>"; } echo '<a href="' . tep_href_link(FILENAME_DEFAULT, 'manufacturers_id=' . $manufacturers['manufacturers_id'] . '&category_id=' . $manufacturers['categories_id'], 'NONSSL', false) . '" style="text-decoration: none;">'; echo $manufacturers['categories_name'] . ' ('.$manufacturers['prodcount'].')'; echo "</a> "; } ?> <!-- all manufacturers end //--> Any suggestions would be appreciated
  11. mugitty

    All Manufacturers Categories 1.0

    Carine; Thank you, that did the trick! I thought it might be as simple as that, but wasn't sure if the initial query might need to be modified as well. BTW - Don't you dare quit offering contributions... Your name is among the top 10 that I look for when I'm looking to see if there is new and helpful information and/or contributions available :thumbsup:
  12. mugitty

    All Manufacturers Categories 1.0

    Well, I uploaded the original catalog/all_manufacturers_categories.php as it originally came out of the contribution download - just in case I messed something up with my amendments - and I get the same thing... When you click on a category under a manufacturer's name, you get the entire catalog for that manufacturer, not just the category that was clicked on. The path that is shown in the link from the all categories page is similar to: The path that is shown once you are looking at the product listing for that manufacturer and use the on page filter to filter for the same category looks like: ...so apparently category_id in and of itself does not return a filtered listing for a category whereas filter_id seems to. Anybody know how to rewrite this code to select the filtered list? (code is above in previous post)
  13. mugitty

    All Manufacturers Categories 1.0

    Solved the line break problem but still no joy with the alignment I've run into something else, though... Has anybody who is using this found that, while the categories display correctly under each manufacturer, if you click the link to one of the categories, it doesn't filter for that category - it brings up a result page that contains all of the products from that manufacturer. I am appending the code for the query and result display if anyone can tell me how to correct it so the filter is applied <!-- all manufacturers begin //--> <?php $row = -1; $manufacturers_query = tep_db_query("SELECT DISTINCT count(p2c.products_id) as prodcount, cd.categories_id, cd.categories_name, m.manufacturers_id, manufacturers_name, manufacturers_image FROM " . TABLE_PRODUCTS . " p, " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd, " . TABLE_MANUFACTURERS ." m, " . TABLE_PRODUCTS_TO_CATEGORIES ." p2c WHERE p.manufacturers_id = m.manufacturers_id AND p.products_id = p2c.products_id AND p.products_status = 1 AND p2c.categories_id = c.categories_id and c.categories_id = cd.categories_id and cd.language_id = " . (int)$languages_id . " GROUP BY m.manufacturers_name, cd.categories_name"); $last_manid = ''; while ($manufacturers = tep_db_fetch_array($manufacturers_query)) { if ($manufacturers['manufacturers_id'] <> $last_manid ) { $row++; if ($last_manid) { echo '<br><br>' . tep_draw_separator('pixel_silver.gif', '90%', '1') . '</td>'; if ((($row / 1) == floor($row / 1))) { ?> </tr> <tr> <?php } } $last_manid = $manufacturers['manufacturers_id']; echo ' <td align="center" valign="top" width="100%" class="main">'; echo '<a href="' . tep_href_link(FILENAME_DEFAULT, 'manufacturers_id=' . $manufacturers['manufacturers_id'] , 'NONSSL', false) . '">'; //If you'd like to have an image shown, remove the comment slashes from the next lines if ($manufacturers['manufacturers_image']) { echo tep_image(DIR_WS_IMAGES . $manufacturers['manufacturers_image'], $manufacturers['manufacturers_name'], '', '') . tep_draw_separator('pixel_trans.gif', '50', '1') . '<font size="+1"><b>'. $manufacturers['manufacturers_name'] . '</b></font><br><br>'; } else { echo '<font size="+1"><b>'. $manufacturers['manufacturers_name'] .'</b></font><br><br>'; } echo "</a>"; } echo '<a href="' . tep_href_link(FILENAME_DEFAULT, 'manufacturers_id=' . $manufacturers['manufacturers_id'] . '&category_id=' . $manufacturers['categories_id'], 'NONSSL', false) . '" style="text-decoration: none;">'; echo '<nobr>' . $manufacturers['categories_name'] . '</nobr> ('.$manufacturers['prodcount'].')'; echo '</a> '; } ?> <!-- all manufacturers end //-->
  14. mugitty

    stupid design question

    "Zone Rates" is in catalog\includes\languages\english\modules\shipping\zones.php as define('MODULE_SHIPPING_ZONES_TEXT_TITLE', 'Zone Rates'); MODULE_SHIPPING_CANADAPOST_TEXT_TITLE (1 x 0.22kgs) MODULE_SHIPPING_CANADAPOST_TEXT_TITLE are probably in the language file for a Canada Post shipping contribution which you have added - although it looks like you may not have added the language file for that contribution because what is showing there is the call to the text that should appear rather than the text itself. Check back through the Canada Post contribution to see if there is a file that did not get uploaded into the languages area.
  15. Post #32 in This Thread
  16. mugitty

    Free Shipping per Product

    Just in case anyone else needs to do this... I didn't get it done by using the zone but did manage to get it by excluding the states (Alaska/Hawaii) if ($order->delivery['country_id'] != STORE_COUNTRY && FREE_SHIPPING_TO_ALL_COUNTRIES == "false") { $free_shipping = false; } elseif ($order->delivery['country_id'] == STORE_COUNTRY && $order->delivery['state'] == "Hawaii"){ $free_shipping = false; } elseif ($order->delivery['country_id'] == STORE_COUNTRY && $order->delivery['state'] == "Alaska"){ $free_shipping = false; }
  17. Any insight from someone who is familiar proper calls to objects would be much appreciated... This problem has just started appearing recently in the xmldocument.php file that is part of the UPSXML shipping contribution. I know that it's appearing because an object doesn't appear to be registered, but it happens randomly and I'm not sure what to do to correct it (or why it is random, rather than consistent if the code is poorly written). The error is: I'm posting the entire file below, but breaking it into 3 segments. The segment with the offending line (57) is in the middle and the line reads <?php /* $Id: xmldocument.php,v 1.5 2003/06/27 01:03:03 torinwalker Exp $ Written by Torin Walker torinwalker@rogers.com Generic XML Document support for when there is none. Copyright(c) 2003 by Torin Walker, All rights reserved. Released under the GNU General Public License */ define("ELEMENT", 0); define("TEXTELEMENT", 1); class XMLDocument { var $root; var $children; function XMLDocument() { } function createElement($name) { $node = new Node(); $node->setName($name); $node->setType(ELEMENT); return $node; } function createTextElement($text) { $node = new Node(); $node->setType(TEXTELEMENT); $node->setValue($text); return $node; } function getRoot() { return $this->root; } function setRoot($node) { $this->root = $node; } function toString() { if ($this->root) { return $this->root->toString(); } else { return "DOCUMENT ROOT NOT SET"; } } The problem section... function getValueByPath($path) { $pathArray = split("/", $path); if ($pathArray[0] == $this->root->getName()) { //print_r("Looking for " . $pathArray[0] . "<br>"); array_shift($pathArray); $newPath = implode("/", $pathArray); return $this->root->getValueByPath($newPath); } } ... and the balance of the file } class Node { var $name; var $type; var $text; var $parent; var $children; var $attributes; function Node() { $this->children = array(); $this->attributes = array(); } function getName() { return $this->name; } function setName($name) { $this->name = $name; } function setParent(&$node) { $this->parent =& $node; } function &getParent() { return $this->parent; } function &getChildren() { return $this->children; } function getType() { return $this->type; } function setType($type) { $this->type = $type; } function getElementByName($name) { for ($i = 0; $i < count($this->children); $i++) { if ($this->children[$i]->getType() == ELEMENT) { if ($this->children[$i]->getName() == $name) { return $this->children[$i]; } } } return null; } function getElementsByName($name) { $elements = array(); for ($i = 0; $i < count($this->children); $i++) { if ($this->children[$i]->getType() == ELEMENT) { if ($this->children[$i]->getName() == $name) { $elements[] = $this->children[$i]; } } } return $elements; } function getValueByPath($path) { $pathArray = split('/', $path); $node = $this; for ($i = 0; $i < count($pathArray); $i++) { //print_r("Looking for " . $pathArray[$i] ."<br>"); if ($node->getChildren()) { for ($j = 0; $j < count($node->getChildren()); $j++) { if ($node->children[$j]->getType() == ELEMENT) { if ($node->children[$j]->getName() == $pathArray[$i]) { //print_r("Found " . $pathArray[$i] ."<br>"); $node = $node->children[$j]; } } } } } return $node->getValue(); } function getText() { return $this->text(); } function setValue($text) { $this->text = $text; } function getValue() { $value = NULL; if ($this->getType() == ELEMENT) { for ($i = 0; $i < count($this->children); $i++) { $value .= $this->children[$i]->getValue(); } } elseif ($this->getType() == TEXTELEMENT) { $value .= $this->text; } return $value; } function setAttribute($name, $value) { $attributes[$name] = $value; } function getAttribute($name) { return $attributes[$name]; } function addNode(&$node) { $this->children[] =& $node; $node->parent =& $this; } function parentToString($node) { while($node->parent) { //print_r("Node " . $node->name . " has parent<br>"); $node = $node->parent; } //print_r("Node contents from root: " . $node->toString() . "<br>"); } function toString() { $string = NULL; //print_r("toString child count " . $this->name . " contains " . count($this->children) . "<br>"); if ($this->type == ELEMENT) { $string .= '{' . $this->name . '}'; for ($i = 0; $i < count($this->children); $i++) { $string .= $this->children[$i]->toString(); } $string .= '{/' . $this->name . '}'; } else { $string .= $this->getValue(); } return $string; } } class XMLParser { var $xp; var $document; var $current; var $error; // Constructor function XMLParser() { $this->document = new XMLDocument(); $this->error = array(); } function setDocument($document) { $this->document = $document; } function getDocument() { return $this->document; } // Destructor function destruct(){ xml_parser_free($this->xp); } // return 1 for an error, 0 for no error function hasErrors() { if (sizeof($this->error) > 0) { return 1; } else { return 0; } } // return array of error messages function getError() { return $this->error; } // process xml start tag function startElement($xp, $name, $attrs) { //print_r("Found Start Tag: " . $name . "<br>"); $node =& $this->document->createElement($name); if ($this->document->getRoot()) { $this->current->addNode($node); } else { $this->document->root =& $node; } $this->current =& $node; } // process xml end tag function endElement($xp, $name){ //print_r("Found End Tag: " . $name . "<br>"); if ($this->current->getParent()) { $this->current =& $this->current->getParent(); } } // process data between xml tags function dataHandler($xp, $text) { //print_r("Adding Data: \"" . $text . "\"<br>"); $node =& $this->document->createTextElement($text); $this->current->addNode($node); } // parse xml document from string function parse($xmlString) { if(!($this->xp = @xml_parser_create())) { $this->error['description'] = 'Could not create xml parser'; } if(!$this->hasErrors()) { if(!@xml_set_object($this->xp, $this)) { $this->error['description'] = 'Could not set xml parser for object'; } } if(!$this->hasErrors()) { if(!@xml_set_element_handler($this->xp, 'startElement', 'endElement')) { $this->error['description'] = 'Could not set xml element handler'; } } if(!$this->hasErrors()) { if(!@xml_set_character_data_handler($this->xp, 'dataHandler')) { $this->error['description'] = 'Could not set xml character handler'; } } xml_parser_set_option($this->xp, XML_OPTION_CASE_FOLDING, false); if (!$this->hasErrors()) { if(!@xml_parse($this->xp, $xmlString)) { $this->error['description'] = xml_error_string(xml_get_error_code($this->xp)); $this->error['line'] = xml_get_current_line_number($this->xp); } } } } ?>
  18. I have amended the Catalog Listing contribution http://www.oscommerce.com/community/contributions,2795 to show model number and special pricing, along with the product name and regular price. It returns just fine in my browser with one small problem... ONLY the items that have a special price are included. Can anyone describe to me how I would amend the query so that it returns all items, wheter or not they have a special price? The current query is: <?php $qry = "select distinct c.categories_name, pd.products_name, pd.products_description, p.products_model, p.products_price, s.specials_new_products_price, p.products_image, m.manufacturers_name" . " from " . TABLE_PRODUCTS . " p, " . TABLE_SPECIALS . " s, " . TABLE_CATEGORIES_DESCRIPTION . " c, " . TABLE_PRODUCTS_TO_CATEGORIES . " pc, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m" . " where p.products_id = pd.products_id and p.manufacturers_id = m.manufacturers_id and p.products_id = pc.products_id and p.products_id = s.products_id and pc.categories_id = c.categories_id AND c.language_id = '" . (int)$languages_id . "' and pd.language_id = '" . (int)$languages_id . "'" . " order by trim(c.categories_name), m.manufacturers_name, trim(p.products_model) asc"; $records = tep_db_query($qry); $num_records = tep_db_num_rows($records); ?>
  19. mugitty

    Catalog Listing Contrib 2795

    ...perhaps I'm looking at the wrong part of the file to accomplish what I'm after. Is there a way to get all products included in the output - whether or not they have a "Special" price by amending some of the code in the html output section? The current output area looks like this: <? $i = 0; $table = mysql_fetch_array($records); while ($table) { $category1 = $table['categories_name']; $manufacturer1 = $table['manufacturers_name']; ?> <h2 class="report" align="left"> <? echo $category1 . ": " . $manufacturer1; ?> </h2> <table class="report"> <tr> <th width=150 align="center" class="report">Model</th> <th width=500 align="left" class="report">Product</th> <th width=80 align="center" class="report">Price</th> <th width=80 align="center" class="report">Special</th> </tr> <? do { $category = $table['categories_name']; $manufacturer = $table['manufacturers_name']; $model = $table['products_model']; $product = $table['products_name']; $price = $table['products_price']; $special = $table['specials_new_products_price']; $description = $table['products_description']; if ($category != $category1 || $manufacturer != $manufacturer1) { ?> </table> <? break; } if (!($i%2)) {$color = "BGCOLOR = #FFFF99";} else { $color = "BGCOLOR = #FFFFFF";} ?> <tr> <td class="report"> <? echo $model;?> <td class="report"> <? echo $product;?> </td> <td class="price"> <? echo number_format ($price,2,'.',',');?> </td> <td class="price"> <? echo number_format ($special,2,'.',',');?> </td> </tr> <? $i++; } while ($table = mysql_fetch_array($records)); } ?> Thanks for any pointers!
  20. mugitty

    UPS, USPS Puerto rico

    Definite problem... USPS considers Puerto Rico a state in the US and UPS considers it a separate country. I had been meaning to see if I could figure out a work around, but its still on the "To Do" list. Hopefully someone will chime in who has already solved the problem.
  21. I have installed the Attributes Sorter & Copier (v5.1) on my osC2.2 (12/15/02) and am getting an error when trying to copy attributes from one product to another. Hopefully, someone who is a lot more familiar with database queries than I can see where my problem is occurring. The error I get when trying to copy attributes from one product to another is: In categories.php, the only areas of the file where TABLE_PRODUCTS_ATTRIBUTES appears are this segment from the contribution: ///////////////////////////////////////////////////////////////////// // BOF: WebMakers.com Added: Update Product Attributes and Sort Order // Update the changes to the attributes if any changes were made // Update Product Attributes $rows = 0; $options_query = tep_db_query("select products_options_id, products_options_name from " . TABLE_PRODUCTS_OPTIONS . " where language_id = '" . $languages_id . "' order by products_options_name"); while ($options = tep_db_fetch_array($options_query)) { $values_query = tep_db_query("select pov.products_options_values_id, pov.products_options_values_name from " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov, " . TABLE_PRODUCTS_OPTIONS_VALUES_TO_PRODUCTS_OPTIONS . " p2p where pov.products_options_values_id = p2p.products_options_values_id and p2p.products_options_id = '" . $options['products_options_id'] . "' and pov.language_id = '" . $languages_id . "'"); while ($values = tep_db_fetch_array($values_query)) { $rows ++; // ORIG $attributes_query = tep_db_query("select products_attributes_id, options_values_price, price_prefix from " . TABLE_PRODUCTS_ATTRIBUTES . " where products_id = '" . $products_id . "' and options_id = '" . $options['products_options_id'] . "' and options_values_id = '" . $values['products_options_values_id'] . "'"); $attributes_query = tep_db_query("select products_attributes_id, options_values_price, price_prefix, products_options_sort_order, product_attributes_one_time, products_attributes_weight, products_attributes_weight_prefix, products_attributes_units, products_attributes_units_price from " . TABLE_PRODUCTS_ATTRIBUTES . " where products_id = '" . $products_id . "' and options_id = '" . $options['products_options_id'] . "' and options_values_id = '" . $values['products_options_values_id'] . "'"); if (tep_db_num_rows($attributes_query) > 0) { $attributes = tep_db_fetch_array($attributes_query); if ($HTTP_POST_VARS['option'][$rows]) { if ( ($HTTP_POST_VARS['prefix'][$rows] <> $attributes['price_prefix']) || ($HTTP_POST_VARS['price'][$rows] <> $attributes['options_values_price']) || ($HTTP_POST_VARS['products_options_sort_order'][$rows] <> $attributes['products_options_sort_order']) || ($HTTP_POST_VARS['product_attributes_one_time'][$rows] <> $attributes['product_attributes_one_time']) || ($HTTP_POST_VARS['products_attributes_weight'][$rows] <> $attributes['products_attributes_weight']) || ($HTTP_POST_VARS['products_attributes_weight_prefix'][$rows] <> $attributes['products_attributes_weight_prefix']) || ($HTTP_POST_VARS['products_attributes_units'][$rows] <> $attributes['products_attributes_units']) || ($HTTP_POST_VARS['products_attributes_units_price'][$rows] <> $attributes['products_attributes_units_price']) ) { tep_db_query("update " . TABLE_PRODUCTS_ATTRIBUTES . " set options_values_price = '" . $HTTP_POST_VARS['price'][$rows] . "', price_prefix = '" . $HTTP_POST_VARS['prefix'][$rows] . "', products_options_sort_order = '" . $HTTP_POST_VARS['products_options_sort_order'][$rows] . "', product_attributes_one_time = '" . $HTTP_POST_VARS['product_attributes_one_time'][$rows] . "', products_attributes_weight = '" . $HTTP_POST_VARS['products_attributes_weight'][$rows] . "', products_attributes_weight_prefix = '" . $HTTP_POST_VARS['products_attributes_weight_prefix'][$rows] . "', products_attributes_units = '" . $HTTP_POST_VARS['products_attributes_units'][$rows] . "', products_attributes_units_price = '" . $HTTP_POST_VARS['products_attributes_units_price'][$rows] . "' where products_attributes_id = '" . $attributes['products_attributes_id'] . "'"); } } else { tep_db_query("delete from " . TABLE_PRODUCTS_ATTRIBUTES . " where products_attributes_id = '" . $attributes['products_attributes_id'] . "'"); } } elseif ($HTTP_POST_VARS['option'][$rows]) { tep_db_query("insert into " . TABLE_PRODUCTS_ATTRIBUTES . " values ('', '" . $products_id . "', '" . $options['products_options_id'] . "', '" . $values['products_options_values_id'] . "', '" . $HTTP_POST_VARS['price'][$rows] . "', '" . $HTTP_POST_VARS['prefix'][$rows] . "', '" . $HTTP_POST_VARS['products_options_sort_order'][$rows] . "', '" . $HTTP_POST_VARS['product_attributes_one_time'][$rows] . "', '" . $HTTP_POST_VARS['products_attributes_weight'][$rows] . "', '" . $HTTP_POST_VARS['products_attributes_weight_prefix'][$rows] . "', '" . $HTTP_POST_VARS['products_attributes_units'][$rows] . "', '" . $HTTP_POST_VARS['products_attributes_units_price'][$rows] . "')"); } } } // EOF: WebMakers.com Added: Update Product Attributes and Sort Order ///////////////////////////////////////////////////////////////////// and this one line later in the file: $attributes_query = tep_db_query("select products_attributes_id, options_values_price, price_prefix, products_options_sort_order, product_attributes_one_time, products_attributes_weight, products_attributes_weight_prefix, products_attributes_units, products_attributes_units_price from " . TABLE_PRODUCTS_ATTRIBUTES . " where products_id = '" . $pInfo->products_id . "' and options_id = '" . $options['products_options_id'] . "' and options_values_id = '" . $values['products_options_values_id'] . "'"); I do have 2 extra fields in the table that were added as a result of adding the P&G shipping contribution (attribute_weight, attribute_cost). Would I have to add these to all SELECT and INSERT queries even if they are not being used for the purposes of this particular file in order to get rid of this error?
  22. mugitty

    Cattegory listing on main page

    http://www.oscommerce.com/community/contributions,2125
  23. mugitty

    Weight format for USPS

    Just to clarify... While USPS requires pounds and ounces, your entries in the stock osC should be made in whole units (pounds) and the decimal equivalent for parts of a whole unit - not ounces. The USPS module takes care of converting the information into pounds and ounces For example, in the reference above: I assume that the products mentioned are supposed to be 10 ounces each? They should be entered as 0.625 when entering their weight into the new product page. If entered as 0.10, the total for two properly appears as 0.20 which the USPS module will translate into 3.2 ounces (4 ounces rounded) which is obviously still under 1 pound and still a valid First Class weight.
  24. mugitty

    Package/Ship Items Seperately?

    txcrew; If the UPSXML module is set up properly WITH packaging support included, you should have a checkbox in your Admin where you add products that says something like "Ready to ship". This being checked for an item SHOULD result in a separate package being created for that item. You probably also need to be sure that the dimensions are indicated for each item and that you have at least one package defined in the packaging module. If all of your items have this checkbox checked and someone orders 3 different items, you should see 3 packages in the UPSXML rate quotes. If someone orders 2 of the same item and you have set it up as "Ready to ship", you should see 2 packages in the rate quotes.
  25. mugitty

    On-Screen Dynamic Price Update??

    I believe what you want is Options - Price Update It's pretty plain out of the package but, with a little bit of playing around, you can put it where you want on your product page and format the display in any way you desire.
×