Latest News: (loading..)

NuDreamer

Members
  • Content count

    54
  • Joined

  • Last visited

About NuDreamer

Profile Information

  • Real Name
    William
  1. Hi Guys, Let me explain a little more what I'm trying to do. My products in the category listing are currently surrounded by a light grey border. I want to be able to highlight the first product in each listing with maybe a blue/green border, and a ribbon that says BestSeller. Basically.. I just need a function that says.. if this is the first product shown in the category listing.. add this CSS class. Would anyone have any idea how I can go about doing this? Thanks in advance. I'll of course share the finished code with the community.
  2. To add to this post. I realized shortly after that I was only showing the original price, and not the FINAL price. Many of my products are listed as on sale, and so I needed to list the final price if a specials price was applied. My updated also_purchased_products.php code is here for anyone else interested. <?php /* $Id$ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2010 osCommerce Released under the GNU General Public License */ if (isset($HTTP_GET_VARS['products_id'])) { $orders_query = tep_db_query("select p.products_id, p.products_image, p.products_tax_class_id, p.products_price, pd.products_name, IF(s.status, s.specials_new_products_price, p.products_price) AS final_price from " . TABLE_ORDERS_PRODUCTS . " opa, " . TABLE_ORDERS_PRODUCTS . " opb, " . TABLE_ORDERS . " o, " . TABLE_PRODUCTS . " p LEFT JOIN " . TABLE_PRODUCTS_DESCRIPTION . " pd on p.products_id = pd.products_id left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id where opa.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and opa.orders_id = opb.orders_id and opb.products_id != '" . (int)$HTTP_GET_VARS['products_id'] . "' and opb.products_id = p.products_id and opb.orders_id = o.orders_id and p.products_status = '1' and pd.language_id = '" . (int)$languages_id . "' group by p.products_id order by o.date_purchased desc limit " . MAX_DISPLAY_ALSO_PURCHASED); $num_products_ordered = tep_db_num_rows($orders_query); if ($num_products_ordered >= MIN_DISPLAY_ALSO_PURCHASED) { $also_pur_prods_content = NULL; while ($orders = tep_db_fetch_array($orders_query)) { $also_pur_prods_content .= '<div class="col-sm-6 col-md-4 match-heights">'; $also_pur_prods_content .= ' <div class="thumbnail">'; $also_pur_prods_content .= ' <a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $orders['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $orders['products_image'], $orders['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a>'; $also_pur_prods_content .= ' <div class="caption">'; $also_pur_prods_content .= ' <h5 class="text-center"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $orders['products_id']) . '">' . $orders['products_name'] . '</a></h5>'; $also_pur_prods_content .= ' <h5 class="text-center">' . $currencies->display_price($orders['final_price'], tep_get_tax_rate($orders['products_tax_class_id'])) . '</h5>'; $also_pur_prods_content .= ' </div>'; $also_pur_prods_content .= ' </div>'; $also_pur_prods_content .= '</div>'; } ?> <br /> <h3><?php echo TEXT_ALSO_PURCHASED_PRODUCTS; ?></h3> <div class="row"> <?php echo $also_pur_prods_content; ?> </div> <?php } } ?>
  3. @@beerbee you were spot on. Thanks! I think the $random_product was because I was looking at an older attempt someone used to try to do this, and it fell quite flat. My final Products_also_purchased.php file is included below for anyone looking to do the same. <?php /* $Id$ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2010 osCommerce Released under the GNU General Public License */ if (isset($HTTP_GET_VARS['products_id'])) { $orders_query = tep_db_query("select p.products_id, p.products_image, p.products_tax_class_id, p.products_price, pd.products_name from " . TABLE_ORDERS_PRODUCTS . " opa, " . TABLE_ORDERS_PRODUCTS . " opb, " . TABLE_ORDERS . " o, " . TABLE_PRODUCTS . " p LEFT JOIN " . TABLE_PRODUCTS_DESCRIPTION . " pd on p.products_id = pd.products_id where opa.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and opa.orders_id = opb.orders_id and opb.products_id != '" . (int)$HTTP_GET_VARS['products_id'] . "' and opb.products_id = p.products_id and opb.orders_id = o.orders_id and p.products_status = '1' and pd.language_id = '" . (int)$languages_id . "' group by p.products_id order by o.date_purchased desc limit " . MAX_DISPLAY_ALSO_PURCHASED); $num_products_ordered = tep_db_num_rows($orders_query); if ($num_products_ordered >= MIN_DISPLAY_ALSO_PURCHASED) { $also_pur_prods_content = NULL; while ($orders = tep_db_fetch_array($orders_query)) { $also_pur_prods_content .= '<div class="col-sm-6 col-md-4 match-heights">'; $also_pur_prods_content .= ' <div class="thumbnail">'; $also_pur_prods_content .= ' <a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $orders['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $orders['products_image'], $orders['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a>'; $also_pur_prods_content .= ' <div class="caption">'; $also_pur_prods_content .= ' <h5 class="text-center"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $orders['products_id']) . '">' . $orders['products_name'] . '</a></h5>'; $also_pur_prods_content .= ' <h5 class="text-center">' . $currencies->display_price($orders['products_price'], tep_get_tax_rate($orders['products_tax_class_id'])) . '</h5>'; $also_pur_prods_content .= ' </div>'; $also_pur_prods_content .= ' </div>'; $also_pur_prods_content .= '</div>'; } ?> <br /> <h3><?php echo TEXT_ALSO_PURCHASED_PRODUCTS; ?></h3> <div class="row"> <?php echo $also_pur_prods_content; ?> </div> <?php } } ?>
  4. Hi All, I am not proficient at all with PHP, but I'm trying to learn through osCommerce here. I currently have the products_also_purchased.php enabled for product pages, and I would like to show the also purchased products pricing under the name. I inserted the additional code below: $also_pur_prods_content .= ' <h5 class="text-center">' . $currencies->display_price($new_price, tep_get_tax_rate($random_product['products_tax_class_id'])) . '</h5>'; But it is displaying the price of the PRODUCT PAGE itself. To clarify, whatever product I am currently looking at, all of the also purchased products show the exact same price. I'm guessing I need to add some additional lines to tell it to pull the right products, but I have no idea where to start. Can anyone help me out here? My entire Also purchased file code is below: <?php /* $Id$ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2010 osCommerce Released under the GNU General Public License */ if (isset($HTTP_GET_VARS['products_id'])) { $orders_query = tep_db_query("select p.products_id, p.products_image, p.products_tax_class_id, p.products_price, pd.products_name from " . TABLE_ORDERS_PRODUCTS . " opa, " . TABLE_ORDERS_PRODUCTS . " opb, " . TABLE_ORDERS . " o, " . TABLE_PRODUCTS . " p LEFT JOIN " . TABLE_PRODUCTS_DESCRIPTION . " pd on p.products_id = pd.products_id where opa.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and opa.orders_id = opb.orders_id and opb.products_id != '" . (int)$HTTP_GET_VARS['products_id'] . "' and opb.products_id = p.products_id and opb.orders_id = o.orders_id and p.products_status = '1' and pd.language_id = '" . (int)$languages_id . "' group by p.products_id order by o.date_purchased desc limit " . MAX_DISPLAY_ALSO_PURCHASED); $num_products_ordered = tep_db_num_rows($orders_query); if ($num_products_ordered >= MIN_DISPLAY_ALSO_PURCHASED) { $also_pur_prods_content = NULL; while ($orders = tep_db_fetch_array($orders_query)) { $also_pur_prods_content .= '<div class="col-sm-6 col-md-4 match-heights">'; $also_pur_prods_content .= ' <div class="thumbnail">'; $also_pur_prods_content .= ' <a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $orders['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $orders['products_image'], $orders['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a>'; $also_pur_prods_content .= ' <div class="caption">'; $also_pur_prods_content .= ' <h5 class="text-center"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $orders['products_id']) . '">' . $orders['products_name'] . '</a></h5>'; $also_pur_prods_content .= ' <h5 class="text-center">' . $currencies->display_price($new_price, tep_get_tax_rate($random_product['products_tax_class_id'])) . '</h5>'; $also_pur_prods_content .= ' </div>'; $also_pur_prods_content .= ' </div>'; $also_pur_prods_content .= '</div>'; } ?> <br /> <h3><?php echo TEXT_ALSO_PURCHASED_PRODUCTS; ?></h3> <div class="row"> <?php echo $also_pur_prods_content; ?> </div> <?php } } ?> Thanks a ton in advance
  5. @@raiwa Well what do you know.. I fixed it! Your comment about ot_shipping got me thinking.. so I checked it. For anyone else with this issue, here is the process. Regardless of the fact I was using Table Rate Shipping, I still needed to go into "Modules > Order Total > Shipping" in the Admin panel (I am using osCommerce 2.3.4 Bootstrap Gold). I enabled Allow Free Shipping, and set the Free Shipping Amount. Thanks for the assist!
  6. Hi @@raiwa, For Shipping I am using the Table Rate Shipping module that comes standard with OsC. I charge certain amount of shipping per dollar amount, until the basket reaches $88, at which point the Free Shipping kicks in. I am using Ship in Cart BS Reloaded 3.5. The Shipping option shows as Shipping: 0.00 on the checkout, and checkout confirmation pages, it just does not seem to show in the Order Totals box on the Shopping Cart for some reason. What is the Free Shipping option you spoke of in ot_shipping?
  7. Hi Guys, I'm really hoping someone can help me out here. I have this fantastic module working well with the Modular Shopping Cart. However, I have noticed that when an order qualifies for free shipping. There is NO shipping displayed in the Order Total box. It DOES show shipping if shipping costs are applicable. I would like to make it so that it shows either FREE SHIPPING, or at the very least, display Shipping: 0.00. Can anyone help me with this?
  8. I hate to bump.. but Bump?? Anybody?
  9. Hello Everyone, I am trying to implement Bing UET Tracking on my osCommerce site. It works very similar to google adwords and analytics in that I can track revenue. My problem is, I am not sure what I need to insert into the Bing UET code so that it takes the order total and passes it on to Bing, The code I am using is below: <script>(function(w,d,t,r,u){var f,n,i;w[u]=w[u]||[],f=function(){var o={ti:"TAG_ID"};o.q=w[u],w[u]=new UET(o),w[u].push("pageLoad")},n=d.createElement(t),n.src=r,n.async=1,n.onload=n.onreadystatechange=function(){var s=this.readyState;s&&s!=="loaded"&&s!=="complete"||(f(),n.onload=n.onreadystatechange=null)},i=d.getElementsByTagName(t)[0],i.parentNode.insertBefore(n,i)})(window,document,"script","//bat.bing.com/bat.js","uetq");</script> <script> var uetq = uetq || []; uetq.push({ 'gv': ORDER_TOTAL });</script> <noscript><img src="//bat.bing.com/action/0?ti=TAG_ID&Ver=2&gv=ORDER_TOTAL" height="0" width="0" style="display:none; visibility:hidden;" /></noscript> I need to replace the text ORDER_TOTAL with the query that pulls the actual order total data. Can anyone help me with this? MUCH Appreciated! William
  10. Hi Guys, I am currently working on a customized site build with the Bootstrap Gold version. I am having issues with the images however. I would like to remove the strict sizing that keeps it sitting at 250px, but I have NO idea what file I need to edit to make that happen. What file do I need to edit that contains the code that controls those image sizes? It's for sure not controlled in admin. Thanks
  11. Hey Guys, I have been using Article Manager for some time now, and I absoloutly love it. I want to try and make one thing work, and for some reason, I cannot figure our how.. Currently when you click an article it reads Home > Articles > Article Title here. I want to change it up, so the article Topic always appears instead of the the word Articles. So it would read like: Home > Article Topic Title > Article Title Here. I am assuming it is done here: $pageTags = tep_db_fetch_array($pageTags_query); $breadcrumb->add('Articles', tep_href_link(FILENAME_ARTICLES)); $breadcrumb->add($pageTags['page_title'], tep_href_link($articlesPage)); But I don't know how to write it. I would sincerely appreciate any help! Thanks so much!
  12. OK, I fiddled with this addon for the remainder of the day, and I did manage to make it so it displays correctly, but I got a bunch of javascript errors, the loader wouldn't show, etc. And the layout was broken on IE. I went to the developers website, and in the demo, it does NOT display correctly in IE either. So they don't even have it right, this is using the latest version of osC V.2.3. I wish somebody would develop a checkout process for this shop that's not broken in every other way lol.
  13. I am trying to install this on a new store. I am using the latest version of OsC, osCommerce Online Merchant v2.3.1. I followed the installation instructions exactly, and when I actually activate the One Page Checkout in the admin panel, my checkout page is blank! I can see the menu at the top, but past that, everything else is blank! Not to mention, it takes the page forever to load. I have no idea what I did wrong, any ideas? If it helps, the default CSS file doesn't seem to be loading either. An image is attached.
  14. I have found another bug in this script. I noticed that whenever I enter a Visa card, the cart always changes the expiration date on the checkout_confirmation.php page, to: December, 2019. This is no matter WHAT visa card I use. I do not know if this because of the CVV2 addon I am using or not. Anyone else run into anything similar? is this script still being supported?
  15. Hey Guys, I ran into an error when using this module that I did NOT have before this. I am using the CVV2 addon found here: http://addons.oscommerce.com/info/2954 It is the standard OsCommerce CC module, just with the CVV2 addition. It was working just fine on my live store, then I installed this contribution, and the following occurs: 1. Customer enters credit card info and submits. 2. Customer is redirected to checkout_payment.php, where they recieve an error that the CC Expiration date is incorrect. 3. Customer reenters information, and checkout completes succesfully. Any ideas as to why customers have to enter their credit card info TWICE before it accepts the expiration?... Thanks in advance for the help!!