Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

sanam

Pioneers
  • Posts

    60
  • Joined

  • Last visited

Everything posted by sanam

  1. Hello all, i just got FedEx Webservice Version 9_4.3.1 and have an issue with rates. While debugging i found this in response, please have a look at [CommodityName] => DOCUMENTS But this line should be [CommodityName] => COMMODITY because i am not shipping documents. Am i correct in my assumption, if so how can fix this. Thanks ( [serviceType] => INTERNATIONAL_ECONOMY [PackagingType] => YOUR_PACKAGING [DeliveryStation] => ANKA [DeliveryDayOfWeek] => TUE [DeliveryTimestamp] => 2012-12-18T20:00:00 [CommitDetails] => stdClass Object ( [CommodityName] => DOCUMENTS [serviceType] => INTERNATIONAL_ECONOMY [CommitTimestamp] => 2012-12-18T20:00:00 [DayOfWeek] => TUE [DestinationServiceArea] => PM [brokerToDestinationDays] => 0 [ProofOfDeliveryDate] => 2012-12-19 [ProofOfDeliveryDayOfWeek] => WED [CommitMessages] => stdClass Object ( [code] => 134 [Message] => REQUEST COMPLETED ) [DeliveryMessages] => 8:00 P.M. IF NO CUSTOMS DELAY [DocumentContent] => DOCUMENTS_ONLY [RequiredDocuments] => INTERNATIONAL_AIRWAY_BILL )
  2. Man your fast, thanks for the update. It seems that most of my filters are same as my values so i have added a new option on "Specifications in Group" option page. It will added new button for copying values for selected specification as filters for that specification. Before adding all the existing filters for that specification will be deleted. It can be easily modified so only missing values are added, not attamped yet. All modifications are in attached text file.copy_values_to_filters.txt As usual i would wait for kymations approval or update. Thanks
  3. Hello Kymation, thanks for updating this contirbution. Been away for while so was just catching up and found one issue. Its with the release 1_1_11. 1) I read somewhere in the forum that functions/products_specifications.php lines around 776 needs to be changed with if this still holds true than it needs to be changed in the uploaded. 2) I am using "/" in my filters and its removed from querystring and someone had mentioned they where also having similar issue with different character and option was to use filter id. I did some changes to tep_clean_get__recursive and get it working. Only works for PHP Version 5.2.0 or greater /inlcudes/functions/products_specifications.php change if( !function_exists( 'tep_clean_get__recursive' ) ) { function tep_clean_get__recursive ($get_var) { if (!is_array($get_var)) { return preg_replace("/[^ {}a-zA-Z0-9_.-]/i", "", urldecode($get_var)); } // Add the preg_replace to every element. return array_map ('tep_clean_get__recursive', $get_var); } // function tep_clean_get__recursive } // if( !function_exists TO if( !function_exists( 'tep_clean_get__recursive' ) ) { function tep_clean_get__recursive ($get_var) { if ( @phpversion() >= "5.2.0" ){ // filter_var only available from this distribution if (!is_array($get_var)) { // return preg_replace("/[^ {}a-zA-Z0-9_.-]/i", "", urldecode($get_var)); //FILTER_FLAG_STRIP_LOW = HTML-escape '"<>& and characters with ASCII value less than 32, optionally strip or encode other special characters $get_var= filter_var($get_var, FILTER_SANITIZE_STRING);// remove any invalid or not allowd string, like <script> or <strong> $get_var= filter_var($get_var, FILTER_SANITIZE_URL); //Remove all characters except letters, digits and $-_.+!*'(),{}|\\^~[]`<>#%";/?:@&=. $get_var= filter_var($get_var, FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_LOW);//Strips characters that has a numerical value <32 $get_var= filter_var($get_var, FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_HIGH);//Strips characters that has a numerical value >127 return $get_var; } }else{ if (!is_array($get_var)) { return preg_replace("/[^ {}a-zA-Z0-9_.-]/i", "", urldecode($get_var)); } } // Add the preg_replace to every element. return array_map ('tep_clean_get__recursive', $get_var); } // function tep_clean_get__recursive } // if( !function_exists I have tested it and for the scope of this contribution it works, but if someone can test it and confirm if it works as stated.
  4. Hello Jim, well you where right about the filters. I did played around little bit with code and got it working and i am sure someone will improve on it. so here it goes. First of all no need to add tooltip code, it will be handled by href title tag. 1) Modifications to includes/classes/breadcrumb.php 2 functions modified (function add) & (function trail) function add($title, $link = '',$type='',$ntitle='') { // added type for filter type set, m for main link, l for main link, x for remove filter options // added ntitle for displaying the title in the link // set in breadcrumb code of products_fitler.php $this->_trail[] = array('title' => $title, 'link' => $link,'type'=>$type,'ntitle'=>$ntitle); } function trail($separator = ' - ') { global $request_type; $trail_string = ''; for ($i=0, $n=sizeof($this->_trail); $i<$n; $i++) { if (isset($this->_trail[$i]['link']) && tep_not_null($this->_trail[$i]['link'])) { $src = $this->_trail[$i]['link'] ; if ($request_type == 'SSL') { if(strcasecmp('https',substr($src,0,5)) != 0){ $src = str_replace("http", "https",$src ); } } if( $this->_trail[$i]['type'] == 'm'){ // main link diplay for breadcrumbs, will remove rest of the filters $trail_string .= '<a href="' . $src . '" class="headerNavigation" title="'.stripslashes($this->_trail[$i]['ntitle']).'">' . stripslashes($this->_trail[$i]['title']) . '</a>'; }elseif( $this->_trail[$i]['type'] == 'x'){ // display link for removing the selected filter $trail_string .= ' <sup>(<a href="' . $src . '" class="breadcrums_x" title="'.stripslashes($this->_trail[$i]['ntitle']).'">x</a>)</sup>'; }elseif( $this->_trail[$i]['type'] == 'l'){ // last main link in the filters, do not generate link $trail_string .= stripslashes($this->_trail[$i]['title']); }else{ // default oscommerce link $trail_string .= '<a href="' . $src . '" class="headerNavigation">' . stripslashes($this->_trail[$i]['title']) . '</a>'; } } else { $trail_string .= $this->_trail[$i]['title']; } // increment the counter // if link is for m (main) then do not add separator, separator will be added after x // if link is for l (last main) then do not add separator, separator will be added after x if ((($i+1) < $n) && ($this->_trail[$i]['type'] != 'm') && ($this->_trail[$i]['type'] != 'l')) $trail_string .= $separator; } return $trail_string; } 2) Modifications to breadcrumb code in products_fitler.php // Add Filter to Breadcrumbs if selected if (SPECIFICATIONS_FILTER_BREADCRUMB == 'True') { $bcount = count($specs_array_breadcrumb); $scount = 1; foreach ($specs_array_breadcrumb as $crumb) { $filter_link = '&f'.$crumb['specifications_id'].'='.$crumb['value']; if($scount < $bcount){ // generate link for main $breadcrumb->add ($crumb['specification_name'] . ' : ' . $crumb['value'], tep_href_link (FILENAME_PRODUCTS_FILTERS, 'cPath=' . $cPath . $filter_link ),'m','Remove other filters' ); }else{ // generate link for last main $breadcrumb->add ($crumb['specification_name'] . ' : ' . $crumb['value'], tep_href_link (FILENAME_PRODUCTS_FILTERS, 'cPath=' . $cPath . $filter_link ),'l','Remove other filters' ); } // generate link for x $breadcrumb->add ($crumb['specification_name'] . ' : ' . $crumb['value'], tep_href_link (FILENAME_PRODUCTS_FILTERS, tep_get_all_get_params (array ('f' . $crumb['specifications_id']) ) ),'x','Remove filter: '.$crumb['specification_name'] ); $scount++; } } 3) Added style in stylesheet.css for breadcrums_x a.breadcrums_x:link, a.breadcrums_x:active, a.breadcrums_x:visited{ font-size: 10px; color: #FFFFFF; font-weight: bold; text-decoration: none; } a.breadcrums_x:hover{ font-size: 10px; color: #17426B; } This will mimic the newegg style of breadcrumbs.
  5. Hello Jim, instead of popup same file can be used, in this case instead of popup, navigate to the actual file. Just add left column and any other missing include in the file. Plus one back button which will take you back to categories page with the product selected. From Features Wish List: 76. Clicking the filter name in the breadcrumb removes it, which is the opposite of the normal behaviour for breadcrumb. Modify breadcrumb? I think it works the way it should. If you check newegg.com, the filter is added to the breadcrumb with x to remove it. And thats why its put there in first place so you can easily remove any from the bunch and wider your results. Small beautification to the crumbs. Will add tooltip to the breadcrumb filter stylesheet..css change A.headerNavigation { color: #FFFFFF; } to A.headerNavigation { color: #FFFFFF; position: relative; } // add new styles a span { display: none; } a:hover span { display: block; position: absolute; top: 10px; left: 0; /* formatting only styles */ padding: 5px; margin: 10px; z-index: 100; background: #f0f0f0; border: 1px dotted #c0c0c0; opacity: 0.9; /* end formatting */ } // products_filter.php change $breadcrumb->add ($crumb['specification_name'] . ' : ' . $crumb['value'] . ' <span class="close">[X]</span>', tep_href_link (FILENAME_PRODUCTS_FILTERS, tep_get_all_get_params (array ('f' . $crumb['specifications_id']) ) ) ); To: $breadcrumb->add ($crumb['specification_name'] . ' : ' . $crumb['value'] . ' <sup>[X]</sup><span>Remove this filter.</span>', tep_href_link (FILENAME_PRODUCTS_FILTERS, tep_get_all_get_params (array ('f' . $crumb['specifications_id']) ) ) ); Adds nice tooltip with message 'Remove this filter' can be added to language file. Thanks for great job. Have a nice weekend
  6. Thanks Elijah, I had $$var but during cut and paste trying to get right line numbers kind of mistyped it. The loop was a good call, keep it going. Sukhbir
  7. Hello Jim, thanks for taking initiative for such a big project. I know its going to take lot of effort but a great contribution lacking in oscommerce. Kudos goes to all who have been adding their time and effort in this. I have been looking for something like this for a while and very glad to find it.I am still trying to wrap my head around the code and functionality. So for start-up I have tried my hand on by adding filter bread crumbs from feature list. 73.Filters in the Breadcrumb trail, with an X to remove each one. CF Newegg. I am not going to upload my moded file to the contrib section because i will rather have you guys go over it and may be Jim can add in next release. All modifications are in one page catalog->products_filter.php 1) Changes to $specs_query_raw. I rewrote this sql and instead of comparing id added joins to the table. If you want you can keep the original but add one field (sd.specification_name) and table to from (" . TABLE_SPECIFICATION_DESCRIPTION . " sd) and compare to where (and sd.specifications_id = s.specifications_id) Edit to Original Query // Check for filters on each applicable Specification $specs_query_raw = "select s.specifications_id, s.filter_class, s.products_column_name, sd.specification_name from " . TABLE_SPECIFICATION . " s, " . TABLE_SPECIFICATION_GROUPS . " sg, " . TABLE_SPECIFICATIONS_TO_CATEGORIES . " s2c, " . TABLE_SPECIFICATION_DESCRIPTION . " sd where s.specification_group_id = sg.specification_group_id and sg.specification_group_id = s2c.specification_group_id and sd.specifications_id = s.specifications_id " . $category_sql . " and s.show_filter = 'True' and sg.show_filter = 'True' New Query with joins $specs_query_raw = "SELECT s.specifications_id, s.filter_class, s.products_column_name, sd.specification_name " ." FROM ".TABLE_SPECIFICATION." AS s Inner Join ".TABLE_SPECIFICATION_GROUPS." AS sg ON s.specification_group_id = sg.specification_group_id " ." Inner Join ".TABLE_SPECIFICATIONS_TO_CATEGORIES." AS s2c ON sg.specification_group_id = s2c.specification_group_id " ." Inner Join ".TABLE_SPECIFICATION_DESCRIPTION." sd ON sd.specifications_id = s.specifications_id " ." WHERE s.show_filter = 'True' AND sg.show_filter = 'True' ".$category_sql ; 2) Add after line 53: $specs_query = tep_db_query ($specs_query_raw); //breadcrumbs : preserve the result of the specs_query $specs_array_breadcrumb = array(); 3) Add after Line 62 : $$var = tep_clean_get__recursive ($_GET[$var]); //breadcrumbs : add to breadcumb array current array & sanitized $_GET value $specs_array_breadcrumb[] = array_merge($specs_array, array("value" => $_GET[$var])); 4) Add after Line 210, Before closing ?> <!doctype ...> : $image = $image['categories_image']; } // Start of Filter Breadcrumbs $total_crumbs = count($specs_array_breadcrumb); for($master=0;$master<$total_crumbs;$master++){ // start master: go through array and build the links $filter_link = ""; $master_array = $specs_array_breadcrumb[$master]; for($link=0;$link<$total_crumbs;$link++){ // start link: ignore the current array value from the master and add rest if($link != $master){ $filter_link .= '&f'.$specs_array_breadcrumb[$link]['specifications_id'].'='.$specs_array_breadcrumb[$link]['value']; } } // if end link $breadcrumb->add('[<sup>X</sup> '.$master_array['specification_name'].' : '.$master_array['value'].']', tep_href_link(FILENAME_PRODUCTS_FILTERS, 'cPath=' . $cPath . $filter_link)); }// if end master // End of Filter Breadcrumbs This will add filters to the breadcrumb trail on top. The displaying part is easy and can modified for individual taste. Hope it works, any suggestions are welcomed.
  8. Make sure that your editing correct file. Includes in catalog and admin both have application_top.php and its very easy to make a mistake. The error that you have posted here can be assessed as In Admin section Error: Call to undefined function: [This means that function is not available and the reason could be that include state is missing or if the admin/includes/functions/cms.php is empty. In catalog section Error: Fatal error: Cannot redeclare blockvars() [ This could be because of number of reasons and one that jumps to mind is that file is being included twice] So in nutshell you might have added require(DIR_WS_FUNCTIONS . 'cms.php'); twice in catalog/includes/application_top.php and non in catalog/admin/includes/application_top.php Make sure there is only one include statement in catalog/includes/application_top.php Search for cms.php and there should be only one in there. In admin folder application_top.php is missing include statement for cms.php Search for cms.php and there should be only one in there. If not found then add this FIND (around line 140) // Include validation functions (right now only email address) require(DIR_WS_FUNCTIONS . 'validations.php'); ADD // osCMS require(DIR_WS_FUNCTIONS . 'cms.php');
  9. 1) Check your configuration table. If there are 12 entries with configuration_group_id set to 16 then it should be alright. No need to delete or update configuration_group table. Else there are 2 things you can do. Delete all the entries from "configuration" table with configuration_group_id = 16 Then just update the database with first 12 lines of code from the sql file. Or update the fields that are missing. Match the configuration_key where configuration_group_id = 16 to the sql statements in the file and run the missing ones. In the end you should have 12 unique configuration_key with configuration_group_id = 16 in "configuration" table. 2) There are 3 database entries after INSERT INTO configuration_group VALUES (16, 'Slave Products', 'Slave Product Listing - configuration options', 16, 1); ALTER TABLE products ADD products_master VARCHAR( 50 ) NOT NULL DEFAULT '0'; ALTER TABLE products ADD products_master_status tinyint(2) NOT NULL default '0'; ALTER TABLE products ADD products_listing_status tinyint(2) NOT NULL default '1'; Check products table if there are these 3 fields (products_master,products_master_status,products_listing_status) If they are present then your database has been successfully updated. You should be able to update the files. If product table is not updated then just run above 3 lines.
  10. If you think that problem might be with stock level then check configuration setting at configuration->stock Check Stock Level = false Subtract stock = false // this will stop negative values Allow Checkout = true Check these settings and try again. If it works then all good else problem should be some where in the code. Good luck
  11. Next time it would be really nice if you could post how you fixed it. This community thrives on sharing information, its 2 way street thats why its so successful. I had the same problem and had to spend quite some time to figure out the problem and fix. To Fix PSI-0013:Invalid SubTotal This problem is due to comma being added if the subtotal is over 1000. Fix is simple File: catalog/includes/modules/payment/psigate_xml.php Replace Line: 201 $psi->setSubTotal(number_format($order->info['total'] * $currencies->get_value($currency), 2)); With $psi->setSubTotal(number_format($order->info['total'] * $currencies->get_value($currency), 2,'.','')); //number_format($number, 2); fix for comma in subtotal field I would consider this as a bug because its going to affect everyone. If someone is planning to release new files on contribution page could you please add this change in there. Thanks
  12. Hello everyone, just installed this great contribution and it worked first time no problems. Thanks to all who put in such a nice effort. I am using database storage of responses options and on testing found out that it was not storing customer_id and osc_order_id. On further investigation i found that for getting the customer_id in the database all i had to do was change File: catalog/includes/modules/payment/psigate_xml.php line no: 268 tep_db_query("insert into " . TABLE_PSIGATE_XML . " (id, customer_id, osc_order_id, psi_order_id, transaction_time, approved, return_code, error_message, trans_ref, cvv_result, avs_result, card_auth, card_ref, ip_result, ip_country, ip_region, ip_city) values ('', '" . $HTTP_SESSION_VARS['customer_id'] . "', '', '" . $Psi_OrderID . "', '" . $Psi_TransTime . "', '" . $Psi_Approved . "', '" . $Psi_ReturnCode . "', '" . $Psi_ErrMsg . "', '" . $Psi_RefNumber . "', '" . $Psi_CardIDResult . "', '" . $Psi_AVSResult . "', '" . $Psi_CardAuthNumber . "', '" . $Psi_CardRefNumber . "', '" . $Psi_IPResult . "', '" . $Psi_IPCountry . "', '" . $Psi_IPRegion . "', '" . $Psi_IPCity . "')"); Change : $HTTP_SESSION_VARS['customer_id'] to $_SESSION['customer_id'] For storing osc_order_id i guess when above line is excuted at that moment order_id is not available. Thats what i figured out and i might be wrong. A simple solution that worked for me is as follow: File: catalog/includes/modules/payment/psigate_xml.php Replace LINE NO 20 with var $code, $title, $description, $enabled,$Psi_RefNumber; // added var $Psi_RefNumber Find $Psi_IPCity = $psi->getTrxnIPCity(); line number 264 After this line ADD $this->Psi_RefNumber = $Psi_RefNumber; // Set $Psi_RefNumber Find Function function after_process() line 277 replace whole function function after_process() { return false; } WITH function after_process() { global $insert_id; // update psigate xml table with order id if (MODULE_PAYMENT_PSIGATE_XML_STORE_DATA == 'True') { if(isset($this->Psi_RefNumber)){ $sql_data_array = array('osc_order_id' => $insert_id); tep_db_perform(TABLE_PSIGATE_XML, $sql_data_array, 'update', "trans_ref='".$this->Psi_RefNumber."'"); } } return true; } This worked for me, if you have a better way of doing it please share here. Thanks I am planning to start work on developing admin view of information stored in psi xml database. If you are working or planning to work on it i would be glad to offer my time in doing so.
  13. Try this: $max_products = 12; // Maximum products that can be bought $count = 0; while ($count <= $max_products) { if($count == 0){ $qty_array[] = array('id' => $count +1, 'text' => $count +1); // add 1 if count is 0 }else{ $qty_array[] = array('id' => $count, 'text' => $count); } $count = $count + 3; // increment count by 3 [ 3,6,9,12,15 .... }
  14. Its just a warning which is being thrown because the second argument in array_merge function is not an array. i havent used this contribution but looked at the code. Try changing this code and see if it works oscommerce.xml line 62 $categories_ids=array_merge($categories_ids, get_categories_ids($category['categories_id'])); replace with $current_categories_id = get_categories_ids($category['categories_id']); if(is_array($current_categories_id)){ $categories_ids=array_merge($categories_ids, $current_categories_id); } Last few errors are happening because $categories_ids is not being set properly. Fix first one i guess rest would be taken care of.
  15. Hello all, my site has suddenly started giving me this error Fatal error: Call to a member function on a non-object in /home/XXXXX/public_html/catalog/includes/classes/xmldocument.php on line 57 Its been up and running for 6 months without any problem. I checked other postings and found out that lot of people had similar problem but no solution posted so far. If someone had found the solution could he/she be kind enough to share it. I have tried everything that i could to find where the problem is. Your time is greatly appreciated. Thanks in advance.
  16. Thats a good contribution, i am using it works like a charm. Be carefull when installing because the instructions dosn't cover Master Product contribution. Mainly in admin->categories.php. In there you would have to edit for all the instructions twice.
  17. Only reason i can think why options are displayed in different order is that they might be multiple entries. Just a hunch. Try replacing the order by clause with this: ORDER BY popt.products_options_name This will ensure that they are always listed by name in acending order if u want them other way around than add DESC in the end. Hope this works
  18. Try this for product master filter if ( (!isset($new_products_category_id)) || ($new_products_category_id == '0') ) { // start random new products $new_products_query = tep_db_query("select p.products_id, p.products_image, p.products_tax_class_id, if(s.status, s.specials_new_products_price, p.products_price) as products_price from " . TABLE_PRODUCTS_TO_CATEGORIES . " INNER JOIN `products` `p` ON (`products_to_categories`.`products_id` = `p`.`products_id`) left outer join " . TABLE_SPECIALS . " s on p.products_id = s.products_id where p.products_master_status = '1' AND categories_id < '8' order by p.products_date_added desc"); } else { $new_products_query = tep_db_query("select distinct p.products_id, p.products_image, p.products_tax_class_id, if(s.status, s.specials_new_products_price, p.products_price) as products_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_CATEGORIES . " c where p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and c.parent_id = '" . (int)$new_products_category_id . "' and p.products_master_status = '1' order by p.products_date_added desc limit " . MAX_RANDOM_SELECT_NEW); // end random new products } For product quantity textbox post your code and i will look into it.
  19. Quantity Text Box: Edit file: includes->modules-master_listing.php locate switch satement: case 'MASTER_LIST_BUY_NOW': This is where quantity is built. You have three options in here controled by if,elseif and else. // this is where it checks if Check Stock option is set to true and if stock is less then 1 if ((STOCK_CHECK == 'true')&&(tep_get_products_stock($listing['products_id']) < 1)) { $lc_text = TEXT_STOCK; } // if stock check is false and quantity is less than 1 elseif ((STOCK_CHECK == 'false')&&(tep_get_products_stock($listing['products_id']) < 1)) { $qty_array = array(); for ($i=0; $ns = 20, $i <= $ns; $i++) { $qty_array[] = array('id' => $i, 'text' => $i); } } // if stock check is false and quantity is more than 1 else { $quantity = tep_get_products_stock($listing['products_id']); $qty_array = array(); for ($i=0; $ns = (($quantity < 20) ? $quantity : 20), $i <= $ns; $i++) { $qty_array[] = array('id' => $i, 'text' => $i); } } If you dont care about the stock and has set it to false than you can safely comment out elseif code and replace the code in else block, above code will look like this. if ((STOCK_CHECK == 'true')&&(tep_get_products_stock($listing['products_id']) < 1)) { $lc_text = TEXT_STOCK; } // elseif ((STOCK_CHECK == 'false')&&(tep_get_products_stock($listing['products_id']) < 1)) { // $qty_array = array(); // for ($i=0; $ns = 20, $i <= $ns; $i++) { // $qty_array[] = array('id' => $i, 'text' => $i); // // tep_draw_input_field('Qty_ProdId_'.$product_info['products_id'],$cart->get_quantity($product_info['products_id']) ,'size="5"'); // $lc_text = tep_draw_pull_down_menu('Qty_ProdId_' . $listing['products_id'], $qty_mos_next_idarray); // } // } else { //$quantity = tep_get_products_stock($listing['products_id']); //$qty_array = array(); //for ($i=0; $ns = (($quantity < 20) ? $quantity : 20), $i <= $ns; $i++) { //$qty_array[] = array('id' => $i, 'text' => $i); // $lc_text = tep_draw_pull_down_menu('Qty_ProdId_' . $listing['products_id'], $qty_array); // } /////////////////// this line generates the quantity text box $lc_text = tep_draw_input_field('Qty_ProdId_'.$listing['products_id'],$cart->get_quantity($listing['products_id']) ,'size="10"'); } This will always display text field for the slave quantity no matter what the stock is. if you want drop down list based on actual quantity: Just replace the for ($i=0; $ns = 20, $i <= $ns; $i++) { AND for ($i=0; $ns = (($quantity < 20) ? $quantity : 20), $i <= $ns; $i++) with for ($i=0; $i <= $quantity; $i++){ To filter out slaves from new products : Edit file: includes->modules-new_products.php Add this filter to the where clause of the query, you can add this to any query where u want to filter out slave products: p.products_status = '1' and p.products_listing_status = '1' if ( (!isset($new_products_category_id)) || ($new_products_category_id == '0') ) { // start random new products $new_products_query = tep_db_query("select p.products_id, p.products_image, p.products_tax_class_id, if(s.status, s.specials_new_products_price, p.products_price) as products_price from " . TABLE_PRODUCTS_TO_CATEGORIES . " INNER JOIN `products` `p` ON (`products_to_categories`.`products_id` = `p`.`products_id`) left outer join " . TABLE_SPECIALS . " s on p.products_id = s.products_id where p.products_status = '1' and p.products_listing_status = '1' AND categories_id < '8' order by p.products_date_added desc"); } else { $new_products_query = tep_db_query("select distinct p.products_id, p.products_image, p.products_tax_class_id, if(s.status, s.specials_new_products_price, p.products_price) as products_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_CATEGORIES . " c where p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and c.parent_id = '" . (int)$new_products_category_id . "' and p.products_status = '1' order by p.products_date_added desc limit " . MAX_RANDOM_SELECT_NEW); // end random new products }
  20. I just checked this forum today after long time, i did found Network Merchants contrib. Dont remeber from where, if you are still looking for it then pm me. i will send it you.
  21. This is long shot try this: catalog->includes->application_top.php around line 368 find this code case 'add_slave' : while ( list( $key, $val ) = each( $HTTP_POST_VARS ) ) { change it to case 'add_slave' : // while ( list( $key, $val ) = each( $HTTP_POST_VARS ) ) { while ( list( $key, $val ) = each( $_POST ) ) { Try if it works, good luck
  22. Try changing it with tep_draw_input_field('Qty_ProdId_'.$product_info['products_id'],$cart->get_quantity($product_info['products_id']) ,'size="10"')
  23. Great contribution, needed a way to display multiple price combinations for products and this contrib handles it pretty good. But now i am stuck with another problem. I am also using MiltipleCategories1.5. So in my case Master Product can belong to different categories, this creates a problem because now if i add slave then i would have to add it to same categories as Master. Else it wont display in ADMIN->Categories page. So its imposible to edit them. It works fine in store front, the slaves show up in all the instances of product in categories. The problem is with editing slaves in admin section. Any one been there, done it or any ideas how to handle it. I really need to get this going. For
×
×
  • Create New...