Jump to content

Gaarheid

Members
  • Content count

    4
  • Joined

  • Last visited

  1. Gaarheid

    [Contribution] Pollbooth v2.0

    Hi All, Great contrib! Easy to install and administer. A few minor things however that I came across: 1. When adding poll options that have single quotes in the text, I get SQL parse errors. Prob. needs some code check there (or I am missing out on something or screwed up something in my code or db settings). 2. As mentioned already in this topic: when disabling the comment option, it is still available on the page (quoted out the "add comment" link in the code, and that works for now, but ofcourse not a nice sollution). For those of you who also came across this problem, here is how I did it: In poll_results.php at approx. line 120 find: <tr><td colspan="2" align="center" class="main">[ <a href="<?php echo tep_href_link('pollbooth.php','pollid='.$pollid.'&op=comment','NONSSL')?>"><? echo _ADD_COMMENTS?></a> | <a href="<?php echo tep_href_link('pollbooth.php','pollid='.$pollid.'&op=vote','NONSSL')?>"><? echo _VOTING?></a> | <a href="<? echo tep_href_link('pollbooth.php','op=list','NONSSL')?>"><?echo _OTHERPOLLS?></a> ]</td></tr> and replace with: <tr><td colspan="2" align="center" class="main">[ <!-- <a href="<?php echo tep_href_link('pollbooth.php','pollid='.$pollid.'&op=comment','NONSSL')?>"><? echo _ADD_COMMENTS?></a> | //--> <a href="<?php echo tep_href_link('pollbooth.php','pollid='.$pollid.'&op=vote','NONSSL')?>"><? echo _VOTING?></a> | <a href="<? echo tep_href_link('pollbooth.php','op=list','NONSSL')?>"><?echo _OTHERPOLLS?></a> ]</td></tr> Not very nice, but it works to keep annoying commenters away. 3. When polls run in different languages, the total is calculated correctly (e.g. dutch votes + english votes = total votes), but the percentage bars only show the totals per language. Tried to resolve this by eliminating the (language_id = '" . $languages_id . "') in the $results query from the poll_results.php file, but that mangled the output in a strange way (if votes for an option are cast in visitors language, totals for option are show for that language, if no votes for an option are cast in visitors language but are cast in another language, then the other language options' name is shown in that language, and so are the vote counts). I'd like to know if someone came across the same problems (especially no. 3) and has found some form of resolution for it. Thanks in advance for sharing! Regards
  2. @ englishchrissy, From what I see on your website, you seem to have created just the adjustments I was looking for in this contrib. I do however not have the coding skills to make all adjustments myself. Could you please post some form of code snippets for us here, shining some more light on how you got this to work in your CRE site? I've got an heavily modified OSCMax as the base of the site I'm working on (basically ripped out the entire STS to get more stock OSC contribs working). @ b00 (and englishchrissy, since you might have found this error as well): I think I might have found a (minor) bug. Please other users (e.g. englishchrissy), could you check if this also happens to you when the contrib is added? Since I use a heavily modified OSCMax catalog, it might just be related to another contrib / setting of mine: If your users surf to a products using the standard menu interface (e.g. category -> sub-category -> product-listing -> product), then the product is added nicely into you "recently visited". The link to the product works, and the "see more" gives a nice overview of all recently visited products. This is OK and how it should work. If however your users surf to a product via the shopping_cart.php file (by clicking on a product that has been added to their cart), they are not send to the product page, but to the product page + selected attributes as how the product was added into the shopping cart (if the product has options / attributes). This is then recorded as a "recently viewed" product. This then results in an SQL error when you then try to open the recently_viewed.php page via the "See more" button (an SQL error appears related to the "productID{optionID}optionValue{optionID}optionValue" (which makes sense, in a way). From what I can conclude, this is related to how the "recently_viewed.php" page queries the db for recently viewed products or how they are entered into the db from the "product_info" page. They do appear in the infobox, with a correct name and are "clickable" and the link brings you to the correct product page + options. I must add that I've got the SEO urls installed and set to cPath, which might be related I think (remember, I'm not a real coder, just CTRL+C, CTRL+V and WinMerging my way through most contribs :blush: ). Maybe somebody can defeat this bug, or tell me what I'm doing wrong here. Anyways, the idea behind this contrib is great and a lot of thanks to b00 for building it in the first place. But I think it could use some finetuning. If I find out something usefull, I will add it to this topic and hopefully help others. Any help is very much appreciated! Thanks in advance, and cheers
  3. I've found out myself on how to cover the first issue that I was asking about in my previous post: Figured out it's not that hard at all, but for those that want to use this option as well, here's what you need to do in order to get this working in the multiple dropdows display version: in /catalog/includes/classes/pad_multiple_dropdowns.php on lines 156-158 replace: $out.=" span.appendChild(document.createTextNode(\"".TEXT_OUT_OF_STOCK_MESSAGE."\"));\n"; $out.=" else\n"; $out.=" span.appendChild(document.createTextNode(\" \"));\n"; by: $out.=" span.appendChild(document.createTextNode(\"".TEXT_OUT_OF_STOCK_MESSAGE."\"));\n"; $out.=" else\n"; $out.=" span.appendChild(document.createTextNode(\"".TEXT_IN_STOCK_MESSAGE."\"));\n"; I guess this should also be possible for the other pad_ variants. Next, in your /catalog/includes/languages/english/product_info.php (and all other language versions of this file) add after: define('TEXT_OUT_OF_STOCK_MESSAGE', 'The combination of options you have selected is currently out of stock. Please select another combination.'); The following line: define('TEXT_IN_STOCK_MESSAGE', 'The combination of options you have selected is currently in stock.'); That should do the trick if I'm correct (please original contributors, correct me if I'm wrong). I'm still working on the other issue, where I'm trying to output per manufacturer (expected) delivery times in the TEXT_OUT_OF_STOCK_MESSAGE, but that's a bit more dificult :)
  4. Hi People, Thanks for this great contrib, all who contributed! I'm thinking of writing two extensions to this contrib, but could use some help (if available?). Here's the story: Had no problem installing this contrib on a stock OSC2.2rc1 install (for testing purposes), and played around with it a little bit. Next I dug into the code to figure out two things: -. The option to also display a message when an item+options+values is in stock (instead of only displaying a message saying that it is out of stock). My best guess is that I'd have to add a function in the pad_* classes similar to the "function _draw_out_of_stock_message_js" (but most likely a lot less code than that function). I do my best to figure out some PHP stuff (not realy a programmers background...) but this class writing is way above my head :huh: Can some-one give me some pointers? -. The other is to display an expected delivery time, based on a products' manufacturer (not-yet-existing)attribute, to be displayed in the TEXT_OUT_OF_STOCK_MESSAGE. I think this one might be easier, altough it would require a db update for the manufacturers table (as I figured it out now in theory that is). What I'm thinking of here, is to add a column that will hold the expected delivery time for that specific products' manufacturer, and call it from the TEXT_OUT_OF_STOCK_MESSAGE= in the /catalog/includes/languages/<language>/product_info.php file. I think I'll be able to manage this myself, but if anyone has already tried this and possibly came across some problems with this, I'd be interested to know ofcourse :rolleyes: Thanks again for this contribution, and hopefully some-one can help me with these two extensions!
×