Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

MindTwist

Members
  • Posts

    81
  • Joined

  • Last visited

Everything posted by MindTwist

  1. 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. 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. 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"
  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.
  5. 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.
  6. U2FtLCBJIHRob3VnaHQgdGhlcmUgd2FzIHNvbWUgaGlkZGVuIHJlYXNvbiBmb3IgZmlyc3QgcG9zdGlu ZyB0aGUgcmVhbCBtZXNzYWdlLCBhbmQgdGhlbiBlZGl0aW5nIGl0IHRvIHNvbWV0aGluZyBlbHNlLiBZb 3UgY2hlYXRlciE=
  7. 01000110011001010110010101101100001000000110011001110010011001010110010100100000 01110100011011110010000001110100011100100110000101101110011100110110110001100001 01110100011001010010000001101001011101000010000001111001011011110111010101110010 01110011011001010110110001100110001000000110011001110010011011110110110100100000 01100010011010010110111001100001011100100111100100100000011101000110111100100000 01100001011100110110001101101001011010010010111000100000010000100111010101110100 00100000011010000110010100100000011010010111001100100000011000100110000101110011 01101001011000110110000101101100011011000111100100100000011100110110000101111001 01101001011011100110011100100000011101000110100001100001011101000010000001101001 01100110001000000111100101101111011101010010000001100100011011110010000001101110 01101111011101000010000001100101011101100110010101101110001000000111001101100001 01111001001000000111011101101000011000010111010000100000011000110110111101101110 01110100011100100110100101100010011101010111010001101001011011110110111000100000 01111001011011110111010100100000011000010111001001100101001000000111010001100001 01101100011010110110100101101110011001110010000001100001011000100110111101110101 01110100001011000010000001111001011011110111010100100000011101110110100101101100 01101100001000000110100001100001011100100110010001101100011110010010000001100111 01100101011101000010000001101000011001010110110001110000001000000110011001110010 01101111011011010010000001100001011011100111100101101111011011100110010100101110 0010111000101110
  8. 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!
  9. 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? :(
  10. 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!
  11. 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
  12. 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.
  13. 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
  14. 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!
  15. Just follow the instructions on the included Install Text.doc , it explains how to install the module on the front page... that's why they usually put those instructions in there, so people sometimes will bother reading them if they have no clue on what to do.
  16. I am reading your last 7 posts, and I really have no clue on what you are talking about. You have a SQL file with the contribution, you need to execute it. Do it. The question "what do I put on each field" has no answer since you have to put nothing, you just need to execute those SQL instructions on phpmyadmin or whatever you use. Any more questions?
  17. So I finally got it fixed, after all. I have to say that even I really like the time this BPC contribution saves me, it would need a major rewrite. The code could hardly become any more complicated even if they were trying to make it so. It doesn't make sense things like that the main batch_print.php will call the template file, which in turn will call again batch_print.php because the print_address function is stored in there. If you use several templates, you will probably need either a more sofisticated print_address, or a different function alltoguether since you will not always print the address the same way. I use BPC for making two different size of labels, and the list with the shipment relations with two different carriers, and on 4 places where I put the customer address, I need a different print_address function. Code like an "if" for knowing if you are the first label and need to create a new page should NOT be on the print_address function. Code for fetching more orders to print labels should NOT be on the print_address function. There are many many things that should be changed on the way this contrib works. And I am not saying it is not useful, you bet it is! Once you have it up and working, it is great. But heck, you surely do not want to be changing anything at all once it is up and working, because it is a pain in the ass from the way the mod is structured. I will try to install later oyster.collector contrib from scratch and post a step by step guide here on the few changes that need to be done. Finally I can print say 50 labels all at a time...!!
  18. Oh well, I have been unable to get it to work with more than one page. With the supplied changes on function print_address, it does print ok the first label, it doesn't get skipped any more. BUT... The problem used to be that the first label on each page was missing. If you printed labels 1-30 on a layout that has 10 labels on each page, you would get 2-11 on the first page, 13-22 on second page, and 24-30 on third page. Labels 1,12,23 were missing. With the new changes, the first page will indeed print labels 1-10 as expected, but the next page will be empty :( So I guess some more work will need to be done on this... Edit: The fields o.orders_prefix and h.comments need to be removed from the $orders_query on oyster.collector version, they must belong to some contribution he has added on his store. I just installed all the files from his contribution to make sure there wasn't anything wrong with my templates, and nope, it is not working, only the labels on the first page get printed.
  19. oyster.collector, If you have found a solution, thank you very much. I came to this thread last year when I was finishing my templates, and I just came back because I was going to give it another go, since it is starting to become boring adding an extra number before what I really want to print. I have the labels template and two more shipping templates based on that one with which I am having this problem, the first record never shows up. But now, on your blog you state: "The main while orders loop in the batch_print.php (line 85) creates the first order object, but when it goes into the Labels.php template file, the print_address function re-creates the order object using the 2nd order already" That is a good hint for me to get started. But heck, why on earth haven't you posted the exact details? Sure, you want to gain some visits on your blog, but you could make it easier for the rest of us. Out of your 3 links, the first two are not working ("Standard" and "Fix for Error 1054"), so I just downloaded the full ZIP file. But of course, my contribution is already heavily modded, so I can nost just wipe all my current templates or even my /admin/batch_print.php without breaking all the contribution, which means I have to play "hide and seek" with whatever code you have changed on your contribution without even knowing on what version it is based for. Hopefully I will find whatever change you have done on print_address quick :D Oh well... No more bugging, will check it out and try to report back with a fix. It amazes me for how long this contribution has had this template broken, I find it so useful that it makes me wonder how can people live without it, or what contribution does everyone else use for their admin printing needs. Thanks!
  20. You want Featured to show the products you choose? Then choose only the number of products you are displaying on the main page... If you are displaying maybe 6 products, don't "feature" more than 6 products, and those will always be showing on the main index. If you want to sort the, edit /includes/modules/featured.php and you need to replace on the SQL queries "order by rand($mtm)" for something like "order by p.products_price". Notice there are two SQL queries, one for the index, and one for sub categories.
  21. Since everything else seems to be working fine, I just changed the file /includes/modules/featured.php by a previous version, looking for one that would work ok and show products that do not have a special price. I have installed the latest version available as of today, "Featured Products 161 with STS 453 instructions" uploaded by Phocea on 25/Jun/2008 I tried the file /includes/modules/featured.php from 1.60, also by Phocea on 25/Jun/2008. No luck, I was geting a strange SQL error, probably that's why he uploaded 1.61 the same day. I then tried the small featured.php file uploaded by itjust on 10/Jun/2008. That one seemed to work ok and I was seeing all products, but it displays no prices at all. No normal prices, no special prices, just the products :( Then I went all the way back to 1.5.9, uploaded by bkellum on 15/Jul/2007. Using the included /includes/modules/featured.php on that version, my problem has been solved. Now all the featured products I select will be shown, no matter if they have special price or not.
  22. +1 on that... I just came here after trying to install Featured Products 161 with STS 453 instructions.zip on my store. Everything seems to be working quite well, except for the fact that only "featured products" that have a "special price" will be showing up on the featured products boxes. There is a post from yesterday that says this also happens with 1.59 installed, so I will try to compare SQL queries on the latest versions to try and find out how to fix it, but with the version I have installed myself, Out of all the products I add as featured, they will only show uyp as featured on the store if they have a special price.
  23. I understand what you mean, but I see no point on entering your costs in US$ (or CNY, or whatever you are peying your pourchases with). Once you pay your purchases, you know what exchange you have paid for whatever you purchased in China, so you know your cost in NOK. That is the cost you should be using, since you do not want exchange rates to be constantly changing your cost.
  24. Nice, I will be checking it out now. Typo on my previos post, where I said: I have searched and replaced ALL instances of "google.com" to "google.es" and also all "hl=en" to "hl=en" I meant: I have searched and replaced ALL instances of "google.com" to "google.es" and also all "hl=en" to "hl=es" My sugestion; I know it is very easy asking, but even if I may try to change some small things on contributions, there's no way on earth I would be able to this one. It is nice being able to query google at any time for a given word, and have it stored on a DB so you can later compare how you are doing.ç But I think it would be even better if that could be done a little bit more automated. Like, I could configure several/many search terms I want googled and stored on the DB, and all of them could be searched with the press of a button. Maybe it could even be automated via cron, so once a week you can do the query, and on the long term you can see if your search terms are doing better or worse. Anyway, it is a nice tool to have. Just trying to give some ideas on how I think it could be a lot better :D Thanks!
×
×
  • Create New...