

crrrum
Members-
Content count
61 -
Joined
-
Last visited
Profile Information
-
Real Name
Roy Rim
- Website
-
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
-
New UPS XML Shipping Module available
crrrum replied to torinwalker's topic in General Add-Ons Support
Ah, duh! Not sure how I missed that. -
New UPS XML Shipping Module available
crrrum replied to torinwalker's topic in General Add-Ons Support
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? -
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
-
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
-
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:
-
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.
-
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
-
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";
-
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";
-
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
-
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";
-
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
-
No sql modifications and no admin modifications. It pretty much takes advantage of what is there already.
-
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