Jump to content

Juto

Members
  • Content count

    365
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by Juto

  1. BINGO! Errors gone... wow, what an expert you are! :) I think I will keep your query with inner join... I feel more comfortable with it. If you were near by, I would serve you an excellent dinner.. :) Many thanks and Kind Regards Sara
  2. Hi Phil, thanks for your help. It's most welcome, as always. I have changed the query, tested left join, inner join and just join with no luck. I have a better view of the bug now: // $select_zones_query = tep_db_query("SELECT c.countries_id, c.countries_iso_code_2, z.zone_name FROM countries c, zones z WHERE c.countries_id = z.zone_country_id ORDER BY z.zone_country_id, z.zone_name"); $select_zones_query = tep_db_query("SELECT c.countries_id, c.countries_iso_code_2, z.zone_name FROM countries c INNER JOIN zones z ON (c.countries_id = z.zone_country_id) ORDER BY z.zone_country_id, z.zone_name"); while ($zone_option = tep_db_fetch_array($select_zones_query)) { $country_with_zone_code = $zone_option['countries_iso_code_2']; echo ' echo 1: '.$country_with_zone_code; // if this is the first time that we've seen this country, if ( !is_array($zones_array[$country_with_zone_code]) ) { //Here's the Undefined index: AT echo ' echo 2: '.$country_with_zone_code;// echo's AT, then echo 1 starts over and echoe's /* The echo's gives: echo 1: AT echo 2: AT echo 1: AT echo 1: AT echo 1: AT echo 1: AT echo 1: AT echo 1: AT echo 1: AT echo 1: AT echo 1: CA echo 2: CA echo 1: CA echo 1: CA echo 1: CA echo 1: CA echo 1: CA and so on... default country Remark: Is there a difference when the index is a string, and not an integer? */ // initialize an array for it with a blank default value $zones_array[$country_with_zone_code] = array(array('id' => '', 'text' => PLEASE_SELECT_A_STATE)); // save the country code to id mapping for use with the javascript later $country_id_for[$country_with_zone_code] = $zone_option['countries_id']; } $zones_array[$country_with_zone_code][] = array('id' => $zone_option['zone_name'], 'text' => $zone_option['zone_name']); } As you can see the $country_with_zone_code contains just one string, as you said. And yes, $zones_array does contain id and text, that is the drop downs are populated. The country drop down starts with the store country as default, with its zones. This was part of the install instructions. Also, I have checked the installation and it's ok. The addon is here: http://addons.oscommerce.com/info/6975 I am puzzled to say the least. Kindest regards Sara
  3. Juto

    multiple language newsletter

    Hi Strub, what was the title of the contrib? Did you zip it? Sara
  4. Juto

    multiple language newsletter

    Hi Strub, now that would be a huge step forward. Please make a contribution of it. Also, do the customer have the possibility to change the prefered language in "My account"? Regards Sara
  5. Finaly a bugfree site!

  6. Hi, and thanks for a nice contribution. I would like to have the possibility to set the status for all displayed products, like you set the discount. And to be able to set that status for each individual product, just like you can do with the discount. Any suggestions/help is much appreciated. Sara
  7. A suggestion: in admin/categories.php it would be nice to have a drop down from the shipping table rate. Thereby a shipping cost per individual product would be possible. This shipping cost should then be displayed in catalog/product_info page. And, when a customer add the product to the cart, the shipping cost should be there and be added to the order value. If the customers buy more products the shipping costs should sum up. Hopefully this is could be done. Sara
  8. The official fix is here: http://www.oscommerce.info/confluence/display/OSCOM23/v2.2+to+v2.3.0
  9. Juto

    Please HELP with Easy Specials !

    Hi! I have found yet another bug: foreach($fields as $k => $v) { $set_fields[] = "$k = '$v'"; // PHP Fatal error: [] operator not supported for strings $set_fields = implode(', ', $set_fields); tep_db_query("UPDATE " . TABLE_SPECIALS . " SET $set_fields WHERE products_id = '$product_id'"); } Is there a fix, please? Sara
  10. Juto

    Please HELP with Easy Specials !

    Hi Eguenio! Thanks for this contribution. I have been testing it and fixed some coding errors. Still, there are bugs to fix: When the prices are set back to discount: the prices shown are the normal prices with a strike through and the normal price in red. Since there are no discount, the prices should be shown the normal way. Since my site is not live yet, I would be happy to pm you my "corrected" code. Please notify me by mail Sara
  11. Juto

    ULTIMATE Seo Urls 5 - by FWR Media

    Hi, there's a big problem with usu5's tep_href_link: Normal css rules like .class a:link are not working properly colors are lost. When uisng usu5 "as is" r205, the links colors for the most part is not what I've specified -which is blue. Verified by: Replacing tep_href_link in html_output with either the standard tep_href_link or the one in usu5's usu_general_functions gives the right color. Is there a fix for this? Sara
  12. Just added admin mail with header and signature

  13. The above if statement must be like this: if (tep_not_null($products_id)) {qtpro_doctor_amputate_all_from_product($product_id);} Sara
  14. Wish I could tame osC! :)

    1. Biancoblu

      Biancoblu

      lol, same here! :-)

  15. There are som addons that use this (in admin/categories) $products_image_name = ($dir ? $dir . '\/' : '') . $products_image->filename; Later on stripslashes($products_image_name) thus removing the backslash. The stripslashes() function removes backslashes which may have been added by the addslashes() function. Thus: stripslashes($products_image_name) is the same as not having the backslash to begin with. There's only one place where stripslashes isn't used, namely at $action == 'new_product_preview' line ~829 That code block have an additional condition: if (tep_not_null($_POST)) { } and within that condition $products_image_name = $pInfo->products_image; Is not used. It seems to me that having a backslash in $products_image_name is not needed at all. Test and pay attention to line 1016 (core code) where stripslashes($products_image_name) originaly is in use On my dev site I have removed the backslash and removed the use of stripslashes (all instances), plus added the missing line $products_image = $_POST['products_image']; for the action 'new_product_preview' line ~829 The test shows that the backslash IS a bug, plus that the stripslashes of $products_image_name is NOT needed. See it at http://www.u2commerce.com Click on category "Test". Sara
  16. Hi Robert, hope you are all well. I have installed your contribution on the admin side as well, and have: MySQL connection: uf8_general_ci and MySQL character set: UTF-8 Unicode (utf8) But when I retrieve configuration data, they are still in ASCII. So I took a dive into admin/configuration and found a call to your function tep_db_query in the database.php In the call I found this line: $result = mysql_query($query, $$link) or tep_db_error($query, mysql_errno(), mysql_error()); My connection to the db is done like so: if ((function_exists('mysql_set_charset')) && (mysql_fetch_object(mysql_query('SELECT VERSION()')) >= "5.0.7" )) { //This requires MySQL 5.0.7 or later and php 5.2.3 or later mysql_set_charset('utf8',$$link); } else { //mysql_query("SET CHARACTER SET utf8",$$link); mysql_query("SET NAMES 'utf8'",$$link); } Now the configuration.php is using the function tep_db_query to update the configuration data, so this line should be changed, or? $result = mysql_query($query, $$link) or tep_db_error($query, mysql_errno(), mysql_error()); If so, into what? I have tried to fix this for ages, no succes. Thanks a lot for your "must have" contribtions, couldn't do without them! Regards Sara
  17. Juto

    Better ISO Email

    Hi Gergely, thank you for your respons and the file. I will test it tonight (I have to take the shop offline). This is a very interesting article on utf-8: Character Sets / Character Encoding Issues Also I strongly beleive that the e-mail system in osC needs a rework, for all versions. After extensive search I have found the attached system for mimemessage & mimeparser, please have a look at it. I am very sure that it will solve all e-mail problems for all osC versions. :) mimemessage-2011-03-08.zip mimeparser-2011-05-05.zip Please let me know what you think. Also I have tried this for sending extra order e-mail: ///Check config value for extra order email to: $check_query = tep_db_query("SELECT configuration_value FROM " . TABLE_CONFIGURATION . " WHERE configuration_key = 'SEND_EXTRA_ORDER_EMAILS_TO'"); $check = tep_db_fetch_array($check_query); $extra_order_email_enabled = $check['configuration_value']; if ($extra_order_email_enabled != '') { tep_mail('', $extra_order_email_enabled, EMAIL_TEXT_SUBJECT, $email_order, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS); } And that just gave the same error, the to: field is corrupt. :( I will let you know later today if your email file worked. Sara
  18. Juto

    Better ISO Email

    Hi Gergely, I must say that this is a very nice piece of work! I think you should do the same for v2.x.x ... :) As it is today, mail do not work properly for utf-8, more specifically (one of the symptoms): Order confirmation to the customers is all ok. While send extra order email is not, yet in catalog/checkout process the difference seems null: tep_mail($order->customer['firstname'] . ' ' . $order->customer['lastname'], $order->customer['email_address'], EMAIL_TEXT_SUBJECT, $email_order, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS); // send emails to other people if (SEND_EXTRA_ORDER_EMAILS_TO != '') { tep_mail('', SEND_EXTRA_ORDER_EMAILS_TO, EMAIL_TEXT_SUBJECT, $email_order, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS); } The to: field is ok in the customers mail The to: field in the extra order email is: =?utf-8?B??= instead of the email address! One difference is that the constant "SEND_EXTRA_ORDER_EMAILS_TO" is a configuration value which is pulled from the db in application top, whilst the customers email address is pulled from the db the "normal way". For my site, the db is in utf-8, all files are in utf-8 too. And the includes/classes/email.php have these conversions: $subject = '=?utf-8?B?' . base64_encode($subject) . '?='; $to_name = '=?utf-8?B?' . base64_encode($to_name) . '?='; $from_name = '=?utf-8?B?' . base64_encode($from_name) . '?='; //Before: $to = (($to_name != '') ? '"' . $to_name . '" <' . $to_addr . '>' : $to_addr); $from = (($from_name != '') ? '"' . $from_name . '" <' . $from_addr . '>' : $from_addr); I have tried to find the error for dyas now, still no success. So, why not write the contribution for v2.x.x as well? Sara
  19. Juto

    Nothing works with Swedish lang-pack

    Godmorning Mikael, Glad you could fix it. I converted the entire site to utf-8 the correct way. Meaning no dual support of character encoding. Dual support is bound to cause problems. Also I do not use Dreamweaver, which is known to cause problems. As an option to Replace Pioneer may I suggest pspad, its free and far better. When I get time I will write an addon on how to convert to utf-8, from any encoding. At the moment I'm to busy with a SEO issue with v2.3.x. That will also become a contribution. Sara
  20. Hi Robert, I have upgrade my RC2a site to include "(AC) (NEW) Introduce Template Layout and Modular Header Tags" If I choose to include like so: include_once DIR_WS_MODULES . 'kiss_meta_tags/kiss_meta_tags.php'; require(DIR_WS_INCLUDES . 'template_top.php'); Then I will get two title tags since template_top have: <title><?php echo tep_output_string_protected($oscTemplate->getTitle()); ?></title> So, I am thinking of having a conditional statement for the title tag. Also, the upgrade's osc_template.php differs from the v2.3.1 (sorry for posting this chunk): <?php /* $Id$ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2010 osCommerce Released under the GNU General Public License */ class oscTemplate { var $_title; var $_header_tags = array(); function oscTemplate() { $this->_title = TITLE; } function setTitle($title) { $this->_title = $title; } function getTitle() { return $this->_title; } function addHeaderTag($tag) { $this->_header_tags[] = $tag; } function getHeaderTags() { if (!empty($this->_header_tags)) { return implode("\n", $this->_header_tags); } } function buildHeaderTags() { global $language; if ( defined('MODULE_HEADER_TAGS_INSTALLED') && tep_not_null(MODULE_HEADER_TAGS_INSTALLED) ) { $htm_array = explode(';', MODULE_HEADER_TAGS_INSTALLED); foreach ( $htm_array as $htm ) { $class = substr($htm, 0, strrpos($htm, '.')); if ( !class_exists($class) ) { include(DIR_WS_LANGUAGES . $language . '/modules/header_tags/' . $htm); include(DIR_WS_MODULES . 'header_tags/' . $class . '.php'); } $ht = new $class(); if ( $ht->isEnabled() ) { $ht->execute(); } } } } //Begin: This is from V2.3.1 Under test only <---------------------Please Note it's commented /* function addBlock($block, $group) { $this->_blocks[$group][] = $block; } function hasBlocks($group) { return (isset($this->_blocks[$group]) && !empty($this->_blocks[$group])); } function getBlocks($group) { if ($this->hasBlocks($group)) { return implode("\n", $this->_blocks[$group]); } } function buildBlocks() { global $language; if ( defined('TEMPLATE_BLOCK_GROUPS') && tep_not_null(TEMPLATE_BLOCK_GROUPS) ) { $tbgroups_array = explode(';', TEMPLATE_BLOCK_GROUPS); foreach ($tbgroups_array as $group) { $module_key = 'MODULE_' . strtoupper($group) . '_INSTALLED'; if ( defined($module_key) && tep_not_null(constant($module_key)) ) { $modules_array = explode(';', constant($module_key)); foreach ( $modules_array as $module ) { $class = substr($module, 0, strrpos($module, '.')); if ( !class_exists($class) ) { include(DIR_WS_LANGUAGES . $language . '/modules/' . $group . '/' . $module); include(DIR_WS_MODULES . $group . '/' . $class . '.php'); } $mb = new $class(); if ( $mb->isEnabled() ) { $mb->execute(); } } } } } } //End: This is from V2.3.1 Under test only */ } ?> The osc_template for header tags have these options, via admin: ht_category_title ht_manufacturer_title ht_product_title ht_google_analytics ht_opensearch If I choose to use KissMT as given above: include_once DIR_WS_MODULES . 'kiss_meta_tags/kiss_meta_tags.php'; Will that compromise the osc_template options? If so, how do I make them coexist? I know that I could disallow these options, but I'd rather have an exclusive condition, that is if KissMT is set to be used via admin, then the then the title tag should come from KissMT and any other osc_template offending header tag options should be auto set to false. Possible, yes, but I am no coder... Would be nice with your advice :) Sara
  21. Juto

    Nothing works with Swedish lang-pack

    Hej Mikael, Have you checked that the language pack is in utf-8 encoding? Sara My Super Dev Site
  22. This contribution gives you the choice of having a button for more info in product_listing.php etc. Tested for RC2a and its upgrade to v2.3 Usage can be configured via your admin – configuration/product listing Find it at: http://addons.oscommerce.com/info/8010 Enjoy! Sara
  23. Juto

    ULTIMATE Seo Urls 5 - by FWR Media

    Hi again Robert ... :) This I would like to have a fix for: Error Type: [E_NOTICE] Undefined offset: 3 On line 84, 86 & 87 File includes/modules/ultimate_seo_urls5/uri_modules/osc_experimental.php Since I am near to a "perfect site" ... Many, many thanks to you! Sara
  24. Juto

    ULTIMATE Seo Urls 5 - by FWR Media

    :) I am the one that doesn't work :) I had forgotten to change the encoding to utf-8 for the character conversions. Silly me as usual! Sara
  25. Juto

    ULTIMATE Seo Urls 5 - by FWR Media

    Hi Robert. I have tried for ages now to get USU5 to work with UTF-8, but no success. So, how do I do it? Many thanks Sara
×