Jump to content

Astralp

Members
  • Content count

    33
  • Joined

  • Last visited

1 Follower

Profile Information

  • Real Name
    Andy Medforth
  1. Hi For anyone interested in resolving the problem of product pages dropping off I have a small hack for the all products contribution, which may help. My products have just come back however, so its probably not neccesary. It basically uses apache rewrites in the .htaccess file. The code to add to your htaccess file in the catalog root is: RewriteEngine On RewriteRule ^index.html default.php [L] RewriteRule ^pdinfo/(.*).html product_info.php?products_id=$1 [L] and then find the following in allprods.php: echo " <a href="" . tep_href_link(FILENAME_PRODUCT_INFO, 'name=' .str_replace("/", "/", rawurlencode($this_products_name)). '&products_id=' . $this_products_id . (($this_language_code == DEFAULT_LANGUAGE) ? '' : ('&language=' . $this_language_code)), 'NONSSL', false) . "">" . $this_products_name . "</a><br>n"; and replace with: echo "<a href=pdinfo/" . $this_products_id . ".html>" . $this_products_name . "</a><br>"; As you can see it does not use the language side of what it replaces, I don't need that and couldn't fully grasp what was going on, so maybe someone can improve this. Now to the problem... when I check it on http://www.searchengineworld.com/cgi-bin/s.../sim_spider.cgi it has sids attached to it, is there any way to remove them easily just for this page as the rest of the site is taken care of by sid killer? (If you are installing this, make sure you have mod_rewrite enabled on your apache server, theres lots of info on google about how to do this) Andy
  2. I know what you mean, I have been enjoying hacking the code to do specific things but I don't have enough time to study it properly at the moment, although I would like to. Its very rewarding when you set out to do something and a rediculous amount of time later its done! I would definately like to build a php based website from scratch one day. well keep up the great work and I hope it earns to a serious living for you! take care Andy
  3. Hi Linda If I ever make my fortune I'll certainly send some dosh your way for your great contibs :) I also use the downloads controller which is excellent. So do you write code for a living? Andy
  4. Hi Linda Thanks for responding. I've managed a very crude hack which will at least allow me to get my products in quicker. It basically sits at the bottom of your code in the update_product section of categories.php in conjunction with the code below (which is just above your table at the bottom of the page). It adds the 3 fields for filename, days and downloads allowed which update ok. It also most importantly for me uses the model name to construct the zip file name. The downside is that the other 2 fields are set to 7 and 5 in here as opposed to variables but they can still be updated manually from the page. The major problems are that it will only work with a copied product using your copier, and also it takes two passes through the updating process to refresh the model name as that happens on the page load, so you have to change the model name, save and edit and save again.... Still better than venturing into the attributes section though. If you have any suggestions on how to update this as part of the below code I would be very grateful, its taken me a full day of frustration to get this far :) anyhow thanks for the great contribution and your help! I look forward to the update of the copier. Andy /////////////////////////////// if ((DOWNLOAD_ENABLED == 'true')) { tep_db_query("update " . TABLE_PRODUCTS_ATTRIBUTES_DOWNLOAD . " set products_attributes_filename='" . $HTTP_POST_VARS['products_attributes_filename'] . "', products_attributes_maxdays='" . $HTTP_POST_VARS['products_attributes_maxdays'] . "', products_attributes_maxcount='" . $HTTP_POST_VARS['products_attributes_maxcount'] . "' where products_attributes_id = '" . $attributes['products_attributes_id'] . "'"); } ////////////////////////////// <tr> <td class="main"><?php echo TEXT_PRODUCTS_ATTRIBUTES_FILENAME; ?></td> <td class="main"><?php echo tep_draw_separator('pixel_trans.gif', '24', '15') . ' ' . tep_draw_textarea_field('products_attributes_filename', 'soft', '70', '1', $pInfo->products_model . ".zip"); ?></td> </tr> <tr> <td class="main"><?php echo TEXT_PRODUCTS_ATTRIBUTES_MAXDAYS; ?></td> <td class="main"><?php echo tep_draw_separator('pixel_trans.gif', '24', '15') . ' ' . tep_draw_textarea_field('products_attributes_maxdays', 'soft', '70', '1', 7); ?></td> </tr> <tr> <td class="main"><?php echo TEXT_PRODUCTS_ATTRIBUTES_MAXCOUNT; ?></td> <td class="main"><?php echo tep_draw_separator('pixel_trans.gif', '24', '15') . ' ' . tep_draw_textarea_field('products_attributes_maxcount', 'soft', '70', '1', '5'); ?></td> </tr>
  5. Well a few more hours on and I'm still no closer. I've managed to create a field on the edit product page which automatically builds the download filename from the model. But I still can't understand the relationship between the attributes, the product and the 'attributes_filename'. Can anyone give me a hint at how to insert this into the database so it is linked to the product? thanks in advance Andy
  6. Hi I am using this excellent contribution, however on the attributes listing there is no box with the filename, days to expire etc.... This is a major issue for me as I literally have thousands of downloadable products and editing the filename in the traditional attributes method is unthinkable :) I was wondering if anyone could help point me in a good hacking direction to add this to the categories.php. It would need a field for filename at least which could be updated. I've spent all day trying to hack it but with no success, I guess its beyond my understanding at the moment. Another way of dealing with it which would be even more useful is if this field could be updated automatically to have the same name as the product model with a zip extension added, to save typing it altogether. If anyone can help me I would be very grateful! I enjoy hacking OSC and have had some success adding fields etc... but I am really stuck with this. I can't understand the relationship between the filename and theattributes from the php code point of view. Andy
  7. Hi I've installed the code and it works fine, however it does not work with the auto login contribution. Is there any way around this? What happens is that once you are logged in and then you log out you end up in an infinite loop, whichever link tyou click on it forwards to logoff.php where the loop takes place. I hope this can be resolved as I love the auto login contrib :) Well done to Ian for all his hard work! Andy
  8. Hi There is a bit of a conflict because I have products which need options selecting (attributes), however if they are not selected the order goes through anyway. On top of this if you use buy it now there is no way to select any options. Are there any contributions to help with this? Ideally I would prefer that the options could be carried through to the cart (so they are still selectable). At the moment the item has to be removed from the cart, the customer has to go back to the products page, select the options and then add to cart again... Also when adding attributes for a downloadable product, there doesn't seem to be any way to not have an attributes box. Is there any way around this? Any help will be highly appreciated, I'm getting closer to going live slowly but surely :)) Andy
  9. I got the solution from the author, who was quick to respond and so I thought that I'd post it here for anyone else with this problem :) "yes we have identified this problem. it appears in fact only on servers running older version of php to fix this problem, you just need to open the file catalog/newsletter_subscribe.php and remove the line containing includes/classes/snoopy1.php this class was for a future use and is not needed for this version"
  10. I've installed following the instructions but when I fill in the newletter subscribe page on my site and click continue I get this error: Warning: Cannot add header information - headers already sent by (output started at /home/worldofsampling/public_html/osc/catalog/includes/classes/snoopy1.class.php:2104) in /home/worldofsampling/public_html/osc/catalog/newsletters_subscribe.php on line 73 Can anyone help me with this please?? thanks! Andy
×