Jump to content

MindTwist

Members
  • Content count

    81
  • Joined

  • Last visited

About MindTwist

  • Birthday 06/14/1974

Profile Information

  1. MindTwist

    Batch Print Center (support thread)

    Hope it helps, code is quite messed up... Just one more note, I know there are still things that do not work ok; I think that if you try printing by date, or something like that, it was not working. But I always print labels by numbers, and I have no problem at all, I could print something like 10,12,15,20-27,13,30-44 and all the labels will come out ok. //MINDTWIST - esta funcion imprime UNA pegatina desde el template de pegatinas. //No se que hace aqui, en lugar de estar en el propio template de las pegatinas :? function print_address($x, $y, $nums){ global $pdf, $num, $billing; $pos = $y; global $orders_query; global $order; global $orders; global $languages_id; global $HTTP_POST_VARS; //if ($orders = tep_db_fetch_array($orders_query)){ //$order = new order($orders['orders_id']); if ($order){ if ($billing == true) $addressparts = explode("\n", tep_address_format($order->billing['format_id'], $order->billing, 1, '', " \n")); else $addressparts = explode("\n", tep_address_format($order->delivery['format_id'], $order->delivery, 1, '', " \n")); $fontsize = GENERAL_FONT_SIZE + 1; $pdf->addText($x,$pos -=GENERAL_LINE_SPACING,$fontsize,'<b>Destino:</b>'); $aitor = 0; foreach($addressparts as $addresspart){ $fontsize = GENERAL_FONT_SIZE; while ($pdf->getTextWidth($fontsize, $addresspart) > 260){ $fontsize--; } //$addresspart = preg_replace("%,[[:space:]]*$%", "", $addresspart); //MINDTWIST BEGIN //hack guarro, añado IF para que no ponga el Pais en la pegatina del envio, sin tener que modificar nada del address_format del oscommerce if ($addresspart != 'Spain') { $pdf->addText($x+5,$pos -=GENERAL_LINE_SPACING,$fontsize,$addresspart); $aitor = $aitor +1; //print_r ($addresspart); } //MINDTWIST END } //MINDTWIST si la direccion tenia 3 lineas, añadimos una 4a en blanco para no descuadrar etiquetas if ($aitor == 3) { $pdf->addText($x,$pos -=GENERAL_LINE_SPACING,$fontsize,''); } //salto una linea mas ya que aqui no hay telefono $pdf->addText($x,$pos -=GENERAL_LINE_SPACING,$fontsize,''); //$pos -=GENERAL_LINE_SPACING; // //MINDTWIST //Aqui posava el FROM de las pegatas. //Ara ho he pasat a /templates/from.php , de forma q sempre omplo el full de FROMs encara q no siguin 120 pegatas. //Aqui ja nomes poso el NUMERO DE PEDIDO // $fontsize = GENERAL_FONT_SIZE-1; // $pdf->addText($x,$pos -=GENERAL_LINE_SPACING,$fontsize,'<b>Remite:</b>'); $fontsize = GENERAL_FONT_SIZE-4; $pdf->addText($x+60,$pos-15,$fontsize,$orders['orders_id']); // $fontsize = GENERAL_FONT_SIZE-2; // $pdf->addText($x+5,$pos -=13,$fontsize,'Twisted Reality (At. Aitor Fernandez)'); // $pdf->addText($x+5,$pos -=13,$fontsize,'c/ Rosellon 372, Local'); // $pdf->addText($x+5,$pos -=13,$fontsize,'Barcelona 08025'); //$pdf->addText($x + LABEL_WIDTH - ORDERIDXOFFSET,$y + ORDERIDYOFFSET,ORDERIDFONTSIZE,$orders['orders_id']); if(($nums % NUM_LABELS_PER_PAGE) == (NUM_LABELS_PER_PAGE-1)) { $order = false; return false; } else { if($orders = tep_db_fetch_array($orders_query)) { $order = new order($orders['orders_id']); return true; } else { $order = false; return false; } } } else { return false; } }
  2. MindTwist

    Batch Print Center (support thread)

    LED-Store, I am sorry, I did not have the time to do it one year ago, and I wouldn't even remember what I modified now. I do remember that BPC seemed VERY badly done when I had to take a look. It is a great contribution, but it would need a major rewrite, which I do not think it will happen any time soon (that is, until OSC3 is done, and a OSC3 version comes out). Looking at my own code now, I think I can only give 2 hints that might (or might not) help. On the labels template, I have this line at the beginning: //MINDTWIST puta missing label bug $pos = 0; And I have modified this IF (where it said $num, now it says $pos). The commented print_r is ther eonly for debuging purposes: for ($x = STARTX; $x < STARTX + NUM_COLUMNS * LABEL_WIDTH; $x += LABEL_WIDTH){ //print_r('startpos ' . $startpos . ' $pos ' . $pos . ' $num ' . $num . ' $endpos ' . $endpos . ' -- '); // if ($startpos <= $pos && $num < $endpos){ //MINDTWIST sindrome de la pegata desaparecida if ($startpos <= $pos && $pos < $endpos){ if (print_address($x, $y, $num)) $num++; } $pos++; } I am unable to tell if I modified anything on the main module (/admin/batch_print.php) since my version is heavily modified.
  3. This worked great for me, thx! :D
  4. I would try to put a Disallow on your robots.txt for *currency* and *manufacturers_id*, might be worth a try You can also try to makeit so everywhere on your store where you have one of those links to make them "nofollow"
  5. MindTwist

    Featured Product Support v1.5.4

    How about reading the thread, and not expecting someone to do it for you and post the answer? This is already posted with clear instructions on how to solve it.
  6. MindTwist

    Featured Product Support v1.5.4

    It does work this way on my store. When you are on the index page, you will get some featured products at random. When you are browsing a category, it will show you some featured products at random ONLY from that category and subcategories beneath it, it won't show featureds products outisde it.
  7. U2FtLCBJIHRob3VnaHQgdGhlcmUgd2FzIHNvbWUgaGlkZGVuIHJlYXNvbiBmb3IgZmlyc3QgcG9zdGlu ZyB0aGUgcmVhbCBtZXNzYWdlLCBhbmQgdGhlbiBlZGl0aW5nIGl0IHRvIHNvbWV0aGluZyBlbHNlLiBZb 3UgY2hlYXRlciE=
  8. 01000110011001010110010101101100001000000110011001110010011001010110010100100000 01110100011011110010000001110100011100100110000101101110011100110110110001100001 01110100011001010010000001101001011101000010000001111001011011110111010101110010 01110011011001010110110001100110001000000110011001110010011011110110110100100000 01100010011010010110111001100001011100100111100100100000011101000110111100100000 01100001011100110110001101101001011010010010111000100000010000100111010101110100 00100000011010000110010100100000011010010111001100100000011000100110000101110011 01101001011000110110000101101100011011000111100100100000011100110110000101111001 01101001011011100110011100100000011101000110100001100001011101000010000001101001 01100110001000000111100101101111011101010010000001100100011011110010000001101110 01101111011101000010000001100101011101100110010101101110001000000111001101100001 01111001001000000111011101101000011000010111010000100000011000110110111101101110 01110100011100100110100101100010011101010111010001101001011011110110111000100000 01111001011011110111010100100000011000010111001001100101001000000111010001100001 01101100011010110110100101101110011001110010000001100001011000100110111101110101 01110100001011000010000001111001011011110111010100100000011101110110100101101100 01101100001000000110100001100001011100100110010001101100011110010010000001100111 01100101011101000010000001101000011001010110110001110000001000000110011001110010 01101111011011010010000001100001011011100111100101101111011011100110010100101110 0010111000101110
  9. MindTwist

    SalesTracker

    Nice contribution! I always like having extra reports available, time will tell if this one is useful to me. I also didn't know Supertracker, so it comes as a nice addition to me. Thx!
  10. MindTwist

    Any contribution for discontinued products?

    So... noone has ever needed to do anything like this, or ever worried about what to do with a product they do not sell any more? :(
  11. Hello, I would like some input from other people on what they do with discontinued products. I have been thinking for a few months on doing a contribution to deal with them, since I haven't found any and I really do not know what everyone else usually does with products they do not sell any more. The problem, you have a product in catalog and run out of stock. The product gets very well on Google, so you do not want to deactivate it, and people keep geting to your store on that product and asking when you will have more. Now, it might be a product you will have again in the future, or maybe a product that has been discontinued by the manufacturer and you will not sell it again, but you might have a different product that replaces the old one in your catalog. Now, let's do some thinking on what to do if you are not going to have that product again. I do not think that disabling the product on your catalog is a good idea, since it might rank very well on Google for several keywords. You might have a new product that maybe it even has the same name, but when Google points to your store, it is pointing to the old product, because it has been there for years, it has a better rating, maybe many people have posted links on forums recommending your product, etc. If you disable the product, all that work and all the "fame" that URL might have goes down the toilet. But, we could maybe add a new field to the products table that defaults to NULL, maybe a "products_replacement" field, that when it is set up it will point to a product number that replaces the given product. So, maybe our product_id 22 has been discontinued and has been replaced by product_id 33, so on product_id 22 we would change product_replacement from NULL to 33. And then maybe on application_top we could make it so if we see we are dealing with a product_info, and the given product_info we want to see has a product_replacement set, we would give a "HTTP/1.0 301 Moved Permanently" error and give the new URL that replaces the discontinued product. Now, this could probably even work if the product is disabled from the admin section. But, we could even go one step further, and on application_top check if the visitor is a spider or not. If it is a spider, we would just hand out the 301 header above. If it is not a spider, and if we still have the product enabled, we would show the product as we always had it on the catalog, but with a new module (like the "also purchased" or "related products" modules) on top that would warn the customer that the product is out of stock and discontinued, but here you have the product that replaces it in catalog, please check it out. Doing it this way would probably also mean having to modify many queries everywhere on our store, because the product would be enabled, and maybe we do not want it showing up everywhere when browsing the catalog. Or maybe product_info could be modified a little bit, so if the product is disabled on the admin section, but it has a product_replacement set, it will show the product anyway if someone goes direct to the product_info, but this way it won't show up when browsing the store, searching, etc. I would like to see some input on other people that have found this problem before, and how they solved it (if they did). Yeah, just removing the product is the easy answer... Or just editing the product and replacing it with the new one is another one, but not the right way to do it. Any hints will be appreciated on the subject. Thx!
  12. It is not a known bot, it is not even a bot I would say, just some script on a web page that will connect to a given URL and show the returned resultcodes/headers. I did try the trick of forcing $spider_flag == true and then, indeed, the returns are a 301 moved permanently and a new URL that doesn't have an osCsid on it. As GoogleBot should see it, great! :D I have also been able to easily adapt $do_validation to work with my SEOed URLs for the NewsDesk module (-n- for a news item and -nc- for a news category). It was very easy and it works great! All in all, I only have the problem of not knowing how to make it show my default 404 error page, but I won't lose my sleep over that. I put my logging code on four_o_four_die(), so that is enough for me. Great contribution! :D
  13. I had already tried that one out, and it doesn't seem to work for me. It will just show me a blank page with no code at all, no source to be seen... :( I might just integrate my logging code from 404.php into the four_o_four_die function. Hopefully, that 404 integrated error should never be shown anyway.
  14. I have checked my "who's online" module, and my store sees the connection from http://oyoy.eu/page/headers/ which comes ipcolo1.softplus.net checking out the URL, and it does not recognise it as being a bot. Does any one know how I could check the result codes myself easily? I would like to make sure that GoogleBot will never get to see those osCsids... Thx! :D
  15. Howdy everyone, After a couple of hours installing this contrib and reading this thread, I have to say that it seems to be working great, but I have 3 comments to make: - validation_installer.php has hardcoded the table names. That should not be a problem with 99.9% of OSC stores, but some of us have different names on our tables. I share my database with several stores, so my tables have a prefix to make them different. On my test store my configuration table is "tr_configuration" and not "configuration", so I had to change that. It is strange that in some places we have FROM `configuration_group` and in others FROM `".TABLE_CONFIGURATION_GROUP."`, it would be better if everywhere on validation_installer.php was using the information from database_tables.php - I have seen several people in this thread asking how to use their current error 404 page. I have tried the 2-3 ways of doing it that have been posted here, and none of them seemed to work for me. It is not such a big deal, but I have a customized error page with logging that tells me what page the visitor was coming from and where they were going to: http://www.twistedtienda.com/non_existing_page.html But with this contrib with the wrong product URLs I will get the included 404 page: http://www.twistedtienda.com/non_existing_...uct-p-9999.html Is there any easy way to make the wrong products show the default 404 error page? - Last, I use the following page to check out the returned headers on my pages: http://oyoy.eu/page/headers/ When I go to http://www.twistedtienda.com/non_existing_...uct-p-9999.html the error code is ok, 404. When I go to a real product like http://www.twistedtienda.com/kit-camaras-c...leto-p-247.html, I get a 200 code, OK. But, when I go to a real product with a wrong URL, like http://www.twistedtienda.com/wrong-name-p-247.html, I get a 301 that redirects that URL to the right one, but with an attached osCsid. http://www.twistedtienda.com/kit-camaras-c...8593f2da05cfc0a Won't this be a problem for GoogleBot, which will index with osCsid? Or since I have "prevent spider sessions" set to true on my config, I am only seeing this osCsid because the web page I am using for checking it, but GoogleBot will not see the osCsid on the redirected page? I wouldn't like GoogleBot indexing my pages with osCsid on the URL. Many thanks, great work Robert!
×