Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Kanie

Archived
  • Posts

    115
  • Joined

  • Last visited

About Kanie

  • Birthday 03/13/1985

Profile Information

  • Real Name
    Adam
  • Gender
    Male
  • Location
    London, England

Kanie's Achievements

  1. Yeah, I saw that contribution but it appears it doesn't account for half ratings, but rather just rounds the average up/down to a whole number. That approach is fine, of course, but with with a little extra code added to the example I provided above you could display 3.5 stars for a more accurate rating guide.
  2. I will explain quickly how to get the average rating, but where and how you display these variables is up to you. 1) In product_info.php locate: $reviews_query = tep_db_query("select count(*) as count from " . TABLE_REVIEWS . " where products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "'"); Replace it with: $reviews_query = tep_db_query("select count(*) as count, sum(reviews_rating) as total from " . TABLE_REVIEWS . " where products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "'"); 2) Locate: if ($reviews['count'] > 0) { Directly after this line paste: $average_rating = round(($reviews['total'] / $reviews['count']), 2); The variable $average_rating now contains the textual average rating for the product. You can change the "2" to the amount of decimals you wish to round to. How you use and display this variable is entirely up to you. Getting this variable to become star images takes a little more work, but it's not impossible.
  3. A simple solution to this would be to offer separate products ('Socks 8 pack', 'Socks 16 pack'), or use attributes to allow the customer to select which pack quantity they would like. It would be confusing to the customer that 8 of an item appeared in their shopping cart, but 1 pack of 8 wouldn't cause any confusion.
  4. If a customer comes to your store knowing what they're looking for, research has shown that they will most likely use the search feature. If that customers search is specific enough to only return one result, why bother showing them the search results? Let's take them directly to the product that they're looking for! This relatively simple modification does exactly that. http://addons.oscommerce.com/info/6388
  5. It sure can. In includes/classes/seo.class.php find this line: case ( $page == FILENAME_PRODUCT_INFO && !$this->is_attribute_string($p2[1]) ): $url = $this->make_url($page, $this->get_product_name($p2[1]), $p2[0], $p2[1], '.html', $separator); break; And change it to: case ( $page == FILENAME_PRODUCT_INFO ): $url = $this->make_url($page, $this->get_product_name($p2[1]), $p2[0], $p2[1], '/', $separator); break; Then in your .htaccess file find: RewriteRule ^(.*)-p-(.*).html?$ product_info.php?products_id=$2&%{QUERY_STRING} And change it to: RewriteRule ^(.*)-p-(.*)/?$ product_info.php?products_id=$2&%{QUERY_STRING} You can repeat this process for all of the calls to $this->make_url(), changing the '.html' to what you wish and updating the .htaccess accordingly. Make a backup and test as you edit just in case but I'm sure it will be ok. I have modified my seo.class.php file extensively and not come across any issues.
  6. Lucy, it sounds like you haven't got the mod_rewrite Apache module installed. Find where your Apache is installed and locate the 'conf\httpd.conf' file. Open it and search for this line: LoadModule rewrite_module modules/mod_rewrite.so If you see a '#' in front of it this means it is currently disabled, so remove the '#' and save the file. Restart Apache and try your catalogue again.
  7. This is understandable and if the solution works for you then there is no need to fix it. However, the API is available to send a PayPal Mass Payment from an existing solution, in case this the osC admin panel. Making sure you cover your costs in your 'management fee' of course, you could settle up all of your affiliates/partners every week, two weeks or month. Your accounts would show you receiving payments as income but sending them out as expenses, so the tax issue would never arise. Is there any chance of getting a PM of the URL to this video rental development? I am really keen at looking at systems that take osCommerce away from the traditional online store, or just those that show what can be achieved with a bit of thought and know-how. I understand if you don't want to pass on the link.
  8. This is certainly an interesting concept, but the ability not to order more than one product at once is a big drawback. You simply couldn't build a successful site with that kind of feature overlooked. Instead I feel the full payment should be sent to the store owner and in the admin the store owner can see how much money is owed to each affiliate/partner. He/she can then send a mass payment via PayPal (where the recipients are not charged) to all or selected affiliates/partners.
  9. This should work: <!-- counter Info Box //--> <tr> <td> <?php $info_box_contents = array(); $info_box_contents[] = array('align' => 'center', 'text' => '<font color="' . $font_color . '">' . BOX_HEADING_COUNTER . '</font>' ); new infoBoxHeading($info_box_contents, false, false); $info_box_contents = array(); $info_box_contents[] = array('align' => 'center', 'text' => "<script language=\"javascript\"> var data, p; var agt=navigator.userAgent.toLowerCase(); p='http'; if((location.href.substr(0,6)=='https:')||(location.href.substr(0,6)=='HTTPS:')) {p='https';} data = '&r=' + escape(document.referrer) + '&a=RlHwJsSnUn' + '&n=' + escape(navigator.userAgent) + '&p=' + escape(navigator.userAgent); if(navigator.userAgent.substring(0,1)>'3') {data = data + '&sd=' + screen.colorDepth + '&sw=' + escape(screen.width+ 'x'+screen.height)}; document.write('<a href=\"http://www.precisioncounter.com/stats.php?i=13601&a=RlHwJsSnUn\" target=\"_blank\" >'); document.write('<img border=0 hspace=0 '+'vspace=3 src=\"http://www.precisioncounter.com/counter.php?i=13601&a=RlHwJsSnUn' + data + '\"></a>'); </script><br><a href=\"http://www.precisioncounter.com\" target=\"_blank\" title=\"FREE Hit Counters and Site Statistics!\" style=\"font-family: tahoma, verdana, arial, helvetica, sans-serif; color: gray; font-size: 10px; text-decoration: none;\">FREE Hit Counters!</a>" ); new infoBox($info_box_contents); $info_box_contents = array(); $info_box_contents[] = array('align' => 'left', 'text' => tep_draw_separator('pixel_trans.gif', '100%', '1') ); new infoboxFooter($info_box_contents, true, true); ?> </td></tr> <!-- counter_eof //--> I got rid of the counter code comments ("<!-- START PrecisionCounter.com Hits/Stats Code -->", etc) from the top as they are not needed, as well as removing the wrapping paragraph (<p>) tag.
  10. John, When you say you "tried many different multi image solutions but just cant get them to work with QT Pro", what exactly do you mean? What are you trying to achieve? How do you want the images and QTPro to work together?
  11. You do not need to include the 'seo.class.php' file in your admin panel and would appear that you have edited the wrong 'html_output.php' file. You need to edit the 'html_output.php' file in 'includes/functions' NOT 'admin/includes/functions'. Do you create a backup of your files before installing the contribution? If so, put those back and place and start again. The installation is very straight forward, just make sure you read the documentation very carefully.
  12. Bill, I prefer it partly because I am so comfortable with it now, but mostly because I like how it takes osCommerce back to basics and strips out its original, quite frankly awful, template. Because of that I always know where I am with BTS. I'm not saying STS is bad by any means, I have used it and understood it, but I prefer the way BTS functions over STS. Saying that, I haven't tried STS in a long time and things may have changed in the way it functions. The initial install of BTS isn't hard, but I understand why people don't like it because it messes with so many core files. In my opinion this is not the fault of BTS, but the fault of the osCommerce Team for not having any kind of approach/thought to a template system. BTS is how osCommerce should be out of the box. My post in this thread details the fact that I keep an updated base install of my own modified osCommerce that I use for every development before any custom coding goes into it. With this base install I can have a fully validated, semantic XHTML osCommerce installation up and running in a matter of minutes. I am open minded and will give STS another look, but it would take a lot to persuade me away from BTS at this stage. BTS may not be for everyone, especially non-developers who are trying to get their own stores up and running, but it's perfect for me.
  13. I just want to throw my hat in and say I'm also a fan of BTS over STS. I've developed a lot of osCommerce sites using BTS and never had any issues or complaints. Quite frankly, the core osCommerce template is very, very badly coded and stripping it out is simply the best option. From there I can code my own semantic XHTML from scratch as I would any other site I develop and my core osCommerce files are nice and clean. Adding contributions really isn't that difficult once you understand that the new BTS files. Regarding this particular update, I personally haven't seen any issue with BTS that would make me want to upgrade from my current modified version, but, like the others, it's nice to see someone making an effort with this contribution and good luck.
  14. Ramesh, Where have you inserted this custom text? In order for text to be displayed only if the payment is successful, you must inject the code between the following lines: tep_db_perform(TABLE_ORDERS_STATUS_HISTORY, $sql_data_array); } ?> YOUR HTML/MESSAGE HERE <?php } } } } } ?> If you have inserted your text after the closing ?> tag, the callback variables won't necessarily have to be read for the text to display. What parameters are you trying to capture? It could possibly be your server configuration, but at this stage I'm unsure. All callback variables are sent from WorldPay as $_POST, so your code should be able to read it. To test whether your server is reading the callback and $_POST correctly, create a new test junior_callback.php file with just the following code inside: <?php echo "Hello world!<br/><br/>"; print_r($_POST); ?> Once you have completed your payment, you should see "Hello World!" followed by the full contents of the $_POST array.
  15. Ramesh, you will need to check the "Enable the Shopper Response" option in your WorldPay Installation options. The readme file provided with the contribution refers to it as "Use callback response?" on Page 5 of the PDF. It would seem that the readme is a little out-dated as a number of the settings have seemingly changed their phrasing on the WorldPay site. To confirm, the following settings should be set in your WorldPay Installation configuration: Payment Response URL: http://<WPDISPLAY ITEM=MC_callback> Payment Response enabled?: CHECKED Enable the Shopper Response: CHECKED Payment Response password: YOUR PASSWORD AS SET IN YOUR WORLDPAY MODULE OPTIONS IN OSC ADMIN MD5 secret for transactions: YOUR PASSWORD AS SET IN YOUR WORLDPAY MODULE OPTIONS IN OSC ADMIN I hope that fixes the problem for you.
×
×
  • Create New...