Jump to content

cinolas

Members
  • Content count

    216
  • Joined

  • Last visited

  • Days Won

    2

cinolas last won the day on January 7 2017

cinolas had the most liked content!

Profile Information

  • Real Name
    Nicolas

Recent Profile Visitors

8,251 profile views
  1. cinolas

    QTPro BS

    Well. Again. Replacing the WHILE with a FOREACH actually did solve the problem. (I still don't understand why though) I swear I tried it like 3 times, since I remembered that had fixed my problem before I guess I had not done so properly. My apologies for all the posts. Problem solved. Moving on. Thanks!
  2. cinolas

    QTPro BS

    I also posted this question on Stackoverflow since it's probably not osCommerce specific (but I could very well be wrong): https://stackoverflow.com/questions/63853909/how-do-i-debug-this-bit-of-php-and-sql-that-queries-for-an-array-lists-it-and-p
  3. cinolas

    QTPro BS

    Thanks again @raiwa! I had the hooks installed properly. Turns out my problem was that my shopping_cart wasn't modularized. So I installed the modular shopping cart and things seem to be working a bit better now. The variables MODULE_CONTENT_SC_PRODUCT_LISTING_QTPRO_CART_BUTTON_UPDATE and MODULE_CONTENT_SC_PRODUCT_LISTING_QTPRO_CART_BUTTON_REMOVE needed to be defined in includes/languages/english/module/content/shopping_cart/cm_sc_product_listing_qtpro.php. (They weren't there already for some reason.) Now, the only problem left is that the modular shopping cart isn't showing the attributes anymore. Just the dashes, no attribute text. I'm using the stock cm_sc_product_listing_qtpro so I doubt that's the problem. I've had this issue before, and posted about it earlier in this thread. Back then I fixed the issue (though not knowing how or why it worked) by using FOREACH instead of WHILE, but that fix doesn't seem to be working anymore. What else could be causing empty attributes in the shopping cart? Any ideas? Cheers!
  4. cinolas

    QTPro BS

    Sorry, should've looked harder... I found the definition in qtpro_hooks.php so I'm guessing the hook isn't happening. I will investigate, but any tips you may have is greatly appreciated.
  5. cinolas

    QTPro BS

    I found this error in my logs: [09-Sep-2020 06:10:38 America/Vancouver] PHP Fatal error: Call to undefined function check_stock_qtpro() in /chroot/home/roller/rollergirl.ca/html/skateshop/shopping_cart.php on line 101 That looks like a good reason for my shopping_cart to fail lol. In which file should this function be defined?
  6. cinolas

    QTPro BS

    Thanks for looking @raiwa! I understand that Gold isn't supported anymore and I appreciate you taking the time to help. I tried again this morning and got the same result, but I dug a little deeper to try and understand what is happening wrong. I tried using the provided modified shopping_cart.php and it gave me the same result. How do I turn on error reporting? I'm sure that would help (I didn't even know that was a thing!) My shopping_cart page stops after: <table class="table table-striped table-condensed"> <tbody> So it looks like the problem occurs while building the $products_name variable... Cheers!
  7. cinolas

    QTPro BS

    I forgot to mention. I had QT Pro 4.6.1 installed on my 2.3.4 BS GOLD so I followed the instructions for 4.6.1 to 5.0, then (if any) 5.0 to 5.1, 5.1 to 5.2, etc... up to 5.5.3. The only discrepancy I've found was the mention to upload and replace some AJAX Attribute Manager files (which I am using): But those files were not provided in the package I got. The Ajax manager seemed to work fine just the same. But my shopping cart is broken. Any insights are greatly appreciated!
  8. cinolas

    QTPro BS

    Thanks @raiwa ! It took some time but I just attempted to install QTPro 6.0.0 for 2.3.4 EDGE, GOLD, etc The installation was mostly successful, but when I was done the shopping_cart.php page wasn't working, everything else seemed fine. I reverted to backup and tried again, but it gave me the same results. The shopping cart page would end abruptly after the <tbody> tag: ... <form name="cart_quantity" action="https://www.rollergirl.ca/skateshop/shopping_cart.php?action=update_product" method="post"> <div class="contentContainer"> <div class="contentText"> <table class="table table-striped table-condensed"> <tbody> Does that look like something obvious I may have missed? Or where should I look first to try to oust this bug? This is my actual shopping_cart.php after installing QTPro 6.0.0 if that helps: <?php /* $Id$ Modified for: QTpro Version 5.0 BS by @raiwa info@oscaddons.com www.oscaddons.com osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2010 osCommerce Released under the GNU General Public License */ require("includes/application_top.php"); if ($cart->count_contents() > 0) { include(DIR_WS_CLASSES . 'payment.php'); $payment_modules = new payment; } require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_SHOPPING_CART); $breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_SHOPPING_CART)); require(DIR_WS_INCLUDES . 'template_top.php'); ?> <div class="page-header"> <h1><?php echo HEADING_TITLE; ?></h1> <p>Please verify that you have selected the correct <strong>sizes, colours</strong> and <strong>other options</strong> before checking out.<br />Orders for which we have all the info ship faster :)</p> </div> <?php if ($messageStack->size('product_action') > 0) { echo $messageStack->output('product_action'); } ?> <?php if ($cart->count_contents() > 0) { ?> <?php echo tep_draw_form('cart_quantity', tep_href_link(FILENAME_SHOPPING_CART, 'action=update_product')); ?> <div class="contentContainer"> <div class="contentText"> <?php $any_out_of_stock = 0; $products = $cart->get_products(); for ($i=0, $n=sizeof($products); $i<$n; $i++) { // Push all attributes information in an array if (isset($products[$i]['attributes']) && is_array($products[$i]['attributes'])) { while (list($option, $value) = each($products[$i]['attributes'])) { echo tep_draw_hidden_field('id[' . $products[$i]['id'] . '][' . $option . ']', $value); //++++ QT Pro: Changed Code $attributes = tep_db_query("select popt.products_options_name, poval.products_options_values_name, pa.options_values_price, pa.price_prefix $attributes = tep_db_query("select popt.products_options_name, popt.products_options_track_stock, poval.products_options_values_name, pa.options_values_price, pa.price_prefix from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_OPTIONS_VALUES . " poval, " . TABLE_PRODUCTS_ATTRIBUTES . " pa where pa.products_id = '" . (int)$products[$i]['id'] . "' and pa.options_id = '" . (int)$option . "' and pa.options_id = popt.products_options_id and pa.options_values_id = '" . (int)$value . "' and pa.options_values_id = poval.products_options_values_id and popt.language_id = '" . (int)$languages_id . "' and poval.language_id = '" . (int)$languages_id . "'"); $attributes_values = tep_db_fetch_array($attributes); $products[$i][$option]['products_options_name'] = $attributes_values['products_options_name']; $products[$i][$option]['options_values_id'] = $value; $products[$i][$option]['products_options_values_name'] = $attributes_values['products_options_values_name']; $products[$i][$option]['options_values_price'] = $attributes_values['options_values_price']; $products[$i][$option]['price_prefix'] = $attributes_values['price_prefix']; //++++ QT Pro: Changed Code $products[$i][$option]['track_stock'] = $attributes_values['products_options_track_stock']; //End QT Pro } } } ?> <table class="table table-striped table-condensed"> <tbody> <?php $products_name = NULL; for ($i=0, $n=sizeof($products); $i<$n; $i++) { $products_name .= '<tr>'; $products_name .= ' <td valign="top" align="center"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $products[$i]['id']) . '">' . tep_image(DIR_WS_IMAGES . $products[$i]['image'], $products[$i]['name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a></td>' . ' <td valign="top"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $products[$i]['id']) . '"><strong>' . $products[$i]['name'] . '</strong></a>'; if (STOCK_CHECK == 'true') { //++++ QT Pro: Begin Changed code if (isset($products[$i]['attributes']) && is_array($products[$i]['attributes'])) { $stock_check = check_stock_qtpro($products[$i]['id'], $products[$i]['quantity'], $products[$i]['attributes']); } else { $stock_check = tep_check_stock($products[$i]['id'], $products[$i]['quantity']); } //++++ QT Pro: End Changed Code if (tep_not_null($stock_check)) { $any_out_of_stock = 1; $products_name .= $stock_check; } } if (isset($products[$i]['attributes']) && is_array($products[$i]['attributes'])) { reset($products[$i]['attributes']); while (list($option, $value) = each($products[$i]['attributes'])) { $products_name .= '<br /><small><i> - ' . $products[$i][$option]['products_options_name'] . ' ' . $products[$i][$option]['products_options_values_name'] . '</i></small>'; } } $products_name .= '<br>' . tep_draw_input_field('cart_quantity[]', $products[$i]['quantity'], 'style="width: 45px;"') . tep_draw_hidden_field('products_id[]', $products[$i]['id']) . ' ' . tep_draw_button(NULL, 'glyphicon glyphicon-refresh', NULL, NULL, NULL, 'btn-info btn-xs') . ' ' . tep_draw_button(NULL, 'glyphicon glyphicon-remove', tep_href_link(FILENAME_SHOPPING_CART, 'products_id=' . $products[$i]['id'] . '&action=remove_product'), NULL, NULL, 'btn-danger btn-xs'); $products_name .= '</td>'; $products_name .= ' <td align="right" valign="top"><strong>' . $currencies->display_price($products[$i]['final_price'], tep_get_tax_rate($products[$i]['tax_class_id']), $products[$i]['quantity']) . '</strong></td>' . '</tr>'; } echo $products_name; ?> </tbody> </table> <p class="text-right"><strong><?php echo SUB_TITLE_SUB_TOTAL; ?> <?php echo $currencies->format($cart->show_total()); ?></strong></p> <?php if ($any_out_of_stock == 1) { if (STOCK_ALLOW_CHECKOUT == 'true') { ?> <div class="alert alert-warning"><?php echo OUT_OF_STOCK_CAN_CHECKOUT; ?></div> <?php } else { ?> <div class="alert alert-danger"><?php echo OUT_OF_STOCK_CANT_CHECKOUT; ?></div> <?php } } ?> </div> <div class="buttonSet"> <div class="text-right"><?php echo tep_draw_button(IMAGE_BUTTON_CHECKOUT, 'glyphicon glyphicon-chevron-right', tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'), 'primary', NULL, 'btn-success'); ?></div> </div> <?php /* NIC removed to hide PayPal Express button from cart $initialize_checkout_methods = $payment_modules->checkout_initialization_method(); if (!empty($initialize_checkout_methods)) { ?> <div class="clearfix"></div> <p class="text-right"><?php echo TEXT_ALTERNATIVE_CHECKOUT_METHODS; ?></p> <?php reset($initialize_checkout_methods); while (list(, $value) = each($initialize_checkout_methods)) { ?> <p class="text-right"><?php echo $value; ?></p> <?php } } */ ?> </div> </form> <!-- NIC added shipping in cart --> <div class="row"> <?php echo $oscTemplate->getContent('shopping_cart'); ?> </div> <!-- NIC added shipping in cart --> <?php } else { ?> <div class="alert alert-danger"> <?php echo TEXT_CART_EMPTY; ?> </div> <p class="text-right"><?php echo tep_draw_button(IMAGE_BUTTON_CONTINUE, 'glyphicon glyphicon-chevron-right', tep_href_link(FILENAME_DEFAULT), 'primary', NULL, 'btn-danger'); ?></p> <?php } require(DIR_WS_INCLUDES . 'template_bottom.php'); require(DIR_WS_INCLUDES . 'application_bottom.php'); ?> Any help is gold! Cheers!
  9. cinolas

    Installing Hooks support in 2.3.4 BS GOLD

    Thanks @Jack_mcs! I installed Google Sitemap and it does what I'm looking for. Excellent. I believe I already have Header Tags SEO installed, but I will make sure, and will look at the other SEO contribs you suggested as well. Cheers!
  10. I'm running osC 2.3.4 BS GOLD on Apache/2.4.41 and php 5.6.40 (Zend: 2.6.0) Yes, I know, I should migrate to the latest community version, but my store is hugely customized and that would be a lot of work. So I'm looking to make my version work. My main goal is to get Sitelinks on my search results on google. To help google pick those up, I need to do several things: including good structured data on my site, and add a sitemap. I couldn't find a contribution that does the structured data for the schema, but I did find one that does the Sitemap: https://apps.oscommerce.com/IxdYt&sitemap-seo by @Jack_mcs Side question: Does this contribution generate the sitemap XML to submit to google? or does it only do a local sitemap page? I downloaded version 2.2 of Sitemap SEO since it was made for the 2.3.4 BS version, and that version was still supported as opposed to Sitemap SEO 2.3 where it only gives instructions for EDGE or Phoenix. I tried installing it but it gave me a broken page on product_info, presumably because the hook there didn't work. It looks like my version doesn't have the Hooks system installed. *** I don't claim to know or understand the Hooks system, I just want to make my version compatible with contributions that are Hook based. I understand just enough php and SQL to get by. Willing to learn but I'm goal oriented. So I looked into installing the hook system, since I had heard it was possible, and found this: http://multimixer.gr/30/10/2015/how-to-install-the-oscommerce-hook-system/ And this: https://apps.oscommerce.com/p9Yyp&hook-system I followed Multimixer's instructions, but there's no closing ?> in my /includes/application_top.php, and applying the instructions breaks my site. So how can I install the Hooks System in my 2.3.4 BS GOLD so that hook based contrib like Sitemap SEO works? Any other recommendations on how to get structured data on my osC, or sitelinks in my search engine results are greatly appreciated
  11. cinolas

    QTPro BS

    Even if I just set "Display table with stock information" it doesn't display the table.
  12. cinolas

    QTPro BS

    I mean I have all these settings set to correctly, but it's not happening the way it should. The settings are ignored.
  13. cinolas

    QTPro BS

    Thanks @raiwa, though all I'm seeing in your post is this: Show Out of Stock Attributes: Prevent Adding Out of Stock to Cart: Display Out of Stock Message Line:
  14. cinolas

    QTPro BS

    I'm having a problem with QTPro (on osC 2.34 BS Gold) where the attributes show in the drop down even though there is no stock. In fact, none of the options in Configuration > Prod Info (QTPro) seem to have an effect. Is this a known symptom for something? Anyone even seen that? Where should I dig to find the problem? Once in the cart it does show out of stock, and prevents checkout, but it's annoying for our customers to get this far only to find out there's no stock. Everything else seems to be working fine as far as I can tell. Any clues are greatly appreciated. Cheers!
×