Jump to content

crrrum

Members
  • Content count

    61
  • Joined

  • Last visited

Everything posted by crrrum

  1. Hey hi, I added my small contribution for several random products. If you need any help or have any suggestions (especially scriptaculous suggestions) let me know. Roy http://www.janescloset.com
  2. crrrum

    AJAX Attribute Manager support

    I'm monkeying with this at the moment. You need to replace all the sprint_f with sprintf in the attributeManagerPrompts.inc.php. Unless of course the author created his own sprint_f function that I'm unaware of... crrrum
  3. crrrum

    New UPS XML Shipping Module available

    Ah, duh! Not sure how I missed that.
  4. crrrum

    New UPS XML Shipping Module available

    Hi guys, Thanks for a very awesome module. But I have a small problem, I can't seem to "disallow" any of the shipping types. The configuration_value field contains only the word 'Array'. I manually update this with a comma separated values of the types I do not want, but I'm worried that I messed up something installing the module. I haven't done php in a while, so am I missing something here? What should I be looking for?
  5. Hey guys, Currently I'm using Coupons by Ingo slightly modified. I would like to modify it to not affect the price of my products that are already discounted. I'm guessing I'm going to need to sub-totals, one for discounted prices and another for regular prices. And then total them at the very end. Any suggestions or warnings before I start mucking about? Also I do my coupon module right before the "Total" module. So my order is: Sub-total Shipping Tax Coupon Total Does this sound right? Does anyone do this differently? Roy
  6. crrrum

    Several Random Products

    The install file tells you that you can change "Selection of Products on Special". But if you want, you can modify the sql line: $random_products_query = tep_db_query("select p.products_id, pd.products_name, p.products_price, p.products_tax_class_id, p.products_image, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, p.products_date_added, m.manufacturers_name from " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m on p.manufacturers_id = m.manufacturers_id left join " . TABLE_PRODUCTS_DESCRIPTION . " pd on p.products_id = pd.products_id and pd.language_id = '" . $languages_id . "' left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id where p.products_status = '1' order by rand() limit " . MAX_RANDOM_SELECT_SPECIALS); if you lop off everything after rand() so that it looks like rand()" );, that will select everything. The problem is how big is your catalog? That will generate a LOT of javascript text. Roy
  7. crrrum

    Several Random Products

    I noticed that the code was wonky on my site and realized that I would need to do the image/text switch in a different way. I could only test this via remote desktop, so I don't know if the transitions are smooth. I know this method works well on my site, but my site is totally different than the vanilla oscommerce I have setup at work for testing. I will be releasing this on monday as a new version on the contributions area. Please replace everything between this two lines: $random_products_script .= 'function loadRandomProduct() {' . "\n"; AND $random_products_script .= '}' . "\n"; WIth the following: $random_products_script .= "Element.hide('randomProductDiv');\n"; $random_products_script .= "var randomProductDiv = document.getElementById('randomProductDiv');\n"; $random_products_script .= 'var href = randomProductArray[randomProductIndex][0];' . "\n"; $random_products_script .= 'var src = randomProductArray[randomProductIndex][1];' . "\n"; $random_products_script .= 'var w = randomProductArray[randomProductIndex][2];' . "\n"; $random_products_script .= 'var h = randomProductArray[randomProductIndex][3];' . "\n"; $random_products_script .= 'var name = randomProductArray[randomProductIndex][4];' . "\n"; $random_products_script .= 'var price = randomProductArray[randomProductIndex][5];' . "\n"; $random_products_script .= 'var sprice = randomProductArray[randomProductIndex][6];' . "\n"; $random_products_script .= 'var loaded = randomProductArray[randomProductIndex][7];' . "\n"; $random_products_script .= "var text = '';\n"; $random_products_script .= "text += '<a href=\"' + href + '\">';\n"; $random_products_script .= "text += '<img src=\"' + src + '\" width=\"' + w + '\" height=\"' + h + '\" border=\"0\" alt=\"' + name + '\" title=\"' + name + '\"';\n"; $random_products_script .= "text += ' onload=\"randomProductArray[' + randomProductIndex + '][7]=true;showRandomProduct()\"';\n"; $random_products_script .= "text += '>';\n"; $random_products_script .= "text += '</a><br>';\n"; $random_products_script .= 'if ( sprice.length > 0 ) text += sprice;' . "\n"; $random_products_script .= 'else text += price;' . "\n"; $random_products_script .= "randomProductDiv.innerHTML = text;\n"; $random_products_script .= 'randomProductIndex++;' . "\n"; $random_products_script .= 'if ( randomProductIndex >= randomProductArray.length ) randomProductIndex = 0;' . "\n"; :blush:
  8. crrrum

    Several Random Products

    Modify: $random_products_script .= 'if ( sprice.length > 0 ) span.innerHTML = sprice;' . "\n"; $random_products_script .= 'else span.innerHTML = price;' . "\n"; to: $random_products_script .= "if ( sprice.length > 0 ) span.innerHTML = name + ' ' + sprice;\n"; $random_products_script .= "else span.innerHTML = name + ' ' + price;\n"; That would put the name in front of the price. You can add a <br> or any other html text to format it the way you would like.
  9. crrrum

    Several Random Products

    abra, actually I have 'On the Fly' Auto Thumbnailer using GD Library on my site and I take advantage of it. I'm not sure how the imagemagic contrib works so perhaps it will help you if I show you how I do it. For OTF, the image src looks like: product_thumb.php?img=images/picture.gif&w=5&h=5 So my javascript looks like: img.src = 'product_thumb.php?img=images/' + src + '&w=' + w + '&h=' + h; Roy
  10. crrrum

    Several Random Products

    Hi abra, Modify: $random_products_script .= 'if ( sprice.length > 0 ) span.innerHTML = sprice;' . "\n"; $random_products_script .= 'else span.innerHTML = price;' . "\n"; to: $random_products_script .= "if ( sprice.length > 0 ) span.innerHTML = name + ' ' + sprice;\n"; $random_products_script .= "else span.innerHTML = name + ' ' + price;\n";
  11. crrrum

    Several Random Products

    argh, teach me for typing too fast! Again, it should be: $random_products_script .= "img.src = 'product_thumb.php?img=images/' + src + '&w=' + w + '&h=' + h\n";
  12. crrrum

    Several Random Products

    I've tested it with firefox and ie on windows. The scriptaculous scripts should work with everything, but I'm not so sure about my code :) But my stuff is a very simple so I can't see it being a problem. Roy
  13. crrrum

    Several Random Products

    Sorry, that line should be: $random_products_script .= "img.src = 'product_thumb.php?img=images/' + src + '&w=' + w + '&h=' + h + '\" width=\"' + w + '\" height=\"' + h;\n";
  14. crrrum

    Several Random Products

    Hi, Yeah, if you want to use the automatic thumbnail contribution, you can change this line: $random_products_script .= 'img.src = src;' . "\n"; to: $random_products_script .= 'img.src = 'product_thumb.php?img=images/' + src + '&w=' + w + '&h=' + h + '" width="' + w + '" height="' + h;' . "\n"; Roy
  15. crrrum

    Several Random Products

    No sql modifications and no admin modifications. It pretty much takes advantage of what is there already.
  16. crrrum

    New UPS XML Shipping Module available

    Thanks JanZ for helping this newb. Great module!
  17. crrrum

    New UPS XML Shipping Module available

    I think I need to understand taxes and zones some more. The store is going to be New York based, so I assumed I needed a tax for any resident of new york. So I added a tax zone of New York and then added United States/New York to that via the admin interface. So now only customers with an address of New York get the UPS display, but I want everyone to get the UPS options and only add tax to New York state. Perhaps I need to do RTFM some more? Roy
  18. crrrum

    New UPS XML Shipping Module available

    OK, I got it now... it has to do with the ZONE check. ------------------------------ if (($this->enabled == true) && ((int)MODULE_SHIPPING_UPSXML_RATES_ZONE > 0)) { $check_flag = false; $check_query = tep_db_query("select zone_id from " . TABLE_ZONES_TO_GEO_ZONES . " where geo_zone_id = '" . MODULE_SHIPPING_UPSXML_RATES_ZONE . "' and zone_country_id = '" . $order->delivery['country']['id'] . "' order by zone_id"); while ($check = tep_db_fetch_array($check_query)) { if ($check['zone_id'] < 1) { $check_flag = true; break; } elseif ($check['zone_id'] == $order->delivery['zone_id']) { $check_flag = true; break; } } if ($check_flag == false) { $this->enabled = false; } } ---------------------------- Is there something I haven't setup correctly? Where would the zones_to_geo_zones table get filled? Roy
  19. crrrum

    New UPS XML Shipping Module available

    Yes. I was hoping someone could give me advice on how to debug this. What would be the steps that you would take to find out where things are going wrong. So right now, I know that despite having the "Enable UPS Shipping" set to true, oscommerce still does not think this module is "enabled". So where would you look to see where this is set? Is it in the configuration table? Anyway, I'll keep looking. Roy
  20. crrrum

    New UPS XML Shipping Module available

    When I uncomment that line, it gets rid of the ssl error on my local machine, but then the behavior becomes identical to the store I have on the hosting site. No ups data appears when I go to checkout_shipping.php I'm pretty sure CURL is working locally, because I got curl errors when I didn't have curl turned on locally. I believe curl is setup on the hosting site as well. I think I have a clue as to why the ups xml is not appearing. I added some logging to the classes/shipping.php file: -------------------- reset($this->modules); while (list(, $value) = each($this->modules)) { $class = substr($value, 0, strrpos($value, '.')); error_log( $class . " " . $value . "\n", 3, 'upsxml.log' ); if (tep_not_null($module)) { if ( ($module == $class) && ($GLOBALS[$class]->enabled) ) { $include_quotes[] = $class; } } elseif ($GLOBALS[$class]->enabled) { error_log( "enabled: " . $class . "\n", 3, 'upsxml.log' ); $include_quotes[] = $class; } else { error_log( "not enabled: " . $class . "\n", 3, 'upsxml.log' ); } } ------------------- when I goto the checkout, I'm seeing this in the upsxml.log: upsxml upsxml.php not enabled: upsxml so... I am guessing that there is something I missed setting this up? but if so, why would errors appear if I don't include the access key? I apologize if any of these questions are obvious, its just that I haven't done PHP for quite some time and the structure of oscommerce is a little confusing to me. Roy
  21. crrrum

    New UPS XML Shipping Module available

    Okay, if I leave out the access key, it errors out. So the module is being called... however when I put the access key back in, I don't see anything appear on the shipping page dealing with UPS. And no errors get generated. Any suggestions on figuring this out? Roy
  22. crrrum

    New UPS XML Shipping Module available

    I did that, although I don't see how that helps. Thanks anyway. I just don't think the module is actually being used even though its been installed via admin. Is there some way for me to verify this? Nothing gets logged and the upsxml stuff doesn't appear in the shipping page. Roy
  23. crrrum

    New UPS XML Shipping Module available

    Hi guys, I've installed the module locally, and it errors out because I don't have SSL setup on my local machine. I uploaded it to test it on my hosted site and even though it installs fine via the admin interface, nothing appears when I try to checkout an order. I also don't get anything in the debug log. What's the best way to troubleshoot this? I added an error_log at the top of the quote method in the upsxml.php file and it never appears. This tells me that the method is not being called. Can someone explain the typical process to troubleshoot a module? Thank you! Roy
×