Jump to content

PupStar

Members
  • Content count

    897
  • Joined

  • Last visited

  • Days Won

    10

Everything posted by PupStar

  1. PupStar

    Explode product view

    it does work if you are skilled enough to do what I said and 'modify modify modify'! Maybe you should consider investing in a professional developer who can create what you need. Mark
  2. PupStar

    Explode product view

    well start here http://addons.oscommerce.com/info/7116 and then modify modify modify lol
  3. PupStar

    Explode product view

    its no where near ready for commercial use as there is still lots of tidying up and tweaks to make. Its been a hobbyist project from the start and may stay that way for a while yet until I can get the time to work on it 100%. It maybe quicker for you to hire someone to code one up for you although I suspect it would not be cheap. My post was not to blow my own trumpet but to make aware that anything is possible. Mark
  4. PupStar

    Explode product view

    I have been working on something like this on and off for a while now and finally have it working. I have also integrated jqZoom into it. Here is a preview of what I have done. Uploaded with ImageShack.us admin controlled and quite complicated. Mark
  5. PupStar

    Ask a product question

    for starters a link to the contribution used would be helpful so we can see if you are using a compatible version. Also if the version is compatible then I would recheck your install as you may have put something in the wrong place. Mark
  6. Hi Guys, I am really tearing my hair out now with this. I have it working in the admin ok its the catalog side that is causing the problem. Unfortuantely I do not have a link to show you as the site is on localhost on my laptop at the minute. Basically what is happening is that when I select the make and the model and then click 'find' the page just loops back to the index.php page, the url does change however to: http://localhost/catalog/index.php?Make=Ford&Model=Focus The code below is for the info box and the function file (although one member suggested splitting the function and another said it was unnessary, not sure which one is correct so left it the way it is for now) If anyone could spare the time to glance over the code and let me know what they think :blush: Make/Model Infobox in catalog/includes/modules/boxes <?php class bm_make_model { var $code = 'bm_make_model'; var $group = 'boxes'; var $title; var $description; var $sort_order; var $enabled = false; function bm_make_model() { $this->title = MODULE_BOXES_MAKE_MODEL_TITLE; $this->description = MODULE_BOXES_MAKE_MODEL_DESCRIPTION; if ( defined('MODULE_BOXES_MAKE_MODEL_STATUS') ) { $this->sort_order = MODULE_BOXES_MAKE_MODEL_SORT_ORDER; $this->enabled = (MODULE_BOXES_MAKE_MODEL_STATUS == 'True'); $this->group = ((MODULE_BOXES_MAKE_MODEL_CONTENT_PLACEMENT == 'Left Column') ? 'boxes_column_left' : 'boxes_column_right'); } } function execute() { global $oscTemplate; include_once(DIR_WS_FUNCTIONS . FILENAME_MAKE_MODEL_FUNCTIONS); $data = '<div class="ui-widget infoBoxContainer ">' . ' <div class="ui-widget-header ui-corner-top infoBoxHeading">' . MODULE_BOXES_MAKE_MODEL_BOX_TITLE . '</div>' . ' <div class="ui-widget-content ui-corner-bottom infoBoxContents" style="text-align: center;"> ' . ' ' . MODULE_BOXES_MAKE_MODEL_BOX_DESCRIPTION . ' '. ' ' . $javascript . ' ' . ' ' . tep_draw_form('make_model_year', $action, 'get', '', false) . ' ' . ' ' . tep_draw_pull_down_menu('Make', $Make_array, (isset($Make_selected_var) ? $Make_selected_var : ''), 'onchange="pop_model();" style="width: 85%"') .' ' . ' <span id="model_select">' . tep_draw_pull_down_menu('Model', $Model_array, (isset($Model_selected_var) ? $Model_selected_var : ''), 'onchange="pop_year();" style="width: 85%"') .'</span>' . ' ' . $hidden_get_variables . tep_hide_session_id() . '<br>' . ' ' . tep_draw_button(IMAGE_BUTTON_FIND, 'key', null, 'primary') . '<br>' . ' <a href="'.$link.'">Clear Selection</a>' . ' </form>' . ' </div>' . '</div>'; $oscTemplate->addBlock($data, $this->group); } function isEnabled() { return $this->enabled; } function check() { return defined('MODULE_BOXES_MAKE_MODEL_STATUS'); } function install() { tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Enable Make/Model Module', 'MODULE_BOXES_MAKE_MODEL_STATUS', 'True', 'Do you want to add the module to your shop?', '6', '1', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Content Placement', 'MODULE_BOXES_MAKE_MODEL_CONTENT_PLACEMENT', 'Left Column', 'Should the module be loaded in the left or right column?', '6', '1', 'tep_cfg_select_option(array(\'Left Column\', \'Right Column\'), ', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Sort Order', 'MODULE_BOXES_MAKE_MODEL_SORT_ORDER', '0', 'Sort order of display. Lowest is displayed first.', '6', '0', now())"); } function remove() { tep_db_query("delete from " . TABLE_CONFIGURATION . " where configuration_key in ('" . implode("', '", $this->keys()) . "')"); } function keys() { return array('MODULE_BOXES_MAKE_MODEL_STATUS', 'MODULE_BOXES_MAKE_MODEL_CONTENT_PLACEMENT', 'MODULE_BOXES_MAKE_MODEL_SORT_ORDER'); } } ?> Make/Model Functions in catalog/includes/functions <?php $Make_Model_Year_query = tep_db_query("select distinct products_car_make, products_car_model, products_car_year_bof, products_car_year_eof from products_ymm where products_car_make != '' and products_car_model != '' and products_car_year_bof !=0 and products_car_year_eof != 0 order by products_car_make, products_car_model, products_car_year_bof, products_car_year_eof"); if ($number_of_rows = tep_db_num_rows($Make_Model_Year_query)) { // Display a drop-down $Make_array[] = array('id' => 'all', 'text' => 'Choose Brand'); $Model_array[] = array('id' => 'all', 'text' => 'Choose Model'); $Year_array[] = array('id' => 0, 'text' => 'Choose Year'); $javascript = '<script language="javascript" type="text/javascript"> var a = new Array(); var b = new Array(); var c = new Array();'; $y = array(); $M_a = array(); $products_car_make_old = ''; $products_car_model_old = ''; while ($Makes = tep_db_fetch_array($Make_Model_Year_query)) { if (!isset($M_a [$Makes['products_car_make']])) $Make_array[] = array('id' => $Makes['products_car_make'], 'text' => $Makes['products_car_make']); if (!isset($M_a [$Makes['products_car_make']][$Makes['products_car_model']]) && count($y) > 0){ $M_a [$products_car_make_old][$products_car_model_old]=$y; $y = array(); } if ($Makes['products_car_year_bof'] != 0 && $Makes['products_car_year_eof'] != 0){ if ($Makes['products_car_year_bof'] == $Makes['products_car_year_eof']){ $y [$Makes['products_car_year_bof']] = 1; } elseif ($Makes['products_car_year_bof'] < $Makes['products_car_year_eof']){ while ($Makes['products_car_year_bof'] <= $Makes['products_car_year_eof']){ $y [$Makes['products_car_year_bof']] = 1; $Makes['products_car_year_bof']++; } } } $products_car_make_old = $Makes['products_car_make']; $products_car_model_old = $Makes['products_car_model']; $M_a [$Makes['products_car_make']][$Makes['products_car_model']] = array(); } $M_a [$products_car_make_old][$products_car_model_old]=$y; $i = 0; foreach ($M_a as $k =>$v){ $javascript .= 'a['.$i.']="'.$k.'";b['.$i.']=new Array('; $ii = 0; $s = ''; foreach ($M_a[$k] as $kk =>$vv){ $javascript .= ($ii != 0 ? ',' : '').'"'.$kk.'"'; $ss = ''; $iii = 0; foreach ($M_a[$k][$kk] as $kkk => $vvv){ $ss .= ($iii != 0 ? ',' : '').$kkk; $iii++; } if ($iii == 1) $ss = '"'.$ss.'"'; $s .= 'c['.$i.']['.$ii.']=new Array('.$ss.');'; $ii++; } $javascript .= ');c['.$i.']=new Array();'.$s; $i++; } $javascript .= ' function pop_model(){ var o ="<select name=\"Model\" onChange=\"pop_year();\" style=\"width: 100%\"><option value=\"all\">Choose Model</option>"; var sv = document.make_model_year.Make.value; if(sv != "all"){ var v = a.length; while(v--) if(sv == a[v]) break; for(var i = 0; i < b[v].length; i++) o+="<option value=\""+b[v][i]+"\">"+b[v][i]+"</option>"; } o+="</select>"; document.getElementById("model_select").innerHTML= o; document.getElementById("year_select").innerHTML= "<select name=\"Year\" style=\"width: 100%\"><option value=\"0\">Choose Year</option></select>"; } function pop_year(){ var o ="<select name=\"Year\" style=\"width: 100%\" onChange=\"document.make_model_year.submit();\"><option value=\"0\">Choose Year</option>"; var sv = document.make_model_year.Make.value; if(sv != "all"){ var v = a.length; while(v--) if(sv == a[v]) break; var sv2 = document.make_model_year.Model.value; if(sv2 != "all"){ var v2 = b[v].length; while(v2--) if(sv2 == b[v][v2]) break; for(var i = 0; i < c[v][v2].length; i++) o+="<option value=\""+c[v][v2][i]+"\">"+c[v][v2][i]+"</option>"; } } o+="</select>"; document.getElementById("year_select").innerHTML= o; } </script>'; if (isset($Make_selected_var) && isset($M_a[$Make_selected_var])){ foreach ($M_a[$Make_selected_var] as $k => $v) $Model_array[] = array('id' => $k, 'text' => $k);} if (isset($Make_selected_var) && isset($Model_selected_var) && isset($M_a[$Make_selected_var][$Model_selected_var])) foreach ($M_a[$Make_selected_var][$Model_selected_var] as $k => $v) $Year_array[] = array('id' => $k, 'text' => $k); $script = basename($_SERVER['SCRIPT_NAME']); if ($script == 'index.php' && (!isset($cPath) || $cPath == '')){ if (defined('FILENAME_ALLPRODS_SEO') && ALL_PRODUCTS_SEO == 'true'){ $script = FILENAME_ALLPRODS_SEO ; } elseif (defined('ALL_PRODUCTS') && ALL_PRODUCTS == 'true'){ $script = FILENAME_ALLPRODS ; } } $hidden_get_variables = ''; $keys = Array('Year','Make','Model',tep_session_name(),'x','y'); if ($script == 'product_info.php'){ if(isset($cPath) || $cPath != ''){ $_GET['cPath'] = $cPath; $link = 'index.php?cPath='.$cPath.'&Make=all&Model=all&Year=0'; } else { $link = 'index.php?Make=all&Model=all&Year=0'; } $action = 'index.php'; $keys [] = 'products_id'; } elseif (SEO_ENABLED == 'true' && basename($PHP_SELF) != FILENAME_ADVANCED_SEARCH_RESULT){ $action = tep_href_link($script, tep_get_all_get_params(array('Make','Model','Year')), 'NONSSL', false); $link = tep_href_link($script, tep_get_all_get_params(array('Make','Model','Year')).'Make=all&Model=all&Year=0', 'NONSSL', false); $keys [] = 'cPath'; $keys [] = 'products_id'; $keys [] = 'manufacturers_id'; } else { $action = $script; $link = $script.'?'.tep_get_all_get_params(array('Make','Model','Year')).'Make=all&Model=all&Year=0'; } reset($_GET); while (list($key, $value) = each($_GET)) { if (!in_array($key,$keys)) $hidden_get_variables .= tep_draw_hidden_field($key, $value); } } ?>
  7. Kevin, open admin/includes/functions/html_output.php and ensure you have this code in there //// // Hide form elements function tep_hide_session_id() { $string = ''; if (defined('SID') && tep_not_null(SID)) { $string = tep_draw_hidden_field(tep_session_name(), tep_session_id()); } return $string; } If not add it and see what happens. Mark
  8. Timmy, try this: <div class="left wid200" style="padding-left: 20px;"><b><?php echo TABLE_HEADING_PRODUCTS;?></b></div> Mark
  9. to remove the option from shopping_cart.php comment out this code: <?php $initialize_checkout_methods = $payment_modules->checkout_initialization_method(); if (!empty($initialize_checkout_methods)) { ?> <p align="right" style="clear: both; padding: 15px 50px 0 0;"><?php echo TEXT_ALTERNATIVE_CHECKOUT_METHODS; ?></p> <?php reset($initialize_checkout_methods); while (list(, $value) = each($initialize_checkout_methods)) { ?> <p align="right"><?php echo $value; ?></p> <?php } } ?> Regards Mark
  10. so are you using OPC or Simple Checkout???
  11. Unfortunately I am running the test store locally so can not show you the error happening. The store is vanilla with no mods done. I have already started styling the fields. Mark
  12. Hi Jetta, I have finally got around to testing your baby (w00t) and wow I like it! I too also get the parse error when creating an account but if you then click the checkout button again the account has been created and goes direct to the payment/shipping page. A couple of suggestions I have are: 1. The input fields seem a little short in width, maybe it would be worth adding an extra css style to define the width of the input fields. 2. A thought would be to not show the 'Sign In' or 'Guest Checkout' buttons if the customer has opted to create an account. If anything a 'Back' button would be more suitable if anything. The same would also apply for the buttons on the guest checkout. Apart from the above I can not think of anything else, great work, very well done. Mark
  13. PupStar

    Information Pages Unlimited v1.0

    its because you do not have the 'ckeditor' installed. Install this http://addons.oscommerce.com/info/7650 and all should be ok. Mark
  14. if you look in the code includes/modules/boxes/bm_social_box.php you will see the link as follows: ' <a href="http://www.new.facebook.com/profile.php?id=' . MODULE_BOXES_FACEBOOK_ACCOUNT_NAME . '" target="_new">' . tep_image(DIR_WS_IMAGES . 'follow-us-on-facebook.png', 'Follow us on Facebook') . '</a><br><a href="http://twitter.com/' . MODULE_BOXES_TWITTER_ACCOUNT_NAME . '" target="_new">' . tep_image(DIR_WS_IMAGES . 'follow_us_twitter.png', 'Tweet Us!') . '</a>' . change the code to ' <a href="http://www.facebook.com/' . MODULE_BOXES_FACEBOOK_ACCOUNT_NAME . '" target="_new">' . tep_image(DIR_WS_IMAGES . 'follow-us-on-facebook.png', 'Follow us on Facebook') . '</a><br><a href="http://twitter.com/' . MODULE_BOXES_TWITTER_ACCOUNT_NAME . '" target="_new">' . tep_image(DIR_WS_IMAGES . 'follow_us_twitter.png', 'Tweet Us!') . '</a>' . and see what happens. Mark
  15. PupStar

    Master Products - MS2

    The actions I need to combine are on the product_info page. Apart from that I am being totally dumb and dont understand Mark
  16. PupStar

    Master Products - MS2

    ok I must admit after hours of fiddling and staring at code I am a little stumped at combining these 2 sets of code to create 1 action if (isset($HTTP_POST_VARS['products_id']) && is_numeric($HTTP_POST_VARS['products_id'])) { $attributes=array(); if (isset($HTTP_POST_VARS['attrcomb']) && (preg_match("/^\d{1,10}-\d{1,10}(,\d{1,10}-\d{1,10})*$/",$HTTP_POST_VARS['attrcomb']))) { $attrlist=explode(',',$HTTP_POST_VARS['attrcomb']); foreach ($attrlist as $attr) { list($oid, $oval)=explode('-',$attr); if (is_numeric($oid) && $oid==(int)$oid && is_numeric($oval) && $oval==(int)$oval) $attributes[$oid]=$oval; } } if (isset($HTTP_POST_VARS['id']) && is_array($HTTP_POST_VARS['id'])) { foreach ($HTTP_POST_VARS['id'] as $key=>$val) { if (is_numeric($key) && $key==(int)$key && is_numeric($val) && $val==(int)$val) $attributes=$attributes + $HTTP_POST_VARS['id']; } } } and while ( list( $key, $val ) = each( $HTTP_POST_VARS ) ) { if (substr($key,0,11) == "Qty_ProdId_" && ($val !== 0)) { $prodId = substr($key,11); $qty = $val; if(isset($HTTP_POST_VARS["id_$prodId"]) && is_array($HTTP_POST_VARS["id_$prodId"])) { // We have attributes $cart->add_cart($prodId, $cart->get_quantity(tep_get_uprid($prodId, $HTTP_POST_VARS["id_$prodId"]))+$qty, $HTTP_POST_VARS["id_$prodId"]); } else { if (isset($HTTP_POST_VARS["products_id"]) && isset($HTTP_POST_VARS['id'])) { // We have attributes with normal product only if ($prodId == $HTTP_POST_VARS['products_id']) { $attributes = $HTTP_POST_VARS['id']; } else { $attributes = $HTTP_POST_VARS["id_$prodId"]; } $cart->add_cart($prodId, $cart->get_quantity(tep_get_uprid($prodId, $attributes))+$qty, $attributes); } else { // No attributes and normal products $cart->add_cart($prodId, $cart->get_quantity($prodId)+$qty); } } } } Any knight in shining armour out there to rescue me on a chilly bank holiday monday :thumbsup: Mark
  17. PupStar

    Master Products - MS2

    cheers Jim, yes it makes sense although technical capability may come into it lol I will give it a go :thumbsup: Thanks Mark
  18. PupStar

    Master Products - MS2

    Hi Guys, I have scanned the thread and can not seem to find the answer to my problem. In this piece of code: if ($master_check['products_master_status'] > 0 || $master_check['products_master'] == 0 || $master_check['products_restricted_status'] = 0) { echo tep_draw_form('buy_now_', tep_href_link(FILENAME_PRODUCT_INFO, tep_get_all_get_params(array('action')) . 'action=add_slave')); } else { echo tep_draw_form('cart_quantity', tep_href_link(FILENAME_PRODUCT_INFO, tep_get_all_get_params(array('action')) . 'action=add_product')); } How do I combine 'action=add_product' and 'action=add_slave' into one action so it adds both master and slave to the cart with one click. Is this even possible??? Any help is appreciated. Thanks Mark
  19. Go to Admin>Modules>Boxes and then install the box.

  20. Hi Kelly, To run the sql you need to go into your database through your control panel. You then run the sql statements so they are loaded into the database. Mark
  21. ok finally trying to get back to this problem to get it sorted. I have read about other carts versions of easypopulate that populate the database by the products_id and not the products_model. The reason I do not want to change the way it works as suggested above is because I would need to rewrite more code in the admin for the way my parts manager system works. So to all who use EP have you managed to find a way to import by products_id rather than products_model. Thanks Mark
  22. Someone beat me to it but I have uploaded a full new package with the changes.

    Sorry :'(

    Mark

  23. PupStar

    Products From Supplier Into Site

    Unfortunately I will not share this with the community as if it were to be released then everyone would make money using my supplier and interface but not me >_< If you let me know which supplier you are using by pm I am willing to take a look and see if there is anything I can do. I am in the process of porting it to another suppliers xml feed however it will be near enough a rewrite to cope with the different xml tags. As G said Easy Populate is a good free solution if your supplier has a csv file and you have the time to download and reupload all of the product images. If your supplier does not supply a csv file then you could take the xml and convert it to csv.
  24. PupStar

    Products From Supplier Into Site

    What sort of feed are you supplied with as I have one supplier that generates an xml feed on the fly and I have a coded an xml import interface with allows me to select which categories of products to import, set individual prices per category by adding a percentage to the cost price. This is all done using temporary tables in the database which once sorted I can press a button and transfer all products to the live store, oh and it also imports all images. Mark
  25. PupStar

    New Information Box add on Contribution

    which contribution have you added? Post the link and then I cna advise accordingly.
×