Jump to content

abra123cadabra

Members
  • Content count

    837
  • Joined

  • Last visited

Everything posted by abra123cadabra

  1. abra123cadabra

    NEW! Complete Order Editing Tool!

    First of all, thank you very much for this highly sophisticated order editing tool. I installed version 5.0.6 today. Now I'm checking that it works as it should but it does something with the sort order of the order total modules which I don't like. I had a look at the edit_orders_ajax.php but honestly, I don't want to mess it up so I better ask how I can change the sort order. The original orders have the following order: ot_subtotal 1 ot_shipping 3 ot_total 25 ot_netto 30 ot_tax 35 I want to display ot_netto and ot_tax at the end as ot_subtotal, ot_shipping and ot_total are all including tax. After making changes to the order with order editor, the new sort order is as follows: ot_subtotal 1 ot_tax 2 ot_shipping 3 ot_total 4 ot_netto 5 The calculation seems to be correct at first glance but how do I move the ot_tax to be listed after ot_netto? Thanks in advance. abra
  2. Ok, this was the long workaround... I finally figured out why it didn't recognise the value set for $spider_flag... In /catalog/includes/functions/leapfrog.php (line 34) add $spider_flag to the list of globals so that it looks like this: function lf_update_tracking() { global $customer_id, $languages_id, $HTTP_GET_VARS, $HTTP_SERVER_VARS, $spider_flag; Like this you don't need to find and replace any other text as mentioned in my previous post. And the setting to not display bots at all should work now too. They will not be added to the database as they are filtered out first. abra
  3. For the situation when you want to show all guests and bots, here is a fix to the problem that even bots were shown as guests. In /catalog/includes/functions/leapfrog.php (lines 51 to 84) find: } else { // No they don't $wo_customer_id = ''; // Is the visitor a bot? If so, show it's name. // The $spider_flag variable is set in application_top.php. if ($spider_flag == true) { // It's a bot. Extract the bots name $wo_full_name = '[bot] '; $user_agent = getenv('HTTP_USER_AGENT'); if (tep_not_null($user_agent)) { // Bot string is of form - "Mozilla/5.0 (compatible; Yahoo! Slurp; [url="http://help.yahoo.com/help/us/ysearch/slurp%29%22"]http://help.yahoo.com/help/us/ysearch/slurp)"[/url] $needle = '(compatible;'; $bot_name_start_pos = strpos($user_agent, $needle); $bot_name = substr($user_agent, $bot_name_start_pos+strlen($needle)); $bot_name_end_pos = strpos($bot_name, ';'); $bot_name = substr($bot_name, 0, $bot_name_end_pos); $wo_full_name .= tep_db_input(tep_db_prepare_input($bot_name)); } else { $wo_full_name .= 'Unknown spider'; } } else { // This is just a regular guest. $wo_full_name = 'Guest'; } } and replace with: } else { // No they don't $wo_customer_id = ''; // Is the visitor a bot? If so, show it's name. // Check user agent string against spiders.txt. $user_agent = strtolower(getenv('HTTP_USER_AGENT')); $spider = false; if (tep_not_null($user_agent)) { $spiders = file(DIR_WS_INCLUDES . 'spiders.txt'); for ($i=0, $n=sizeof($spiders); $i<$n; $i++) { if (tep_not_null($spiders[$i])) { if (is_integer(strpos($user_agent, trim($spiders[$i])))) { $spider = true; break; } } } } if ($spider){ // It's a bot. Extract the bots name $wo_full_name = '[bot] '; // Bot string is of form - "Mozilla/5.0 (compatible; Yahoo! Slurp; [url="http://help.yahoo.com/help/us/ysearch/slurp%29%22"]http://help.yahoo.com/help/us/ysearch/slurp)"[/url] $needle = '(compatible;'; $bot_name_start_pos = strpos($user_agent, $needle); $bot_name = substr($user_agent, $bot_name_start_pos+strlen($needle)); $bot_name_end_pos = strpos($bot_name, ';'); $bot_name = substr($bot_name, 0, $bot_name_end_pos); if ($bot_name == '') { // Bot string is of form - "msnbot/1.0 ( [url="http://search.msn.com/msnbot.htm%29%22"]http://search.msn.com/msnbot.htm)"[/url] $bot_name_end_pos = strpos($user_agent, '('); $bot_name = substr($user_agent, 0, $bot_name_end_pos); } else { // Bot string is of different form if ($bot_name == ''){ $bot_name = $user_agent; } } $wo_full_name .= tep_db_input(tep_db_prepare_input($bot_name)); } else { // This is just a regular guest. $wo_full_name = 'Guest'; } $wo_full_name .= ' - #'; // just a cosmetic change } abra
  4. I've got the same issue with bots being displayed as guests. It seems that $spider_flag is always false when accessed in /catalog/includes/functions/leapfrog.php. I tried to add another variable to application_top and set it to true or false depending on the value of $spider_flag. Then I used this in leapfrog but it still doesn't work. So my guess is that for some reason $spider_flag cannot be used to check if it's a bot or not. Strangely enough the original purpose of assigning a session id or not is working fine. Maybe $spider_flag is reset later? abra
  5. abra123cadabra

    SEO Assistant

    Based on v_1.8A i replaced the following code in /catalog/admin/includes/functions/seo_assistant.php (lines 11 - 115): define('GMAG', 0xE6359A60); function xor32($a, $B) { return int32($a) ^ int32($B); } //return least significant 32 bits //works by telling unserialize to create an integer even though we provide a double value function int32($x) { return unserialize("i:$x;"); } function mix($a,$b,$c) { $a -= $b; $a -= $c; $a = xor32($a,zeroFill($c,13)); $b -= $c; $b -= $a; $b = xor32($b,$a<<8); $c -= $a; $c -= $b; $c = xor32($c,zeroFill($b,13)); $a -= $b; $a -= $c; $a = xor32($a,zeroFill($c,12)); $b -= $c; $b -= $a; $b = xor32($b,$a<<16); $c -= $a; $c -= $b; $c = xor32($c,zeroFill($b,5)); $a -= $b; $a -= $c; $a = xor32($a,zeroFill($c,3)); $b -= $c; $b -= $a; $b = xor32($b,$a<<10); $c -= $a; $c -= $b; $c = xor32($c,zeroFill($b,15)); return array($a,$b,$c); } //unsigned shift right function zeroFill($a, $B) { $z = hexdec(80000000); if ($z & $a) { $a = ($a>>1); $a &= (~$z); $a |= 0x40000000; $a = ($a>>($b-1)); } else { $a = ($a>>$B); } return $a; } function GCH($url, $length=null, $init=GMAG) { if(is_null($length)) { $length = sizeof($url); } $a = $b = 0x9E3779B9; $c = $init; $k = 0; $len = $length; while($len >= 12) { $a += ($url[$k+0] +($url[$k+1]<<8) +($url[$k+2]<<16) +($url[$k+3]<<24)); $b += ($url[$k+4] +($url[$k+5]<<8) +($url[$k+6]<<16) +($url[$k+7]<<24)); $c += ($url[$k+8] +($url[$k+9]<<8) +($url[$k+10]<<16)+($url[$k+11]<<24)); $mix = mix($a,$b,$c); $a = $mix[0]; $b = $mix[1]; $c = $mix[2]; $k += 12; $len -= 12; } $c += $length; switch($len) /* all the case statements fall through */ { case 11: $c+=($url[$k+10]<<24); case 10: $c+=($url[$k+9]<<16); case 9 : $c+=($url[$k+8]<<8); /* the first byte of c is reserved for the length */ case 8 : $b+=($url[$k+7]<<24); case 7 : $b+=($url[$k+6]<<16); case 6 : $b+=($url[$k+5]<<8); case 5 : $b+=($url[$k+4]); case 4 : $a+=($url[$k+3]<<24); case 3 : $a+=($url[$k+2]<<16); case 2 : $a+=($url[$k+1]<<8); case 1 : $a+=($url[$k+0]); /* case 0: nothing left to add */ } $mix = mix($a,$b,$c); /*-------------------------------------------- report the result */ return $mix[2]; } //converts a string into an array of integers containing the numeric value of the char function strord($string) { for($i=0;$i<strlen($string);$i++) { $result[$i] = ord($string{$i}); } return $result; } function CheckSum($_url) { $chksum = "6" . GCH(strord('info:'.$_url)); return $chksum; } function getPR($_url) { $url = 'info:'.$_url; // $ch = "6" . GCH(strord($url)); $ch = CheckSum($_url); $url='info:'.urlencode($_url); $pr = file("http://www.google.com/search?client=navclient-auto&ch=$ch&ie=UTF-8&oe=UTF-8&features=Rank&q=$url"); $pr_str = implode("", $pr); return substr($pr_str,strrpos($pr_str, ":")+1); } with this: //PageRank Lookup v1.1 by HM2K (update: 31/01/07) //based on an alogorithm found here: [url="http://pagerank.gamesaga.net/"]http://pagerank.gamesaga.net/[/url] //settings - host and user agent $googlehost='toolbarqueries.google.com'; $googleua='Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.6) Gecko/20060728 Firefox/1.5'; //convert a string to a 32-bit integer function StrToNum($Str, $Check, $Magic) { $Int32Unit = 4294967296; // 2^32 $length = strlen($Str); for ($i = 0; $i < $length; $i++) { $Check *= $Magic; //If the float is beyond the boundaries of integer (usually +/- 2.15e+9 = 2^31), // the result of converting to integer is undefined // refer to [url="http://www.php.net/manual/en/language.types.integer.php"]http://www.php.net/manual/en/language.types.integer.php[/url] if ($Check >= $Int32Unit) { $Check = ($Check - $Int32Unit * (int) ($Check / $Int32Unit)); //if the check less than -2^31 $Check = ($Check < -2147483648) ? ($Check + $Int32Unit) : $Check; } $Check += ord($Str{$i}); } return $Check; } //genearate a hash for a url function HashURL($String) { $Check1 = StrToNum($String, 0x1505, 0x21); $Check2 = StrToNum($String, 0, 0x1003F); $Check1 >>= 2; $Check1 = (($Check1 >> 4) & 0x3FFFFC0 ) | ($Check1 & 0x3F); $Check1 = (($Check1 >> 4) & 0x3FFC00 ) | ($Check1 & 0x3FF); $Check1 = (($Check1 >> 4) & 0x3C000 ) | ($Check1 & 0x3FFF); $T1 = (((($Check1 & 0x3C0) << 4) | ($Check1 & 0x3C)) <<2 ) | ($Check2 & 0xF0F ); $T2 = (((($Check1 & 0xFFFFC000) << 4) | ($Check1 & 0x3C00)) << 0xA) | ($Check2 & 0xF0F0000 ); return ($T1 | $T2); } //genearate a checksum for the hash string function CheckHash($Hashnum) { $CheckByte = 0; $Flag = 0; $HashStr = sprintf('%u', $Hashnum) ; $length = strlen($HashStr); for ($i = $length - 1; $i >= 0; $i --) { $Re = $HashStr{$i}; if (1 === ($Flag % 2)) { $Re += $Re; $Re = (int)($Re / 10) + ($Re % 10); } $CheckByte += $Re; $Flag ++; } $CheckByte %= 10; if (0 !== $CheckByte) { $CheckByte = 10 - $CheckByte; if (1 === ($Flag % 2) ) { if (1 === ($CheckByte % 2)) { $CheckByte += 9; } $CheckByte >>= 1; } } return '7'.$CheckByte.$HashStr; } //return the pagerank checksum hash function getch($url) { return CheckHash(HashURL($url)); } //return the pagerank figure function getpPR($url) { global $googlehost,$googleua; $ch = getch($url); $fp = fsockopen($googlehost, 80, $errno, $errstr, 30); if ($fp) { $out = "GET /search?client=navclient-auto&ch=$ch&features=Rank&q=info:$url HTTP/1.1\r\n"; //echo "<pre>$out</pre>\n"; //debug only $out .= "User-Agent: $googleua\r\n"; $out .= "Host: $googlehost\r\n"; $out .= "Connection: Close\r\n\r\n"; fwrite($fp, $out); //$pagerank = substr(fgets($fp, 128), 4); //debug only //echo $pagerank; //debug only while (!feof($fp)) { $data = fgets($fp, 128); //echo $data; $pos = strpos($data, "Rank_"); if($pos === false){} else{ $pr=substr($data, $pos + 9); $pr=trim($pr); $pr=str_replace("\n",'',$pr); return $pr; } } //else { echo "$errstr ($errno)<br />\n"; } //debug only fclose($fp); } } // end new code for PR This works fine in my shop. The only thing I didn't fix is the output of checksum in /catalog/admin/seo_assistant.php as modified in v_1.8A. abra
  6. abra123cadabra

    SEO Assistant

    No, that didn't work either. I found some other code and pasted that in. Now it works fine for me. abra
  7. abra123cadabra

    SEO Assistant

    I've updated my SEO assistant version and everything is working as it should apart from the googlerank function. As a lot of people seem to have problems with this, getting the 403 error from google, I thought I just let you know what I found out about this. The problem is not with the webhost as such. It has nothing to do with allow_url_fopen and no workaround with curl is needed. The error comes from google as a result of a wrong parameter (ch). There are quite a few algorithms out there to calculate the checksum from any given url but it seems that the result depends on how the server in combination with the php version installed handles different data types. I couldn't find a working algorithm for my hosts system but I found a working checksum for my shop so I just hardcoded that in. As a result I cannot get any other page ranks. I hope that helps to clear up the confusion why the pagerank works on some systems while it doesn't work on others. abra
  8. In catalog/includes/functions/leapfrog.php, replace lines 96 to 102 with the code above to show page number etc. abra
  9. Well, I thought that too. Some things are much easier to do than one might think! These modifications usually add just a little text to the right of page title where the title is pretty short anyway. So no space problem there. Only with the search keywords, that can get out of hand. People are typing in funny things... I like the idea of having more info on a visitor opening in a separate box. abra
  10. Thanks for clarifying the page count. I guessed that already. As soon as the visitor logs in, the session changes but he keeps that session if he logs out again. Ah well, don't mind. As my shop is not too busy right now and I'm a very curious observer, I added just a few more info to the page title. This is to get info if the visitor is clicking through a product listing as generated on a lot of pages (index.php for products in a category or for a manufacturer, advanced search results, what's new listing etc.). I also wanted to see which keywords they used when using the search function. I'm using other contribs too like allproducts listing (allprods.php). Here is the code that I added to /catalog/includes/functions/leapfrog.php. Just find the first lines of the snippet and add the if statements following. If you have other pages in your shop where variables are passed via the URL, you can easily extend the mod to show even more info. } else { // Just use the page title $page_desc = tep_db_input(HEADING_TITLE); $page_thumb = ""; } // The following modifications allow for more tracking info to be displayed // Add keywords if advanced search is used if(isset($HTTP_GET_VARS['keywords']) && $HTTP_GET_VARS['keywords'] != ''){ $page_desc = $page_desc . ' (' . stripslashes($HTTP_GET_VARS['keywords']) . ')'; } // Add character selected if allproducts contrib is used if(isset($HTTP_GET_VARS['fl']) && $HTTP_GET_VARS['fl'] != ''){ $page_desc = $page_desc . ' (' . stripslashes($HTTP_GET_VARS['fl']) . ')'; } // Add page number viewed when clicking through a listing if(isset($HTTP_GET_VARS['page']) && $HTTP_GET_VARS['page'] != ''){ $page_desc = $page_desc . ' (page ' . stripslashes($HTTP_GET_VARS['page']) . ')'; } Come to think about this, there is no need to add the landing page in the leapfrog any more as my ads pass a variable in the URL too. I'll just add this in for my own entertainment. abra
  11. I didn't dig into the code to see how exactly it is determined that the click belongs to a certain visitor. There is a number before the page title (obviously that's the number of pages loaded for this visitor) but the click number is lower. When does the click number increase? Same goes for the time left of the clicks number. A feature I would like to see is an addition to "Guest". If they were logged in before but are logged out, show the customer name in brackets like this: Guest (Customer Name). Another feature you already mentioned is some stats like: visitor has added something to cart (yes/no) and maybe the cart value. How about adding the landing url in addition to the referal url. Hits from my ads carry some variables in the url that allow me to see which ad they clicked on. It would be nice to see like this if the visitor was referred by organic or paid search results. I know, most of these features are part of the supertracker contribution which I'm using but I really like the dynamic element about leapfrog. abra
  12. The language: The page titles are in the respective language for pages like shipping.php etc. But my products have the same title (German product name) with a translation in the product description as my customers are more likely to look for the German name than for any kind of translation ("Käsekuchenhilfe" instead of "cheese cake help"). So for these pages I definitely need the page language. About opening a new page... this is what I'm doing right now. I just have to remember not to use the left column to navigate to other parts when on the leapfrog page. It'll do for now. You are right, I liked the dark page. The manufacturer code. Looks like I put that in myself. o:) My shop is heavily modified with the standard categories/manufacturers boxes replaced by dropdown lists (avsearch contrib). The results of the selection are displayed using the index.php (as usual). I just wanted to know if someone is looking at a manufacturers product listing as the standard title would be "Let's see what we have here". Maybe you would like to add that to the next version? In catalog/includes/functions/leapfrog.php replace this: } elseif ($HTTP_GET_VARS['cPath']) { // Visitor is browsing categories $cPath = $HTTP_GET_VARS['cPath']; $cPath_array = tep_parse_category_path($cPath); $cPath = implode('_', $cPath_array); $current_category_id = $cPath_array[(sizeof($cPath_array)-1)]; $page_desc_query = tep_db_query("select cd.categories_name, c.categories_image from " . TABLE_CATEGORIES_DESCRIPTION . " cd, " . TABLE_CATEGORIES . " c " . " where cd.categories_id = '" . $current_category_id . "' and cd.language_id = '" . $languages_id . "' and cd.categories_id = c.categories_id"); $page_desc_values = tep_db_fetch_array($page_desc_query); $page_desc = $page_desc_values['categories_name']; $page_thumb = $page_desc_values['categories_image']; } else { with this: } elseif ($HTTP_GET_VARS['cPath']) { // Visitor is browsing categories $cPath = $HTTP_GET_VARS['cPath']; $cPath_array = tep_parse_category_path($cPath); $cPath = implode('_', $cPath_array); $current_category_id = $cPath_array[(sizeof($cPath_array)-1)]; $page_desc_query = tep_db_query("select cd.categories_name, c.categories_image from " . TABLE_CATEGORIES_DESCRIPTION . " cd, " . TABLE_CATEGORIES . " c " . " where cd.categories_id = '" . $current_category_id . "' and cd.language_id = '" . $languages_id . "' and cd.categories_id = c.categories_id"); $page_desc_values = tep_db_fetch_array($page_desc_query); $page_desc = $page_desc_values['categories_name']; $page_thumb = $page_desc_values['categories_image']; } elseif ($HTTP_GET_VARS['manufacturers_id']){ // Visitor is looking at a particular manufacturer page $page_desc_query = tep_db_query("select manufacturers_name, manufacturers_image from " . TABLE_MANUFACTURERS . " where manufacturers_id = '" . $HTTP_GET_VARS['manufacturers_id'] . "'"); $page_desc_values = tep_db_fetch_array($page_desc_query); $page_desc = $page_desc_values['manufacturers_name']; $page_thumb = $page_desc_values['manufacturers_image']; } else { abra
  13. Just updated to the new version. It has now some of the features that I manually added to the first version like visitors country and info on the visitors (spider, guest or logged in customer). I also like to know the selected language of a page. As I stated earlier in this thread I just added a new field to the database table to record the language id and changed the function to add this little info to the page title string. To be honest, I liked leapfrog opening a new page better. Like this if I do something in my admin panel and go back to leapfrog it starts registering visitors clicks from scratch instead of continuing the last "session". Also there is a bit of code missing now. The first version had the manufacturers title included. Just added that back in. Thanks again for a great contribution! abra
  14. Here are the changes I made to /catalog/admin/includes/functions/leapfrog.php to work with Ultimate SEO urls: Find // Get the product image if on product item page $pattern = "/products_id=[0-9]+/"; preg_match($pattern, $row['page_url'], $matches); $productPage = $matches[0]; $productId = substr($productPage, strpos($productPage, "=")+1); if ($productId == "") { $thumbUrl = ""; } else { $itemQuery = "select products_image from products where products_id=" . $productId; $itemResult = mysql_query($itemQuery); $item = mysql_fetch_object($itemResult); $thumbUrl = DIR_WS_CATALOG . DIR_WS_IMAGES . "/" . $item->products_image; } and replace with // Get the product image if on product item page $pattern = "/p-[0-9]+/"; preg_match($pattern, $row['page_url'], $matches); $productPage = $matches[0]; $productId = substr($productPage, strpos($productPage, "p-")+2); $productId = str_replace (".html", '', $productId); if ($productId == "") { $thumbUrl = ""; } else { $itemQuery = tep_db_query("select products_image from " . TABLE_PRODUCTS . " where products_id='" . $productId . "'"); $item = tep_db_fetch_array($itemQuery); $thumbUrl = DIR_WS_CATALOG . DIR_WS_IMAGES . "/" . $item['products_image']; } abra
  15. I'm working on the image issue if Ultimate SEO urls are installed. To display the page language I just added a field to the database table and stored the $language_id. Then it's just a matter of adding it to the page title. abra
  16. Replacing leapfrog.swf with Leapfrog.swf in /catalog/admin/includes/leapfrog/leapfrog.html does the trick. Love this contribution. Although it doesn't display the product images when you use Ultimate SEO urls. Started to modify some of the code so that I can see which language the page is. I would also like to see the country they are from and if it is a spider or not. But I guess I'll figure this out soon. Thanks for this great contribution! abra
  17. abra123cadabra

    News Blog V1.0

    Thanks for your reply. Then it makes sense with the tep_db_prepare_input2(). I took some time to check how to add those other features like multi-language and admin status change for news and comments which are very important for me as I run a dual language shop. From what I've seen and tried so far it makes sense to create three tables: news, news_description and news_replies. I've also renamed and added some more fields. Not sure if this is the way to go, it's just an attempt to have the contrib a bit more osC conform regarding naming conventions etc. Once it's working to my satisfaction, I might post the package in the contrib section. Anyway, I appreciate your work so far as it gave me some basis to work from instead of inventing the whole thing myself. abra
  18. abra123cadabra

    News Blog V1.0

    Looks like something I might try out. I had a look at the code and install instructions and I couldn't figure out why you need to use function tep_db_prepare_input2($string) { if (is_string($string)) { return trim(stripslashes($string)); } elseif (is_array($string)) { reset($string); while (list($key, $value) = each($string)) { $string[$key] = tep_db_prepare_input($value); } return $string; } else { return $string; } } It is only called once when a reply is about to be added to the DB and only on $content. It looks pretty similar to the already used tep_db_prepare_input() apart from and additional trim(). In addition to this I would add a few modifications like status (active, inactive) for news and replies. The replies should be set to inactive when posted and admin should receive a notification that a new reply has been added. He then can check in his admin to change the reply status. And of course there should be a modification like visusal verify code to prevent automated replies but I guess that's something depending on the vvc contrib you are using to protect other pages like contact_us. The multi-language support is certainly another thing to add. abra
  19. abra123cadabra

    Article Manager v1.0

    Check if you installed /catalog/includes/functions/clean_html_comments.php from the contribution package. Looks like the file might be missing on your server. abra
  20. abra123cadabra

    Article Manager v1.0

    It might just be that no author was selected for the articles. You create and save an articles without assigning an author, but you cannot display them on the catalog side without. Happened to me. abra
  21. abra123cadabra

    [Contribution] Task Manager (Admin)

    Nice contribution. Of course I also ignored the fact that you need the admin accounts with access levels so started to install only the needed tables etc. First thought is, I would also like to be able to add comments to a task. Looks good so far. abra
  22. abra123cadabra

    Master Products - MS2

    Fixed it. It was the little bit about $HTTP_POST_VARS["id_$prodId"] that caused the problem. If I don't tell what $prodId is, then it doesn't know which session variable to check. abra
  23. abra123cadabra

    Wishlist 3.0 Support Thread

    Some things take a bit of time to install. I had the "solution" when I was in bed last night (but resisted the urge to get up and restart the computer immediately). The fix is very easy. In application_top.php I replaced the original Wishlist code with this: //Wishlist actions (must be before shopping cart actions) if(isset($HTTP_POST_VARS['wishlist_x'])) { if(isset($HTTP_POST_VARS['products_id'])) { $prodId = $HTTP_POST_VARS['products_id']; if(isset($HTTP_POST_VARS["id_$prodId"])) { $attributes_id = $HTTP_POST_VARS["id_$prodId"]; tep_session_register('attributes_id'); } $wishlist_id = $HTTP_POST_VARS['products_id']; tep_session_register('wishlist_id'); } tep_redirect(tep_href_link(FILENAME_WISHLIST)); } And now it works a treat. it might even be down to the JustOneAttribute contribution and not the Master Products. Can't remember if I fixed the Master Products add_slave in application_top.php or the JustOneAttribute code in product_info.php. Anyway, it's working now and I learned a bit more about this tep_session_register thing. abra
  24. abra123cadabra

    Wishlist 3.0 Support Thread

    Hi @ll, I'm trying to get Wishlist 3.5d to work together with Master Products but I'm stuck. The attributes are not stored (not in the session or when logged in, in the customers_wishlist_attributes table). I think it has to do with how Master Products stores the value for attributes. Is there anyone here who got these two contribs to work together, including the attributes bit? For further info on the code which I think is involved, please read my post in the MP contrib support: http://forums.oscommerce.com/index.php?sho...id=925301 Any help is much appreciated. abra
  25. abra123cadabra

    Master Products - MS2

    Hi @ll, I have searched and experimented all day but I'm currently lost for ideas. Maybe one of you can give me a hint. I'm not 100 % sure if the problem really lies within the Master Products contribution but this is my last shot. I'm using Master Products for quite a while now and it's working fine. After that I added a replacement contrib for attributes dropdown on product_info.php when only one attribute exists. Also working fine. Then I installed the Ultimate SEO urls which needed a bit of mending but also working fine. Up until now when adding any product to cart, they appear with their attribute. Now I tried to install the Wishlist 3.5d contribution which is working fine too as it at least adds the product to the Wishlist and from there to the cart, when selected. I can also go back to the product via the Wishlist product link. What is missing is the attribute (I only have one per product which is "hidden" in product_info.php) when adding from product_info.php to Wishlist. After some searching I found a similar problem with QT Pro contribution. I think it has to do with MP and QT Pro handle attributes in application_top.php. So my first question is: Has anyone here managed to get MP and Wishlist 3 to work together in regards to attributes? The code for Wishlist in application top checks this: //Wishlist actions (must be before shopping cart actions) if(isset($HTTP_POST_VARS['wishlist_x'])) { if(isset($HTTP_POST_VARS['products_id'])) { if(isset($HTTP_POST_VARS['id'])) { $attributes_id = $HTTP_POST_VARS['id']; tep_session_register('attributes_id'); } $wishlist_id = $HTTP_POST_VARS['products_id']; tep_session_register('wishlist_id'); } tep_redirect(tep_href_link(FILENAME_WISHLIST)); } $HTTP_POST_VARS['products_id'] seems to have some value, otherwise I would think no whishlist with products would be created in the first place (that's the bit that is working fine). So I guess the next bit is not working as $HTTP_POST_VARS['id'] doesn't seem to hold the attributes value. Instead I think this is stored in $HTTP_POST_VARS["id_$prodId"]. So here comes the next question: How should the value in $HTTP_POST_VARS['id'] and $HTTP_POST_VARS["id_$prodId"] look like? How can I convert $HTTP_POST_VARS["id_$prodId"] into what Wishlist expects in above snippet? Once I get this to work, I would also like to use the Wishlist button(s) with my Article Manager 1.4 xsell products. Any idea on this? Sorry for writing a novel. Any help is much appreciated. abra
×