Jump to content

Winterburn

Members
  • Content count

    35
  • Joined

  • Last visited

  1. I've got it. It was something in this code that was not returning any value: add the products model to the breadcrumb trail if (isset($HTTP_GET_VARS['products_id'])) { $model_query = tep_db_query("select products_model from " . TABLE_PRODUCTS . " where products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "'"); if (tep_db_num_rows($model_query)) { $model = tep_db_fetch_array($model_query); $breadcrumb->add($model['products_model'], tep_href_link(FILENAME_PRODUCT_INFO, 'cPath=' . $cPath . '&products_id=' . $HTTP_GET_VARS['products_id'])); } } The array_flip happens when I don't specify a product model for my products, thus making the final content of the breadcrumb null. I've replaced it with products name instead: // add the products name to the breadcrumb trail if (isset($HTTP_GET_VARS['products_id'])) { $model_query = tep_db_query("select products_name from " . TABLE_PRODUCTS_DESCRIPTION . " where products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "'"); if (tep_db_num_rows($model_query)) { $model = tep_db_fetch_array($model_query); $breadcrumb->add($model['products_name'], tep_href_link(FILENAME_PRODUCT_INFO, 'cPath=' . $cPath . '&products_id=' . $HTTP_GET_VARS['products_id'])); } } and the warning disappeared. However, my breadcrumb looks terrible: Top » Home » Apparel » Men's Apparel » Organic T-Shirt » Organic T-Shirt since the breadcrumb was forcibly added. So I dug deeper and found this on catalog/product_info.php: <?php echo tep_draw_title_top();?> <div class="left_part"><?php echo $breadcrumb->trail(' » ')?> » <?php echo $products_name; ?></div><div class="right_part"><?php echo $products_price2; ?></div> <?php echo tep_draw_title_bottom();?> I just removed the » <?php echo $products_name; ?> part and the breadcrumb was fixed. Hope this helps for those who are having array_flip problems on KissMT!
  2. Hi, Rob. I have used print_r to print the contents of KissMT::init()->retrieve( 'breadcrumb' ). I've come up with this Array when I click a TShirt for men: Array ( [0] => [1] => Men's Apparel [2] => Apparel ) The reason for [0] not having any values must've been because I commented out the following on application_top.php: $breadcrumb->add(HEADER_TITLE_TOP, HTTP_SERVER); Is this the right reason, and is it affecting my breadcrumb trail? I've checked and [0] has a null value, causing array_flip to have a warning. EDIT: since the array is reversed, I think there's no issue with the above code being commented. I think the main issue here is that I don't get the product name on my breadcrumb (that's suppose to be held on index 0 of the breadcrumb array). I'll look around to see if I can find something. However, your help will be much appreciated. :)
  3. Winterburn

    ULTIMATE Seo Urls 5 - by FWR Media

    Hi, Chris. I have encountered this error today and with some digging, I was able to find out how to solve it. 1. Check what your FILENAME_NEW_PRODUCTS is. (mine is new_products.php under catalog/includes/modules/new_products.php). 2. Find occurrences of these two: tep_href_link('product_info.php?products_id='.$p_id) tep_href_link("products_new.php","action=buy_now&products_id=".$p_id) and replace them with this: tep_href_link( FILENAME_PRODUCT_INFO, 'products_id=' . $p_id ) tep_href_link( FILENAME_PRODUCTS_NEW, 'action=buy_now&products_id=' . $p_id ) Your 'Details' button will then have the right linking. I also suggest that you do that for all product_info occurrences on the website. You can search the site for such occurrences by having SSH access and going to your catalog folder (e.g. ~/public_html/store) and typing the following command: grep -r "product_info.php" . | cut -f1 -d':' | uniq This will show you the files that needs editing. I think it's standard practice to use tep_href_link as it is suggested by osC, with the format <filename, parameters> and not <filename?parameter1=value.. >.
  4. I've checked my application_top.php and that code snippet is listed. I've checked my site again, and it seems that on the products where the array_flip warning exists, they were gone. I've tried uploading a new product and that same error exists. However, when I refresh the page, the array_flip warning is gone. I have USU5 installed. I think it now has something to do with the caching of KissMT. I asked another guy to browse the site and the array_flip warning was visible on his session as well.
  5. I have a question regarding the product_info.php on KissMT modules dir. I always have this array_flip() error : array_flip() [function.array-flip]: Can only flip STRING and INTEGER values! in /home/store/public_html/store/includes/modules/kiss_meta_tags/modules/product_info.php on line 41 Line 41 is this: $breadcrumb = array_flip( KissMT::init()->retrieve( 'breadcrumb' ) ); I figured that it has something to do about breadcrumbs, since my store/product_info.php has no $breadcrumb included in it. Am I right? How should I fix this error? Your reply would be much appreciated. Thanks!
  6. Hello, everyone. I'm having troubles showing the Shipping Tax field during the checkout procedure. I created a "new" shipping method using a copy of table.php (renamed it as tableprov.php, changed change configuration values of install() procedure to TABLE_PROV accordingly). Basically, the new tableprov works. It uses the weight method, with a variable table rate that is being queried on a different table on the database. However, this new shipping method (provincial table rate) is not an option on the checkout_shipping.php. I've edited phps so that when the delivery address is on the one listed on a province, the table rate that will be loaded is the provincial one (hence, tableprov.php will be loaded). I have successfully integrated it, however, on the part where I have to confirm checkout, I don't see the shipping tax on the computation of the total. This happens when the address is marked as provincial (hence tableprov.php is the one loaded, not table.php). However, once I check out the product, the shipping tax reflects on the orders_total table. I have been trying this for a week now, I'm now being pointed to this part: if (tep_not_null($order->info['shipping_method'])) { if ($GLOBALS[$module]->tax_class > 0) { // CHECK COMMENTS BELOW $shipping_tax = tep_get_tax_rate($GLOBALS[$module]->tax_class, $order->delivery['country']['id'], $order->delivery['zone_id']); $shipping_tax_description = tep_get_tax_description($GLOBALS[$module]->tax_class, $order->delivery['country']['id'], $order->delivery['zone_id']); $order->info['tax'] += tep_calculate_tax($order->info['shipping_cost'], $shipping_tax); $order->info['tax_groups']["$shipping_tax_description"] += tep_calculate_tax($order->info['shipping_cost'], $shipping_tax); $order->info['total'] += tep_calculate_tax($order->info['shipping_cost'], $shipping_tax); if (DISPLAY_PRICE_WITH_TAX == 'true') $order->info['shipping_cost'] += tep_calculate_tax($order->info['shipping_cost'], $shipping_tax); } $this->output[] = array('title' => $order->info['shipping_method'] . ':', 'text' => $currencies->format($order->info['shipping_cost'], true, $order->info['currency'], $order->info['currency_value']), 'value' => $order->info['shipping_cost']); } When the $GLOBALS[$module] being used is tableprov.php, the variables are not passed (tax_class, code, title, etc.)
  7. Hello, everyone. I would like to totally eradicate the part where a default osCommerce template chooses between 3 difference language settings (english, espanol, german) and want to use English instead. I live in Asia, and our main language is English. I think it would add up to the coding on our part if we were say, to add 5 additional php files and yet we have to worry about the coding. In addition, we have already deleted define_languages.php which may render the language selection obsolete? I really don't know. I just wanna know how to totally delete other language settings.
×