Jump to content

sanam

Members
  • Content count

    60
  • Joined

  • Last visited

About sanam

  • Rank
    Mr

Profile Information

  • Real Name
    Sukhbir
  1. sanam

    FedEx - Web Services v9

    Yes, thats correct
  2. sanam

    FedEx - Web Services v9

    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 )
  3. 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
  4. 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.
  5. sanam

    [Development] Products Specifications

    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.
  6. sanam

    [Development] Products Specifications

    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
  7. sanam

    [Development] Products Specifications

    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
  8. sanam

    [Development] Products Specifications

    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.
  9. Well i just checked and found out that version 3 does store all database actions, deleted customers and orders in admin log and can be viewed or permanently deleted from Tools->Administrator log action. That's big improvement over version 2. If that is 10 steps forward then its also 2 steps backward. At most admin can sort the actions based on module and delete them. The data displayed uses the table specs and most of the users will be lost with whats being displayed. It shows the the data but not the information. There is big difference in both. As far as admin actions its fine but for user actions their should be more options for admins. Like searching for customers by name or even orders ids etc. Over time this log is going to be cluttered and useless for lot of us. I guess this feature could be better handled then by just adding and storing the info in general table which could at best be just printed and queried on for reporting. Well one can argue that it would be easy to write mods do all sort of things even restoring it back to its original state because all the data is there but why make something complicated when it could be done easily. KISS......... :blink:
  10. Hello all, first of all I would like to thank one and all who have contributed their time for the development of this great product. Please note that we all who use this cart do appreciate your effort. Now to my request, I have been user and adding my 2 cents on this great project for quite a long time and one simple thing that I feel that should be handled by default is how to treat deleted customers and orders. I am a believer that no record should be deleted permanently from database. There are other options like adding a flag for deleted records or moving them to different tables or different database (which I think would be overkill for this project). One solution that I have added to my installations is to add flag to customer and order tables to handle deleted records and extra page to see just the deleted records and option to undelete them. From mod standpoint its lot of work and future updates becomes very tricky. For stock setup still its still lot of work (lot of quires would be needed to be updated) but I guess it would be worth it. There are several benefits in keeping deleted records and simply marking them as deleted plus there isn't much cost or performance overhead associated with such a decision. Now would be the best time to add this feature. If the core development team decides its well worth then I am available to donate my time toward it. Thanks for reading.
  11. sanam

    OSC CMS

    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');
  12. sanam

    Master Products - MS2

    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.
  13. sanam

    Master Products - MS2

    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
  14. sanam

    PsiGate XML Gateway

    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
×