Jump to content

jackhill

Members
  • Content count

    37
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by jackhill

  1. You didn't add the correct callback URI Go to your facebook app and click Settings -> Advanced Enter the callback URI under "Valid OAuth redirect URIs" http://your_site/your_folder/login_with_facebook.php Click Save Changes at the bottom
  2. Here you go <?php /* * login_with_facebook.php * * Modified for ezSocial contrib for osCommerce by Christopher Trigg Jan 2015 * * @(#) $Id: login_with_facebook.php,v 1.3 2013/07/31 11:48:04 mlemos Exp $ * */ require('ezsocial/settings.php'); require('ezsocial/functions.php'); require('ezsocial/http.php'); require('ezsocial/oauth_client.php'); $ezsocial_uri = $ezsocial_protocol.$_SERVER['HTTP_HOST'].dirname(strtok($_SERVER['REQUEST_URI'],'?')); if(substr($ezsocial_uri, -1) != '/') $ezsocial_uri .= '/'; $ezsocial_uri .= 'login_with_facebook.php'; $client = new oauth_client_class; $client->debug = false; $client->debug_http = false; $client->display = "popup"; $client->server = 'Facebook'; $client->redirect_uri = $ezsocial_uri; $client->client_id = $ezsocial_facebook_client_id; $client->client_secret = $ezsocial_facebook_client_secret; $client->scope = 'email'; if(($success = $client->Initialize())) { if(($success = $client->Process())) { if(strlen($client->access_token)) { $success = $client->CallAPI( 'https://graph.facebook.com/me', 'GET', array( 'fields'=>'first_name,last_name,gender,email' ), array('FailOnAccessError'=>true), $user); } } $success = $client->Finalize($success); } if($client->exit) exit; if($success) { if($ezsocial_debug_uri) { echo("REDIRECT URI: ".$ezsocial_uri); exit(); } if($ezsocial_debug_errors) { error_log("ezSocial: Provider data: ".print_r($user,true)); } require('includes/application_top.php'); if(isset($user->email) && (strlen($user->email) > 3)) $email = $user->email; else { echo "Facebook Social Login Error:"."\n"; echo $ezsocial_email_missing; exit(); } if(isset($user->first_name) && (strlen($user->first_name) > 0)) $first = $user->first_name; else $first = 'Unknown'; if(isset($user->last_name) && (strlen($user->last_name) > 0)) $last = $user->last_name; else $last = 'Unknown'; if(isset($user->gender) && (strlen($user->gender) > 0)) $gender = $user->gender; else $gender = 'Unknown'; if($gender == 'male') $gender = 'm'; else if($gender == 'female') $gender = 'f'; $ezsocial_t = (string) ceil(time()/60); $ezsocial_data = 'ezsocial|'.$ezsocial_t.'|facebook|'.$first.'|'.$last.'|'.$gender.'|'.$email; $ezsocial_hash = mc_encrypt($ezsocial_data, ezsocial_get_key()); tep_redirect('ezsocial_success.php?login='.$ezsocial_hash); } else { echo "Social Login Failure, please go back and try again"; } ?> Make sure you have the latest version of EZSocial installed
  3. Guys, I did it!! Facebook social login finally working :thumbsup: Edit login_with_facebook.php and replace the "GET array" line under 'https://graph.facebook.com/me' with the following 'GET', array( 'fields'=>'first_name,last_name,gender,email' ), array('FailOnAccessError'=>true), $user);
  4. In your Facebook App Settings, make sure you have a contact email address under "Settings > Basic", then enable your app in "Status & Review" That will get your customers to the facebook authorize screen, but pressing "Okay" displays the following error "Facebook Social Login Error: Social Login was unable to get your email address Please either sign up normally, use another social provider login or re-enable email authorization for this website" This is the string that gets passed back to my site before failing. login_with_facebook.php?code=AQBIC_5QjXElifxxI0Yl4kWAXBEu30L0AvQa0zCyjWDM6CP-OGcSyt9AL7NiSFDdWh4lQJpcuUnMceXjTBCqYkioyTXHEduYBcK3voLsESkV6aaEKUaaXzSYDTqQUbeGAEIrAvFytnIbobKvMGSKhKCOUWl-eqsZLC1YaOan5xWf53FhEKubdvqAnbEWHK9d3gzFq7LV2CLZw46v2zqOe37aIAcgfn4RPnSKjjx8toP3JWnNWEdNqBbQiVUnzmpxhzDiWaDg94VHOqnGvzDUnVpBT140FRhayXvh9SoXTvmdBtKix6G7VaSCvh36fV0lsR8V4zLuxJfVzvwtFJ1nGxGM&state=1443251028-3599a5#_=_ Anyone know how to fix it? All other providers working fine BIG thanks to stylesoft for this great contribution
  5. jackhill

    CONTRIBUTION Product Tabs

    I believe my issues are caused by the heavy css changes going on in the product info page I managed to get my tabs to show by copying the #description "if" line and modifying it to show PRODUCTS_TAB_1, but none of the content will show in the tab, it shows just below the description block Any experts here willing to help me out? Here is my product_info.php page Everything else works perfectly. It's just the product_info.php changes that don't Thanks very much <?php /* $Id$ 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 (!isset($HTTP_GET_VARS['products_id'])) { tep_redirect(tep_href_link(FILENAME_DEFAULT)); } require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_PRODUCT_INFO); $current_page = FILENAME_PRODUCT_INFO; $product_check_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'"); $product_check = tep_db_fetch_array($product_check_query); require(DIR_WS_INCLUDES . 'template_top.php'); $ndate = strftime("%Y-%m-%d",strtotime('-'.PRODUCT_MAX_AGE.' days')); // set max age of displayed product ?> <?php echo tep_draw_content_top();?> <?php if ($product_check['total'] < 1) { ?> <?php echo tep_draw_title_top();?> <h2><?php echo TEXT_PRODUCT_NOT_FOUND; ?></h2> <?php echo tep_draw_title_bottom();?> <div class="contentContainer"> <div class="contentBlock"> <div class="buttonSet"> <span class="fl_right"><?php echo tep_draw_button1_top();?><?php echo tep_draw_button(IMAGE_BUTTON_CONTINUE, 'triangle-1-e', tep_href_link(FILENAME_DEFAULT)); ?><?php echo tep_draw_button1_bottom();?></span> </div> </div> </div> <?php } else { $product_info_query = tep_db_query("select p.products_id, pd.products_name, pd.products_description, p.products_model, p.products_quantity, p.products_image, pd.products_url, p.products_price, p.products_tax_class_id, p.products_date_added, p.products_date_available, p.manufacturers_id, p.products_ordered from " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m on (p.manufacturers_id = m.manufacturers_id), " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'"); $product_info = tep_db_fetch_array($product_info_query); $tags_query_raw = tep_db_query("select pt.tag_id, t.tag_text from " . TABLE_TAGS . " t, " . TABLE_PRODUCTS_TAGS . " pt where pt.products_id = '" . (int)$product_info['products_id'] . "' and t.tag_id = pt.tag_id and t.language_id = '" . (int)$languages_id . "'"); $tags = ''; $caount = 0; $label_featured = PROD_INFO_PAGE_SHOW_FEATURED_LABEL; $topsellers_max = (TOPSELLERS_MAX-1); while ($tag = tep_db_fetch_array($tags_query_raw)) { if ($caount != 0) $tags .= ' '; $tags .= '<li><a href="' . tep_href_link(FILENAME_TAG_PRODUCTS) .'?id_tag='.$tag['tag_id'].'">'.$tag['tag_text'].'</a></li>'; $caount++; } tep_db_query("update " . TABLE_PRODUCTS_DESCRIPTION . " set products_viewed = products_viewed+1 where products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and language_id = '" . (int)$languages_id . "'"); $featured_query = tep_db_query("select status, products_id from " . TABLE_FEATURED . " where products_id = '" . (int)$product_info['products_id'] . "'"); $featured_product = tep_db_fetch_array($featured_query); if ($label_featured == 'Show') { $lang = tep_db_fetch_array(tep_db_query("select name, code, languages_id from " . TABLE_LANGUAGES . " where languages_id = '" . (int)$languages_id . "'")); $color = $lang['code']; $topsellers = tep_db_fetch_array(tep_db_query("SELECT products_ordered, products_id FROM " . TABLE_PRODUCTS . " ORDER BY products_ordered DESC LIMIT ".TOPSELLERS_MAX."")); $_top = $topsellers['products_ordered']; $products_date_added = date_format(date_create($product_info['products_date_added']), 'Y-m-d'); $p_new = ($products_date_added > $ndate ? '<div class="new_label '.$color.'"><strong>'.LABEL_NEW.'</strong></div>' : ''); $p_featured = (($featured_product['status']) ? '<div class="featured_label '.$color.'"><strong>'.LABEL_FEATURED.'</strong></div>' : ''); $p_topsellers = ($product_info['products_ordered'] <= $_top && $product_info['products_ordered'] >= $_top - $topsellers_max ? '<div class="top_label '.$color.'"><strong>'.LABEL_TOPSELLERS.'</strong></div>' : ''); $p_label = ($p_featured ? $p_featured.$p_topsellers : ($p_new ? $p_new.$p_topsellers : $p_topsellers)); } if ($new_price = tep_get_products_special_price($product_info['products_id'])) { $products_price = '<del>' . $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) . '</del> <span class="productSpecialPrice">' . $currencies->display_price($new_price, tep_get_tax_rate( $product_info['products_tax_class_id'])) . '</span>'; $persent = ($currencies->display_sale_percent($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id']), $new_price) * -1); $sale_percent = ((PROD_INFO_PAGE_SHOW_SPECIALS_LABEL == 'Show') ? '<div class="sale_percent '.$color.'"><strong>'.$persent.'%</strong></div>' : ''); } else { $new_price = $product_info['products_price']; $products_price = '<span class="productSpecialPrice">' . $currencies->display_price($new_price, tep_get_tax_rate($product_info['products_tax_class_id'])) . '</span>'; $sale_percent = ''; } $products_name = $product_info['products_name'] . ''; echo tep_draw_form('cart_quantity', tep_href_link(FILENAME_PRODUCT_INFO, tep_get_all_get_params(array('action')) . 'action=add_product')); ?> <div class="contentContainer page_products_info"> <div class="contentBlock"> <div id="product_info" class="row"> <div class="span3"> <?php if (tep_not_null($product_info['products_image'])) { $pi_query = tep_db_query("select image, htmlcontent from " . TABLE_PRODUCTS_IMAGES . " where products_id = '" . (int)$product_info['products_id'] . "' order by sort_order"); if (tep_db_num_rows($pi_query) > 0) { ?> <div id="piGal"> <ul class="relative"> <?php $pi_counter = 0; while ($pi = tep_db_fetch_array($pi_query)) { $pi_counter++; $pi_entry = ' <li class="wrapper_pic_div"> '.$p_label . "\n". ' '.$sale_percent . "\n". ''; if (tep_not_null($pi['htmlcontent'])) { if (substr($pi['htmlcontent'], 0, 1) == '<') { $pi_href1 = '#piGalimg_' . $pi_counter; }else{ $pi_href2 = tep_href_link(DIR_WS_IMAGES . $pi['image'], '', 'NONSSL', false); } } if (tep_not_null($pi['htmlcontent'])) { if (substr($pi['htmlcontent'], 0, 1) == '<') { $pi_entry .= '<div class="product_pic_wrapper"><a class="product_pic" style="height:'.PROD_INFO_IMAGE_HEIGHT.'px" href="'.$pi_href1.'" target="_blank" data-rel="fancybox">' . tep_image(DIR_WS_IMAGES . $pi['image'], $pi['htmlcontent'], (PROD_INFO_IMAGE_WIDTH), (PROD_INFO_IMAGE_HEIGHT), '', ' class="img"') . '<div class="pic_zoom"></div></a></div>'; $pi_entry .= '<div style="display: none;"><div id="piGalimg_' . $pi_counter . '">' . $pi['htmlcontent'] . '</div></div>'; }else{ $pi_entry .= '<div class="product_pic_wrapper"><a class="product_pic" style="height:'.PROD_INFO_IMAGE_HEIGHT.'px" href="'.$pi_href2.'" target="_blank" data-rel="fancybox" title="' . $pi['htmlcontent'] . '">' . tep_image(DIR_WS_IMAGES . $pi['image'], $pi['htmlcontent'], (PROD_INFO_IMAGE_WIDTH), (PROD_INFO_IMAGE_HEIGHT), '', ' class="img"') . '<div class="pic_zoom" style="width:'.(PROD_INFO_IMAGE_WIDTH).'px;height:'.(PROD_INFO_IMAGE_HEIGHT).'px;"></div></a></div>'; $pi_entry .= '<div style="display: none;"><div id="piGalimg_' . $pi_counter . '">' . $pi['htmlcontent'] . '</div>'; } }else{ $pi_href3 = tep_href_link(DIR_WS_IMAGES . $pi['image'], '', 'NONSSL', false); $pi_entry .= '<div class="product_pic_wrapper"><a class="product_pic" style="height:'.PROD_INFO_IMAGE_HEIGHT.'px" href="'. $pi_href3.'" target="_blank" data-rel="fancybox" title="' . $pi['htmlcontent'] . '"> ' . tep_image(DIR_WS_IMAGES . $pi['image'], '', (PROD_INFO_IMAGE_WIDTH), (PROD_INFO_IMAGE_HEIGHT), '', ' class="img"') . '<div class="pic_zoom" style="width:'.(PROD_INFO_IMAGE_WIDTH).'px;height:'.(PROD_INFO_IMAGE_HEIGHT).'px;"></div></a></div>'; } $pi_entry .= '</li>'; echo $pi_entry; } ?> </ul> </div> <?php $coeff =((PROD_INFO_IMAGE_WIDTH != PROD_INFO_IMAGE_HEIGHT) ? PROD_INFO_IMAGE_HEIGHT / PROD_INFO_IMAGE_WIDTH : 1); ?> <script type="text/javascript"> $(function(){ var myWidth = <?php echo (($pi_counter > 1) ? '68' : '0'); ?>; var myHeight = myWidth * <?php echo $coeff;?>; $('#piGal ul').bxGallery({ maxwidth: '<?php echo (PROD_INFO_IMAGE_WIDTH); ?>', maxheight: '<?php echo (''); ?>', thumbwidth: myWidth, thumbheight: myHeight, thumbcontainer: <?php echo (PROD_INFO_IMAGE_WIDTH + 5); ?>, load_image: 'ext/jquery/bxGallery/spinner.gif' }) }); </script> <?php } else { if (tep_not_null($product_info['products_image'])) { $pi_href4 = tep_href_link(DIR_WS_IMAGES . $product_info['products_image'], '', 'NONSSL', false); ?> <div class="hover"> <?php echo '<div id="piGal" class="wrapper_pic_div fl_left" style="width:'.(PROD_INFO_IMAGE_WIDTH +10).'px;"><div class="product_pic_wrapper"><a class="product_pic" style="height:'.PROD_INFO_IMAGE_HEIGHT.'px;" href="' . tep_href_link(DIR_WS_IMAGES . $product_info['products_image']) . '" target="_blank" data-rel="fancybox">' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], addslashes($product_info['products_name']), (PROD_INFO_IMAGE_WIDTH), (PROD_INFO_IMAGE_HEIGHT), ''). '<div class="pic_zoom" style="width:'.(PROD_INFO_IMAGE_WIDTH).'px;height:'.(PROD_INFO_IMAGE_HEIGHT).'px;"></div></a></div></div>'; ?> </div> <?php } } echo '<script type="text/javascript"> $("#piGal a[data-rel^=\'fancybox\']").fancybox({ cyclic: true }); </script>'; } if (($oscTemplate->hasBlocks('box_info_page'))) { $width_ext = PROD_INFO_IMAGE_WIDTH;?> <div class="bookmarks"><?php echo $oscTemplate->getBlocks('box_info_page');?></div><br><?php } ?> </div> <div class="span6"> <div class="info"> <?php if ($product_check['total'] >= 1) { include (DIR_WS_INCLUDES . 'products_next_previous.php'); } ?> <div> <?php if ($product_info['products_date_available'] > date('Y-m-d H:i:s')) { ?> <div class="data data_padd small_title"><?php echo sprintf(TEXT_DATE_AVAILABLE, tep_date_long($product_info['products_date_available'])); ?></div> <?php }else{ ?> <div class="data data_padd small_title"><?php echo sprintf(TEXT_DATE_ADDED, tep_date_long($product_info['products_date_added'])); ?></div> <?php } ?> <h1 class="name"><?php echo $products_name; ?></h1> <?php echo ((tep_not_null($product_info['products_model'])) || (tep_not_null($manufacturers_info['manufacturers_name'])) || (tep_not_null($product_info['products_weight'])) ? '<div class="listing"><table>' : ''); if (tep_not_null($product_info['products_model'])) { ?> <tr> <td class="td_left"><?php echo ''.MODEL. '';?></td> <td class="td_right"><?php echo '' . $product_info['products_model'] . ''; ?></td> </tr> <?php } $manufacturer_info_query = tep_db_query("select manufacturers_name from " . TABLE_MANUFACTURERS . " where manufacturers_id = " . $product_info['manufacturers_id'] ); $manufacturers_info = tep_db_fetch_array($manufacturer_info_query); if (tep_not_null($manufacturers_info['manufacturers_name'])) { ?> <tr> <td class="td_left"><?php echo ''.MANUFACTURER. '';?></td> <td class="td_right"><?php echo '' . $manufacturers_info['manufacturers_name'] . ''; ?></td> </tr> <?php } if (tep_not_null($product_info['products_weight'])) { ?> <tr> <td class="td_left"><?php echo ''.WEIGTH. '';?></td> <td class="td_right"><?php echo '' . $product_info['products_weight'] . ''; ?></td> </tr> <?php } // START: Extra Fields Contribution v2.0b - mintpeel display fix $extra_fields_query = tep_db_query(" SELECT pef.products_extra_fields_order, pef.products_extra_fields_status as status, pef.products_extra_fields_name as name, ptf.products_extra_fields_value as value FROM ". TABLE_PRODUCTS_EXTRA_FIELDS ." pef LEFT JOIN ". TABLE_PRODUCTS_TO_PRODUCTS_EXTRA_FIELDS ." ptf ON ptf.products_extra_fields_id=pef.products_extra_fields_id WHERE ptf.products_id=". (int)$HTTP_GET_VARS['products_id'] ." and ptf.products_extra_fields_value<>'' and (pef.languages_id='0' or pef.languages_id='".(int)$languages_id."') ORDER BY pef.products_extra_fields_order"); while ($extra_fields = tep_db_fetch_array($extra_fields_query)) { if (! $extra_fields['status']) // show only enabled extra field continue; ?> <tr> <td class="td_left"><?php echo $extra_fields['name'];?></td> <td class="td_right"><?php echo stripslashes($extra_fields['value']); ?></td> </tr> <?php } // END: Extra Fields Contribution - mintpeel display fix ?> <tr> <td class="td_left"><?php echo ''.PRICE. '';?></td> <td class="td_right"><?php echo $products_price; ?></td> </tr> <?php echo ((tep_not_null($product_info['products_model'])) || (tep_not_null($manufacturers_info['manufacturers_name'])) || (tep_not_null($product_info['products_weight'])) ? '</table></div>' : ''); $products_attributes_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id='" . (int)$HTTP_GET_VARS['products_id'] . "' and patrib.options_id = popt.products_options_id and popt.language_id = '" . (int)$languages_id . "'"); $products_attributes = tep_db_fetch_array($products_attributes_query); if ($products_attributes['total'] > 0) { //++++ QT Pro: Begin Changed code $products_id=(preg_match("/^\d{1,10}(\{\d{1,10}\}\d{1,10})*$/",$HTTP_GET_VARS['products_id']) ? $HTTP_GET_VARS['products_id'] : (int)$HTTP_GET_VARS['products_id']); require(DIR_WS_CLASSES . 'pad_' . PRODINFO_ATTRIBUTE_PLUGIN . '.php'); $class = 'pad_' . PRODINFO_ATTRIBUTE_PLUGIN; $pad = new $class($products_id); echo $pad->draw(); } //Display a table with which attributecombinations is on stock to the customer? if(PRODINFO_ATTRIBUTE_DISPLAY_STOCK_LIST == 'True'): require(DIR_WS_MODULES . "qtpro_stock_table.php"); endif; //++++ QT Pro: End Changed Code ?> </div> <?php $reviews_query = tep_db_query("select count(*) as count from " . TABLE_REVIEWS . " where products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and reviews_status = 1"); $reviews = tep_db_fetch_array($reviews_query); ?> <div class="buttonSet"> <span class="buttonAction"><?php echo tep_draw_button1_top();?><?php echo tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_draw_button(IMAGE_BUTTON_IN_CART, 'cart', null, 'primary'); ?><?php echo tep_draw_button1_bottom();?></span> <div class="fl_left"><?php echo tep_draw_button2_top();?><?php echo tep_draw_button(IMAGE_BUTTON_REVIEWS . (($reviews['count'] > 0) ? ' (' . $reviews['count'] . ')' : ''), 'comment', tep_href_link(FILENAME_PRODUCT_REVIEWS, tep_get_all_get_params())); ?><?php echo tep_draw_button2_bottom();?></div> </div> </div> </div> </div> </div> </div> </form> <?php echo tep_draw_content_bottom(); echo ''; ?> <?php $title_also_purchas = false; if (ALSO_PURCHASED_MODUL_DISPLAY == 'Show') { if ((USE_CACHE == 'true') && empty($SID)) { echo tep_cache_also_purchased(3600); } else { if (isset($HTTP_GET_VARS['products_id'])) { $orders_query2 = tep_db_query("select p.products_id, p.products_image, p.products_price, p.products_date_added, p.products_last_modified, pd.products_description, p.products_tax_class_id from " . TABLE_ORDERS_PRODUCTS . " opa, " . TABLE_ORDERS_PRODUCTS . " opb, " . TABLE_ORDERS . " o, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS . " p 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 opa.products_id = pd.products_id and p.products_status = '1' group by p.products_id order by o.date_purchased desc limit " . ALSO_PURCHASED_MODUL_MAX_DISPLAY); $num_products_ordered2 = tep_db_num_rows($orders_query2); if ($num_products_ordered2 >= ALSO_PURCHASED_MODUL_MIN_DISPLAY) { $title_also_purchas = true; } }} }else{ $title_also_purchas = false; } /* *********************************** */ if (defined('RELATED_PRODUCTS_MAX_DISP')) { $orderBy = 'ORDER BY '; $orderBy .= (RELATED_PRODUCTS_RANDOMIZE)?'rand()':'pop_order_id, pop_id'; $orderBy .= (RELATED_PRODUCTS_MAX_DISP)?' limit ' . RELATED_PRODUCTS_MAX_DISP:''; $attributes = " SELECT pop_products_id_slave, products_name, pa.products_description, products_price, products_model, products_price, products_quantity, products_tax_class_id, products_image FROM " . TABLE_PRODUCTS_RELATED_PRODUCTS . ", " . TABLE_PRODUCTS_DESCRIPTION . " pa, ". TABLE_PRODUCTS . " pb WHERE pop_products_id_slave = pa.products_id AND pa.products_id = pb.products_id AND language_id = '" . (int)$languages_id . "' AND pop_products_id_master = '".$HTTP_GET_VARS['products_id']."' AND products_status='1' " . $orderBy; $attribute_query = tep_db_query($attributes); $title_related = ((mysqli_num_rows($attribute_query)>0) ? 1 : 0); } /* *********************************** */ if (isset($HTTP_GET_VARS['products_id'])) { $random2_select_id = " and p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "'"; } $random2_select_rid = " ORDER BY RAND() limit " . (REVIEWS_BOX_MULTY_MAX_DISPLAY); $random2_select = tep_db_query("select r.reviews_id, r.reviews_rating, r.date_added, p.products_id, p.products_image, p.products_price, p.products_tax_class_id, pd.products_name, s.specials_new_products_price, r.customers_name from " . TABLE_REVIEWS . " r, " . TABLE_REVIEWS_DESCRIPTION . " rd, " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = r.products_id and r.reviews_id = rd.reviews_id and rd.languages_id = '" . (int)$languages_id . "' and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' and r.reviews_status = 1". $random2_select_id . $random2_select_pid . $random2_select_rid); $random2_product = tep_db_fetch_array($random2_select); $title_relviews = (($random2_product) ? true : false); /* *********************************** */ if ((ALSO_PURCHASED_MODUL_DISPLAY == 'Show' && $title_also_purchas) || ($title_related) || ($tags != '') || ($product_info['products_description'] != '')) { echo '<div id="tabvanilla_pinfo" class="widget"> <script type="text/javascript"> $(document).ready(function(){ var mq2 = window.matchMedia( "(min-width: 470px)" ); if (mq2.matches) { var li = (document.getElementById(\'tabnav\').getElementsByTagName(\'li\').length); $(\'#tabnav li\').css(\'width\', 100 / li - 0+\'%\'); } else { // window width is less than 500px var li = (document.getElementById(\'tabnav\').getElementsByTagName(\'li\').length); $(\'#tabnav li\').css(\'width\', \'100%\'); } }); </script> <ul class="tabnav" id="tabnav">'; if ($product_info['products_description'] != '') { echo ' <li><a href="#description"><strong class="title_wrapper"><strong class="title_inner"><span class="title-icon"></span>'.TEXT_DESCRIPTION.'</strong></strong></a></li>'; } if ($title_also_purchas == true) { echo ' <li><a href="#also_purchase"><strong class="title_wrapper"><strong class="title_inner"><span class="title-icon"></span>'.TEXT_ALSO_PURCHASED_PRODUCTS.'</strong></strong></a></li>'; } if ($title_related) { echo ' <li><a href="#related"><strong class="title_wrapper"><strong class="title_inner"><span class="title-icon"></span>'.TEXT_RELATED_PRODUCTS.'</strong></strong></a></li>'; } if ($oscTemplate->hasBlocks('box_toogle_pos_22') && $title_relviews) { echo ' <li><a href="#box_toogle_pos_22"><strong class="title_wrapper"><strong class="title_inner"><span class="title-icon"></span>'.MODULE_BOXES_MULTY_REVIEWS_BOX_TOOGLE.'</strong></strong></a></li>'; } if ($tags != '') { echo ' <li><a href="#tags"><strong class="title_wrapper"><strong class="title_inner"><span class="title-icon"></span>'.TAGS_PRODUCT.'</strong></strong></a></li>'; } echo '</ul>'; if ($product_info['products_description'] != '') { echo ' <div id="description"><div class="description">'.stripslashes($product_info['products_description']).'</div></div>'; } if (ALSO_PURCHASED_MODUL_DISPLAY == 'Show') { if ((USE_CACHE == 'true') && empty($SID)) { echo tep_cache_also_purchased(3600); } else { echo '<div id="also_purchase" class="tabdiv">'; echo tep_draw_fpage_content_top(); include(DIR_WS_MODULES . FILENAME_ALSO_PURCHASED_PRODUCTS); echo tep_draw_fpage_content_bottom(); echo '</div>'; } } //Optional Related Products (ORP) if ($title_related) { echo '<div id="related" class="tabdiv">'; echo tep_draw_fpage_content_top(); include(DIR_WS_MODULES . FILENAME_RELATED_PRODUCTS); echo tep_draw_fpage_content_bottom(); echo '</div>'; } //ORP: end if ($oscTemplate->hasBlocks('box_toogle_pos_22') && $title_relviews) { echo '<div id="box_toogle_pos_22" class="tabdiv">'.$oscTemplate->getBlocks('box_toogle_pos_22').'</div>'; } if ($tags != '') { echo '<div id="tags" class="tabdiv infoBoxContainer">'; echo tep_draw_fpage_content_top().'<div class="tags"><div class="infoBoxContents"><ul>'.$tags.'</ul></div></div>'; echo tep_draw_fpage_content_bottom(); echo '</div>'; } echo '</div>'; } } ?> <?php require(DIR_WS_INCLUDES . 'template_bottom.php'); require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>
  6. jackhill

    CONTRIBUTION Product Tabs

    Hi everyone I'm trying to install this addon on a responsive themed 2.3.3.4 store, and everything works except the tabs in the product info page The instructions suggest I comment out "echo stripslashes" in product_info.php, but mine looks different This is what I have if ($product_info['products_description'] != '') { echo ' <div id="description"><div class="description">'.stripslashes($product_info['products_description']).'</div></div>'; } Could this section of code be the reason I don't see any of my tabs in the product info page? Thank you
  7. Dr. Rolex, you oscommerce genius! :) I've been meaning to make contact since you released your last ajax update. Thanks very much for both of these new addons, I'll be installing and testing on my development site tonight
  8. jackhill

    [Addon} Superfish Categories Box

    Hi Does anyone know how to add category hover over images with this Superfish addon? Thanks
  9. jackhill

    [Addon} Superfish Categories Box

    Hi I finally got superfish working and wanted to know if there is a way to add category and sub category hover over images Something like on this site -> http://www.takealot.com/ Thanks
  10. This looks amazing! Well done Really looking forward to the release and will gladly help test pre-releases on my dev site
  11. jackhill

    [Addon} Superfish Categories Box

    Hi Jim, got it to work :) Not sure if they were supposed to be in my module/boxes folders but removing language.php and currency.php fixed the issue language and currency were the only two modules that didn't start with bm_ so I'm guessing (hoping) they were in the wrong place Thanks for your help
  12. jackhill

    [Addon} Superfish Categories Box

    Thanks, will attempt this tonight
  13. jackhill

    [Addon} Superfish Categories Box

    Hi Jim, The accordion addon works fine, it's just the superfish one that has a problem with language Something else I noticed is that the module I've selected before I choose the Superfish one throws the error, i.e. If I was on "Facebook All Activity" and then selected Superfish Categorories Box, the error in my www logs will reference bm_fball_activity See below PHP Fatal error: include(): Cannot redeclare class language in /mywebfolder/includes/languages/english/modules/boxes/languages.php on line 17, referer: http://mywebaddress/admin/modules.php?set=boxes&list=new&module=bm_fball_activity Hope that helps? Thanks so much
  14. jackhill

    [Addon} Superfish Categories Box

    Hi Jim, Thanks for this addon. Unfortunately I have the "Cannot redeclare class language" issue :( A quick fix to get it to install is to remove ALL modules from the "includes/modules/boxes" directory. I did a quick comparison of the accordion categories addon and noticed that you don't build a language array but in Superfish you do. Does anyone have a suggestion of where I can look or what I can remove to fix this issue? My shop isn't heavily modified, I've only installed modular front page, accordion categories, product tabs and info box Thanks
  15. Thanks, I'll give that a try :) ps - do you freelance??
  16. Hi Dr. Rolex I'm almost ready to promote the Dynamic Checkout changes to my live store but IE8 doesn't work correctly; Other "style" changes I've applied don't work in IE8 so it's not your code Any suggestions how to make older browsers more compatible? Thanks so much
  17. It's working!!! :thumbsup: Thanks so much, you've taken my website to a new level of awesomeness! Going to try your info box addon soon
  18. Thanks I'll make the changes tonight and report back :)
  19. Almost there I tried your first suggestion and Delivery, Payment, Checkout transition is working beautifully but the back button shows a blank page I then tried your second suggestion and pressing back just shows the page I was on. Thanks for all your help. This is definitely going into my live store when working
  20. Thanks Dr. Rolex I made the changes to the engine file and at first it didn't work (I kept on seeing the sliding effect), so I forced a couple of refreshes and eventually saw the fade out/in effect. Unfortunately it doesn't go past the shipping page; it fades and the progress bar moves up but I still see my shipping options, any suggestions? Thanks so much
  21. Oh and something else, is there a way to change the slide effect? The sideways one makes me feel a little sick :P Thanks
  22. Nice work, Dr. Rolex Loving this addon!! Thank you very much :thumbsup: I do have one small problem though with the payment information window. After Pressing continue I get a popup saying I must select a payment method; my store only offers electronic bank transfer so there's nothing to select How do I modify checkout payment to continue when there is only one default payment method? Thanks again
  23. Wow, fantastic release, will attempt it on my dev site and report back Have had really bad luck with all the other one page checkouts, etc, hopefully this is the solution Thanks so much
×