Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

cdickson

Archived
  • Posts

    67
  • Joined

  • Last visited

Posts posted by cdickson

  1. bump?

     

    I have uninstalled and reinstalled this mod with the same results.

     

    You can view the error in action at http://www.blaineraytprs.com/catalog_produ...with_images.php.

     

    I'm having this problem too: all paginated pages show the same products. I was hoping that timidphper's easy fix would work, but unfortunately it doesn't (same versions of OSC and the mod).

     

    I can sort the products by category, price, etc. and the products do change. It is only when I use the pagination links at the bottom of the page that the same products keep appearing, so there is something in the pagination code that seems to be off.

     

    Any suggestions?

  2. I'm having this problem too: all paginated pages show the same products. I was hoping that timidphper's easy fix would work, but unfortunately it doesn't (same versions of OSC and the mod).

     

    I can sort the products by category, price, etc. and the products do change. It is only when I use the pagination links at the bottom of the page that the same products keep appearing, so there is something in the pagination code that seems to be off.

     

    Any suggestions?

     

     

    Just for the record:

     

    To get Printable Catalog V3.5 MS2 paginating properly, in catalog/catalog_products_with_images.php

    replace line 351

      $limit = mysql_result(mysql_query("SELECT configuration_value from  " . TABLE_CONFIGURATION . " WHERE configuration_key = 'PRODUCT_LIST_CATALOG_PERPAGE'"), 0 , 0);

    with

     $limit = PRODUCT_LIST_CATALOG_PERPAGE;

    and this will allow you to set the items per page in your admin menu.

     

    FYI:

    The catalog/catalog_products_with_images_full.php file is set tol display all products in your catalog, and can then be paginated when printed.

     

    This is a good contribution if your are looking for a simple way to display a printable, sortable catalog, with links to all products as well!

     

    Hope this helps someone,

     

    Ed

  3. I am having a problem with my authroize.net / osc shop. Everytime i enter a cc and confirm an order i am returned to the billing page with the error:

     

    "Credit Card Error!

     

    The first four digits of the number entered are: If that number is correct, we do not accept that type of credit card. If it is wrong, please try again. "

     

    I talked to authorize.net and they can't help me to any extent without an error code but there is no error code. Another member showed me the thread http://www.oscommerce.com/forums/index.php?showtopic=103839 but when i try and attempt this i can't even find the page authorize_direct.php. Ive searched my entire server and i dont see it anywhere. I am really stuck and need help fixing this problem or atleast finding an error code (Response Reason Code) to help me fix the problem.

    I'm having the same problem except I don't get as detailed an error message. All I get is Credit Card Error!.

     

    The file in the fix you quoted looks like the file comes from a mod. If I can figure out the answer to my situation I'll post it here.

  4. MySQL 5

    I'm doing my first install using MySQL 5 and I'm having trouble with this report. I think I almost have it - there is something in the syntax that I am not getting right. Can anyone help?

     

    The error:

    1054 - Unknown column 'a.entry_zone_id' in 'on clause'
    
    SELECT c.customers_id , c.customers_default_address_id, c.customers_email_address, c.customers_fax, c.customers_telephone, a.entry_company, a.address_book_id, a.customers_id, a.entry_firstname, a.entry_lastname, a.entry_street_address, a.entry_suburb, a.entry_city, a.entry_state, a.entry_postcode, a.entry_country_id, a.entry_zone_id, z.zone_code, co.countries_name FROM (customers c) JOIN (zones z) ON a.entry_zone_id = z.zone_id JOIN (countries co) ON a.entry_country_id = co.countries_id LEFT JOIN (address_book a) ON c.customers_id = a.customers_id and c.customers_default_address_id = a.address_book_id ORDER BY a.entry_lastname

     

    Original code:

    $customers_query_raw = "SELECT c.customers_id , c.customers_default_address_id, c.customers_email_address, c.customers_fax, c.customers_telephone, a.entry_company, a.address_book_id, a.customers_id, a.entry_firstname, a.entry_lastname, a.entry_street_address, a.entry_suburb, a.entry_city, a.entry_state, a.entry_postcode, a.entry_country_id, a.entry_zone_id, z.zone_code, co.countries_name FROM " . TABLE_CUSTOMERS . " c JOIN " . TABLE_ZONES . " z ON a.entry_zone_id = z.zone_id JOIN " . TABLE_COUNTRIES . " co ON a.entry_country_id = co.countries_id LEFT JOIN " . TABLE_ADDRESS_BOOK . " a ON c.customers_id = a.customers_id and c.customers_default_address_id = a.address_book_id ORDER BY $db_orderby $sorted";

     

    My unsuccessful attempt at modifying the code for MySQL 5:

    $customers_query_raw = "SELECT c.customers_id , c.customers_default_address_id, c.customers_email_address, c.customers_fax, c.customers_telephone, a.entry_company, a.address_book_id, a.customers_id, a.entry_firstname, a.entry_lastname, a.entry_street_address, a.entry_suburb, a.entry_city, a.entry_state, a.entry_postcode, a.entry_country_id, a.entry_zone_id, z.zone_code, co.countries_name FROM (" . TABLE_CUSTOMERS . " c) JOIN (" . TABLE_ZONES . " z) ON a.entry_zone_id = z.zone_id JOIN (" . TABLE_COUNTRIES . " co) ON a.entry_country_id = co.countries_id LEFT JOIN (" . TABLE_ADDRESS_BOOK . " a) ON c.customers_id = a.customers_id and c.customers_default_address_id = a.address_book_id ORDER BY $db_orderby $sorted";

  5. I am trying to add the est. shipping cost contrib to STS plus and am having a small problem. Since it doesn't really use a box I can't figure out how to add it to the template. I've added the code to call the module but when I add a product to the cart, est shipping appears at the top of the screen above the entire site. Any suggestions?

    I had the same problem trying to use this with STS. Instead of re-hacking I opted to use the popup version written by Gary (potikyan) which you can find at http://www.oscommerce.com/community/contributions,3072.

     

    It works great with STS.

  6. My script code reads like this:

    <script language="javascript"><!--

    function popupWindow(url) {

    window.open(url,'popupWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,res

    izable=no,copyhistory=no,width=350,height=300,screenX=150,screenY=250')

    }

    //--></script>

     

    What is the & #39; in yours for? Did you customize it for something or is it an error?

  7. I finally got around to writing the instructions for the popup support and posted it on the contribution page (link below).

     

    Popup Estimated Shipping v1.7a with UPS/USPS support

     

    Good luck.

    Gary

    Gary,

     

    Thanks for writing and posting this popup version. It works beautifully with the STS Template without having to go through the process of putting it in one of the columns, which I preferred not to do. :thumbsup:

     

    Cheers!

  8. I just checked your site. It looks great. Would you please post here (or pm me) how you modified the contribution to work on a pop up window?

    I'd love to have this modification as well. I'm having a difficult time getting the mod to work within STS template and this would be a perfect resolution.

     

    Thanks,

    Cindy

  9. I needed to take a step back from this and I really think I have too many contributions installed.

    Adding multiple contributions can definitely be tricky. We keep a separate list for each project and note which contributions were installed and tested on which date because it helps to determine which ones don't work together. It is known, for example, that STS Template and Search Engine Friendly URLs don't work together. We also install the most important contributions first.

     

    Our most recent installation includes the following contributions, and all of them work together just fine:

    • STS Template
    • State Abbreviation Fix
    • All Customers Report v2.0
    • Option Type Feature v1.71
    • Featured Products v1.5.5
    • Order Editor v1.75
    • Custom Error Page v1.4
    • FedEx Direct v2.04
    • Product Sort v1.4
    • Admin DHTML Menu v2.1
    • Store Pick Up v1.4

    Good luck, Sonia!

  10. Are you certain that you compared your files properly? I got the contribution to work very easily, although it didn't work the first time. I downloaded WinMerge (free) and I found a few very minor differences in the code. As we all know, these small variances will absolutely affect the functionality of any contribution.

     

    I have installed this several times - at least four - without issue, so if you make sure that the code is correct it will work. :thumbsup:

     

    I cannot get v1.71 to work. I've compared and recompared my files, Could someone please help me.......
  11. I had a little bit of trouble with the code when I first installed this as well. I downloaded WinMerge - a terrific, free program that compares code in documents - and I found quite a few little things that I missed the first time around. After correcting my code, the mod works great! You can download WinMerge at http://winmerge.org/.

     

    Text shows up in shopping cart and on checkout page, then it doesn't go through to email or order history and in the database gets overwritten by TEXT instead of the message customer wrote. I looked through this support thread and compared my files over and over to OTF 1.6 files. I don't see anything missing. I also tried what was suggested below (I see that it worked for many people) but no luck. :blink:

     

    Any ideas would be greatly appreciated!

    Thanks!

  12. This is a great mod, but I needed a way to require input for certain features that are added by this contribution. Others in this forum were trying to do the same thing, but there were no answers posted here.

     

    With some help, I found a way to do this. There is one new file to add, and there are three existing files that need to be modified.

     

    Remember: BACKUP first, and proceed at your own risk. I have this feature functioning properly on a client web site, but I offer no guarantees.

     

    Instructions - Create a .txt file

    =========================================
    INSTRUCTIONS FOR REQUIRING AND VALIDATING DESIGNATED FIELDS FOR THE
    CONTRIBUTION Option Type Feature v1.71
    =========================================
    
    This was written to require two specific fields - Name & Birthdate - that I added with the Option Type Feature v1.71.  You will need to do your own modifications to suit your specific fields.
    
    
    
    New file:
    catalog/formValidate.js
    
    Modified files:
    catalog/product_info.php
    catalog/includes/application_top.php
    catalog/includes/languages/english.php
    
    =========================================
    1.  BACKUP - BACKUP - BACKUP
    =========================================
    
    =========================================
    2.  Upload formValidate.js to your catalog/ (or equivalent) directory.
    =========================================
    
    =========================================
    3.  Open cataolg/product_info.php
    =========================================
    
    **FIND APPROX LINE 89:
    if (tep_not_null($product_info['products_model'])) {
      $products_name = $product_info['products_name'] . '<br><span class="smallText">[' . $product_info['products_model'] . ']</span>';
    } else {
      $products_name = $product_info['products_name'];
    }
    
    **ADD IMMEDIATELY AFTER THE ABOVE:
    //SG Begin attribute validation
    if ($messageStack->size('product_info') > 0) {
    ?>
    	<tr>
    			<td><?php echo $messageStack->output('product_info'); ?></td>
    	</tr>
    	<tr>
    			<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
    	</tr>
    <?php  }
    //SG End attribute validation
    
    
    **FIND APPROX LINE 155:
    $products_attribs_query = tep_db_query("select distinct patrib.options_values_price, patrib.price_prefix from " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id='" . (int)$HTTP_GET_VARS['products_id'] . "' and patrib.options_id = '" . $products_options_name['products_options_id'] . "'");
    		$products_attribs_array = tep_db_fetch_array($products_attribs_query);
    
    **ADD IMMEDIATELY AFTER THE ABOVE:
    //SG Begin attribute validation
    		$tmp_html = '<input type="text" id="' . TEXT_PREFIX . $products_options_name['products_options_id'] . '" name="id[' . TEXT_PREFIX . $products_options_name['products_options_id'] . ']" size="' . $products_options_name['products_options_length'] .'" maxlength="' . $products_options_name['products_options_length'] . '" value="' . $cart->contents[$HTTP_GET_VARS['products_id']]['attributes_values'][$products_options_name['products_options_id']] .'">  <span id="inf_' . TEXT_PREFIX . $products_options_name['products_options_id'] . '"> </span>' . $products_options_name['products_options_comment'];
    		//SG End attribute validation
    
    
    =========================================
    4.  Open catalog/includes/application_top.php
    =========================================
    
    **FIND APPROX LINE 324:
    // redirect the customer to a friendly cookie-must-be-enabled page if cookies are disabled
    if ($session_started == false) {
      tep_redirect(tep_href_link(FILENAME_COOKIE_USAGE));
    }
    
    **ADD IMMEDIATELY AFTER THE ABOVE:
      //SG Begin attribute validation
     if (DISPLAY_CART == 'true') {
     $goto =  FILENAME_SHOPPING_CART;
     $parameters = array('action', 'cPath', 'products_id', 'pid','mustselect');
      } else {
     $goto = basename($PHP_SELF);
     if ($HTTP_GET_VARS['action'] == 'buy_now') {
       $parameters = array('action', 'pid', 'products_id','mustselect');
     } else {
       $parameters = array('action', 'pid','mustselect');
     }
      }
     //SG End attribute validation
    
    **FIND APPROX LINE 369:
    // customer adds a product from the products page
      case 'add_product' :	if (isset($HTTP_POST_VARS['products_id']) && is_numeric($HTTP_POST_VARS['products_id'])) {
    
    **ADD IMMEDIATELY AFTER THE ABOVE:
    //SG Begin attribute validation
    						   if (is_array($HTTP_POST_VARS['id']) ) {
    //								 $messageStack->reset();								  
    							 while (list($option, $value) = each($HTTP_POST_VARS['id'])) {
    							 switch ($option) {
    							 	case 'txt_1': //Name
    									$trimmedText = trim($value);
    									if (strlen($trimmedText) < ENTRY_NAME_MIN_LENGTH) {
    								   	tep_redirect(tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $HTTP_GET_VARS['products_id'] . '&mustselect=product_name'));
    													break;
    												}
    								   break;
    								case 'txt_2': //Birthdate
    									$strDate = $value;
    								   $isValid = false;
    
    								   if (ereg('^([0-9]{1,2})[/]([0-9]{1,2})[/]([0-9]{4})$', $strDate)) {
    									  $dateArr = split('[/]', $value);
    									  $m=$dateArr[0]; $d=$dateArr[1]; $y=$dateArr[2];
    									  $isValid = checkdate($m, $d, $y);
    								   }
    
    								   if (!$isValid) {
    													tep_redirect(tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $HTTP_GET_VARS['products_id'] . '&mustselect=product_birth'));
    													break;
    												}
    								   break;
    							   }   
    							 }
    						   } elseif (tep_has_product_attributes($HTTP_POST_VARS['products_id'])) {
    							   tep_redirect(tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $HTTP_POST_VARS['products_id']));
    							   break;
    						   } 
    						   //SG End attribute validation
    
    **FIND APPROX LINE 544:
    // initialize the message stack for output messages
     require(DIR_WS_CLASSES . 'message_stack.php');
     $messageStack = new messageStack;
    
    **ADD IMMEDIATELY AFTER THE ABOVE:
    //SG Begin attribute validation
    if (isset($HTTP_GET_VARS['mustselect'])){
      $error = true;
      switch ($HTTP_GET_VARS['mustselect']) {
     case 'product_name' :
      $messageStack->add('product_info',ENTRY_NAME_ERROR);
      break;
     case 'product_birth' :
      $messageStack->add('product_info',ENTRY_BIRTHDATE_ERROR);
      break;
      }
    }
    //SG End attribute validation
    
    
    =========================================
    5.  Open catalog/includes/languages/english.php
    =========================================
    
    **ADD AT END OF PAGE JUST BEFORE ?>:
    
    //SG Require products_options for ski passes
    define ('ENTRY_NAME_ERROR', 'Full Name is Required to Purchase a Season Pass');
    define ('ENTRY_NAME_MIN_LENGTH', '5');
    define ('ENTRY_BIRTHDATE_ERROR', 'Birthdate is Required to Purchase a Season Pass. Please enter in format mm/dd/yyyy.');
    define ('ENTRY_BIRTHDATE_MIN_LENGTH', '10');

     

     

     

    New File - save as catalog/formValidate.js

    // ----------------------------------------------------------------------
    // Javascript form validation routines.
    // Author: Stephen Poley
    //
    // Simple routines to quickly pick up obvious typos.
    // All validation routines return true if executed by an older browser:
    // in this case validation must be left to the server.
    //
    // Update Aug 2004: have tested that IE 5.0 and IE 5.5 both support DOM model
    // sufficiently well, so innerHTML option removed (redundant).
    //
    // Update Jun 2005: discovered that reason IE wasn't setting focus was
    // due to an IE timing bug. Added 0.1 sec delay to fix.
    //
    // Update Oct 2005: minor tidy-up: unused parameter removed
    // ----------------------------------------------------------------------
    
    var nbsp = 160;	// non-breaking space char
    var node_text = 3; // DOM text node-type
    var emptyString = /^\s*$/
    var glb_vfld;	  // retain vfld for timer thread
    
    // -----------------------------------------
    //				  trim
    // Trim leading/trailing whitespace off string
    // -----------------------------------------
    
    function trim(str)
    {
     return str.replace(/^\s+|\s+$/g, '')
    };
    
    
    // -----------------------------------------
    //				  setfocus
    // Delayed focus setting to get around IE bug
    // -----------------------------------------
    
    function setFocusDelayed()
    {
     glb_vfld.focus()
    }
    
    function setfocus(vfld)
    {
     // save vfld in global variable so value retained when routine exits
     glb_vfld = vfld;
     setTimeout( 'setFocusDelayed()', 100 );
    }
    
    
    // -----------------------------------------
    //				  msg
    // Display warn/error message in HTML element
    // commonCheck routine must have previously been called
    // -----------------------------------------
    
    function msg(fld,	 // id of element to display message in
    		 msgtype, // class to give element ("warn" or "error")
    		 message) // string to display
    {
     // setting an empty string can give problems if later set to a 
     // non-empty string, so ensure a space present. (For Mozilla and Opera one could 
     // simply use a space, but IE demands something more, like a non-breaking space.)
     var dispmessage;
     if (emptyString.test(message)) 
    dispmessage = String.fromCharCode(nbsp);	
     else  
    dispmessage = message;
    
     var elem = document.getElementById(fld);
     elem.firstChild.nodeValue = dispmessage;  
    
     elem.className = msgtype;   // set the CSS class to adjust appearance of message
    };
    
    // -----------------------------------------
    //			commonCheck
    // Common code for all validation routines to:
    // (a) check for older / less-equipped browsers
    // (b) check if empty fields are required
    // Returns true (validation passed), 
    //		 false (validation failed) or 
    //		 proceed (don't know yet)
    // -----------------------------------------
    
    var proceed = 2;  
    
    function commonCheck	(vfld,   // element to be validated
    					 ifld,   // id of element to receive info/error msg
    					 reqd)   // true if required
    {
     if (!document.getElementById) 
    return true;  // not available on this browser - leave validation to the server
     var elem = document.getElementById(ifld);
     if (!elem.firstChild)
    return true;  // not available on this browser 
     if (elem.firstChild.nodeType != node_text)
    return true;  // ifld is wrong type of node  
    
     if (emptyString.test(vfld.value)) {
    if (reqd) {
      msg (ifld, "error", "ERROR: ");  
      setfocus(vfld);
      return false;
    }
    else {
      msg (ifld, "warn", "");   // OK
      return true;  
    }
     }
     return proceed;
    }
    
    // -----------------------------------------
    //			validatePresent
    // Validate if something has been entered
    // Returns true if so 
    // -----------------------------------------
    
    function validatePresent(vfld,   // element to be validated
    					 ifld )  // id of element to receive info/error msg
    {
     var stat = commonCheck (vfld, ifld, true);
     if (stat != proceed) return stat;
    
     msg (ifld, "warn", "");  
     return true;
    };
    
    function validateDate( vfld, ifld ) {
     var stat = commonCheck (vfld, ifld, true);
     if (stat != proceed) return stat;
    
     var strValue = trim(vfld.value);
     var objRegExp = /^\d{1,2}(\/)\d{1,2}\1\d{4}$/
    
     //check to see if in correct format
     if(!objRegExp.test(strValue)) {
     msg (ifld, "error", "ERROR: ");
    setfocus(vfld);
    return false; //doesn't match pattern, bad date
     }
     else{
    var strSeparator = strValue.substring(2,3) //find date separator
    var arrayDate = strValue.split(strSeparator); //split date into month, day, year
    //create a lookup for months not equal to Feb.
    var arrayLookup = { '01' : 31,'03' : 31, '04' : 30,'05' : 31,'06' : 30,'07' : 31,
    					'08' : 31,'09' : 30,'10' : 31,'11' : 30,'12' : 31}
    var intDay = parseInt(arrayDate[1]);
    
    //check if month value and day value agree
    if(arrayLookup[arrayDate[0]] != null) {
      if(intDay <= arrayLookup[arrayDate[0]] && intDay != 0)
    	return true; //found in lookup table, good date
    }
    
    //check for February (bugfix 20050322)
    var intMonth = parseInt(arrayDate[0]);
    if (intMonth == 2) { 
       var intYear = parseInt(arrayDate[2]);
       if( ((intYear % 4 == 0 && intDay <= 29) || (intYear % 4 != 0 && intDay <=28)) && intDay !=0)
    	  return true; //Feb. had valid number of days
       }
     }
     msg (ifld, "error", "ERROR: ");
     setfocus(vfld);
     return false; //any other values, bad date
    }
    
    
    
    function validateOnSubmit() {
    var elem;
    var errs=0;
    // execute all element validations in reverse order, so focus gets
    // set to the first one in error.
    if (!validateDate	(document.forms.cart_quantity.txt_2,   'inf_txt_2')) errs += 1; 
    if (!validatePresent  (document.forms.cart_quantity.txt_1, 'inf_txt_1')) errs += 1; 
    
    if (errs>1)  alert('Some fields have not been completed correctly');
    if (errs==1) alert('There is a field which has not been completed correctly');
    
    return (errs==0);
    };

     

    Good luck!

  13. I'll give it a try but as I have no idea how STS works it's just a shot in the dark !

    Looking at your description of your column left I would say you have to add something like

    // STS: ADD
    $sts_block_name = 'estimatedshippingbox';
    require(STS_RESTART_CAPTURE);
    // STS: EOADD
    }

    below

    // BEGIN estimated shipping -->
    require(DIR_WS_MODULES . FILENAME_ESTIMATED_SHIPPING);
    // END estimated shipping -->
    ?>

    Question is if you need to use the real .php filename for FILENAME_ESTIMATED_SHIPPING and/or how the relation is between the include/require of an infobox and the STS_RESTART_CAPTURE part.

    If you can find, or have, information of how to add custom infoboxes to STS you should be set to go.

     

    Not much help I guess but this is something for someone using STS.

    Thanks, Howard. At least this gives me an idea of where to start. If I can come up with the answer I'll post it here so that others using STS can use it.

  14. Howard - great contribution! Thanks!

     

    I must have made an error somewhere, though, because I have not been able to get the estimated shipping box into the left column. I have installed the contribution, checked it several times, then reinstalled v1.7 and still have the same problem. My site looks like this:

    screencapture.gif

     

    My column_left.php code is:

    <?php
    /*
    $Id: column_left.php,v 1.1 2003/09/08 19:26:22 jhtalk Exp jhtalk $
    
    osCommerce, Open Source E-Commerce Solutions
    http://www.oscommerce.com
    
    Copyright (c) 2003 osCommerce
    
    Released under the GNU General Public License
    */
    // STS: ADD
    $sts_block_name = 'header2columnleft';
    require(STS_RESTART_CAPTURE);
    // STS: EOADD
    
    if ((USE_CACHE == 'true') && empty($SID)) {
    echo tep_cache_categories_box();
    } else {
    include(DIR_WS_BOXES . 'categories.php');
    }
    
    // STS: ADD
    $sts_block_name = 'categorybox';
    require(STS_RESTART_CAPTURE);
    // STS: EOADD
    
    if ((USE_CACHE == 'true') && empty($SID)) {
    echo tep_cache_manufacturers_box();
    } else {
    include(DIR_WS_BOXES . 'manufacturers.php');
    }
    
    // STS: ADD
    $sts_block_name = 'manufacturerbox';
    require(STS_RESTART_CAPTURE);
    // STS: EOADD
    
    require(DIR_WS_BOXES . 'whats_new.php');
    
    // STS: ADD
    $sts_block_name = 'whatsnewbox';
    require(STS_RESTART_CAPTURE);
    // STS: EOADD
    
    require(DIR_WS_BOXES . 'search.php');
    
    // STS: ADD
    $sts_block_name = 'searchbox';
    require(STS_RESTART_CAPTURE);
    // STS: EOADD
    
    require(DIR_WS_BOXES . 'information.php');
    
    // STS: ADD
    $sts_block_name = 'informationbox';
    require(STS_RESTART_CAPTURE);
    // STS: EOADD
    
    require(DIR_WS_BOXES . 'shopping_cart.php');
    
    // STS: ADD
    $sts_block_name = 'cartbox';
    require(STS_RESTART_CAPTURE);
    // STS: EOADD
    
    if (isset($HTTP_GET_VARS['products_id'])) include(DIR_WS_BOXES . 'manufacturer_info.php');
    
    // STS: ADD
    $sts_block_name = 'maninfobox';
    require(STS_RESTART_CAPTURE);
    // STS: EOADD
    
    if (tep_session_is_registered('customer_id')) include(DIR_WS_BOXES . 'order_history.php');
    
    // STS: ADD
    $sts_block_name = 'orderhistorybox';
    require(STS_RESTART_CAPTURE);
    // STS: EOADD
    
    if (isset($HTTP_GET_VARS['products_id'])) {
    if (tep_session_is_registered('customer_id')) {
    $check_query = tep_db_query("select count(*) as count from " . TABLE_CUSTOMERS_INFO . " where customers_info_id = '" . (int)$customer_id . "' and global_product_notifications = '1'");
    $check = tep_db_fetch_array($check_query);
    if ($check['count'] > 0) {
    include(DIR_WS_BOXES . 'best_sellers.php');
    } else {
    include(DIR_WS_BOXES . 'product_notifications.php');
    }
    } else {
    include(DIR_WS_BOXES . 'product_notifications.php');
    }
    } else {
    include(DIR_WS_BOXES . 'best_sellers.php');
    }
    
    // STS: ADD
    $sts_block_name = 'bestsellersbox';
    require(STS_RESTART_CAPTURE);
    // STS: EOADD
    
    if (isset($HTTP_GET_VARS['products_id'])) {
    if (basename($PHP_SELF) != FILENAME_TELL_A_FRIEND) include(DIR_WS_BOXES . 'tell_a_friend.php');
    } else {
    include(DIR_WS_BOXES . 'specials.php');
    }
    
    // STS: ADD
    $sts_block_name = 'specialfriendbox';
    require(STS_RESTART_CAPTURE);
    // STS: EOADD
    
    require(DIR_WS_BOXES . 'reviews.php');
    
    // STS: ADD
    $sts_block_name = 'reviewsbox';
    require(STS_RESTART_CAPTURE);
    // STS: EOADD
    
    if (substr(basename($PHP_SELF), 0, 8) != 'checkout') {
    include(DIR_WS_BOXES . 'languages.php');
    
    // STS: ADD
    $sts_block_name = 'languagebox';
    require(STS_RESTART_CAPTURE);
    // STS: EOADD
    
    include(DIR_WS_BOXES . 'currencies.php');
    
    // STS: ADD
    $sts_block_name = 'currenciesbox';
    require(STS_RESTART_CAPTURE);
    // STS: EOADD
    }
    
    // BEGIN estimated shipping -->
    require(DIR_WS_MODULES . FILENAME_ESTIMATED_SHIPPING);
    // END estimated shipping -->
    ?>

     

    Any help would be greatly appreciated.

  15. Howard - great contribution! Thanks!

     

    I must have made a small error, though, because I have not been able to get the estimated shipping box into the left column. I have installed the contribution, checked it several times, then reinstalled v1.7 and still have the same problem. My site looks like this:

    screencapture.gif

     

    My column_left.php code is:

    <?php
    /*
     $Id: column_left.php,v 1.1 2003/09/08 19:26:22 jhtalk Exp jhtalk $
    
     osCommerce, Open Source E-Commerce Solutions
     http://www.oscommerce.com
    
     Copyright (c) 2003 osCommerce
    
     Released under the GNU General Public License
    */
     // STS: ADD
     $sts_block_name = 'header2columnleft';
     require(STS_RESTART_CAPTURE);
     // STS: EOADD
    
     if ((USE_CACHE == 'true') && empty($SID)) {
    echo tep_cache_categories_box();
     } else {
    include(DIR_WS_BOXES . 'categories.php');
     }
    
     // STS: ADD
     $sts_block_name = 'categorybox';
     require(STS_RESTART_CAPTURE);
     // STS: EOADD
    
     if ((USE_CACHE == 'true') && empty($SID)) {
    echo tep_cache_manufacturers_box();
     } else {
    include(DIR_WS_BOXES . 'manufacturers.php');
     }
    
     // STS: ADD
     $sts_block_name = 'manufacturerbox';
     require(STS_RESTART_CAPTURE);
     // STS: EOADD
    
     require(DIR_WS_BOXES . 'whats_new.php');
    
     // STS: ADD
     $sts_block_name = 'whatsnewbox';
     require(STS_RESTART_CAPTURE);
     // STS: EOADD
    
     require(DIR_WS_BOXES . 'search.php');
    
     // STS: ADD
     $sts_block_name = 'searchbox';
     require(STS_RESTART_CAPTURE);
     // STS: EOADD
    
     require(DIR_WS_BOXES . 'information.php');
    
     // STS: ADD
     $sts_block_name = 'informationbox';
     require(STS_RESTART_CAPTURE);
     // STS: EOADD
    
     require(DIR_WS_BOXES . 'shopping_cart.php');
    
     // STS: ADD
     $sts_block_name = 'cartbox';
     require(STS_RESTART_CAPTURE);
     // STS: EOADD
    
     if (isset($HTTP_GET_VARS['products_id'])) include(DIR_WS_BOXES . 'manufacturer_info.php');
    
     // STS: ADD
     $sts_block_name = 'maninfobox';
     require(STS_RESTART_CAPTURE);
     // STS: EOADD
    
     if (tep_session_is_registered('customer_id')) include(DIR_WS_BOXES . 'order_history.php');
    
     // STS: ADD
     $sts_block_name = 'orderhistorybox';
     require(STS_RESTART_CAPTURE);
     // STS: EOADD
    
     if (isset($HTTP_GET_VARS['products_id'])) {
    if (tep_session_is_registered('customer_id')) {
      $check_query = tep_db_query("select count(*) as count from " . TABLE_CUSTOMERS_INFO . " where customers_info_id = '" . (int)$customer_id . "' and global_product_notifications = '1'");
      $check = tep_db_fetch_array($check_query);
      if ($check['count'] > 0) {
    	include(DIR_WS_BOXES . 'best_sellers.php');
      } else {
    	include(DIR_WS_BOXES . 'product_notifications.php');
      }
    } else {
      include(DIR_WS_BOXES . 'product_notifications.php');
    }
     } else {
    include(DIR_WS_BOXES . 'best_sellers.php');
     }
    
     // STS: ADD
     $sts_block_name = 'bestsellersbox';
     require(STS_RESTART_CAPTURE);
     // STS: EOADD
    
     if (isset($HTTP_GET_VARS['products_id'])) {
    if (basename($PHP_SELF) != FILENAME_TELL_A_FRIEND) include(DIR_WS_BOXES . 'tell_a_friend.php');
     } else {
    include(DIR_WS_BOXES . 'specials.php');
     }
    
     // STS: ADD
     $sts_block_name = 'specialfriendbox';
     require(STS_RESTART_CAPTURE);
     // STS: EOADD
    
     require(DIR_WS_BOXES . 'reviews.php');
    
     // STS: ADD
     $sts_block_name = 'reviewsbox';
     require(STS_RESTART_CAPTURE);
     // STS: EOADD
    
     if (substr(basename($PHP_SELF), 0, 8) != 'checkout') {
    include(DIR_WS_BOXES . 'languages.php');
    
    // STS: ADD
    $sts_block_name = 'languagebox';
    require(STS_RESTART_CAPTURE);
    // STS: EOADD
    
    include(DIR_WS_BOXES . 'currencies.php');
    
    // STS: ADD
    $sts_block_name = 'currenciesbox';
    require(STS_RESTART_CAPTURE);
    // STS: EOADD
     }
    
      // BEGIN estimated shipping -->
    require(DIR_WS_MODULES . FILENAME_ESTIMATED_SHIPPING);
    // END estimated shipping -->
    ?>

     

    Can anyone please help?

  16. Hello - great contribution!

     

    I have installed this contribution and it works as advertised. I do have a problem, however.

     

    All of my products are downloadable (virtual) software products. As such I offer the customer the ability to return to the store for 1 year to securely download updates. This is where the problem lies...

     

    Since PWA is installed it appears that the purchasing customer is not added to the customers table, just the orders table ( I can't see the customer in the Admin -> Customers section just the Admin -> Orders section).

     

    So, the customer cannot return to the site to A) login B) retrieve software updates.

     

    Is there a solution to this problem?

     

    I actually thought the way this contribution worked would be to enter the customer into the customers table with a random password and if they come to the site to login we'd just send them a new randomly generated password which would allow them to return to the site to login and download software.

     

    Help?

     

    I don't know if this will help, but we have a client who doesn't want customers to even have the option of creating an account - all transactions are PWA. However the client also wants to be able to use the newsletter function to update customers on special events, etc. which means the email address must be in the Customers table.

     

    We maintain the client first name, last name and email address in a CSV file. When the client is ready to do a newsletter (monthly for about 6 mos out of the year), we import this data into the Customers table so they can send a newsletter.

     

    Could you do something similar to this to continue to provide access to your customers?

  17. Hello, Yes I am still getting the errors. I have run the second and third commands again and I got the following error.

    ERROR:

    SQL query:

     

    INSERT INTO configuration_group

    VALUES ( 40, 'Accounts', 'Configuration of Account settings', 40, 1 )

     

    MySQL said:

     

    #1062 - Duplicate entry '40' for key 1

     

    This means that the values have already been inserted, so this is OK.

     

    When I try to create account I get this error:

     

    1054 - Unknown column 'purchased_without_account' in 'field list'

     

    select customers_id, customers_email_address, purchased_without_account from customers where customers_email_address = '***.***'

     

    [TEP STOP]

     

    When I try to proceed to directly to checkout I get this error:

     

    1054 - Unknown column 'purchased_without_account' in 'field list'

     

    select customers_id, purchased_without_account, customers_firstname, customers_password, customers_email_address, customers_default_address_id from customers where upper(customers_email_address) = '*.*' and upper(customers_firstname) = '***' and upper(customers_lastname) = '***'

     

    [TEP STOP]

     

    These error messages indicate that the 'purchased_without_account' field has not been inserted into the 'customers' table.

  18. I checked the other two commands for configuration and configuration_groups and I don't see the information in there. Is it this that may be missing?

    Yes, this absolutely could be the problem. Run the necessary SQL command again and test your site.

     

    Also, as djmonkey inquired: Are you still getting errors? If so, please post them verbatim, as this will help those in the forum assist you.

  19. Hi, I am pretty sure I processed the whole thing. Is there a way to check?

    Go into your PHP MyAdmin and look at the tables. Based on your SQL command you can view and analyze. Your error message indicates that you are missing a field called purchased_without_account.

    • The first SQL command reads
      ALTER TABLE customers ADD purchased_without_account TINYINT(1) UNSIGNED DEFAULT '0' NOT NULL AFTER customers_id;
      which means that your customers table should have this field.
       
    • The last SQL command reads
      ALTER TABLE orders ADD purchased_without_account TINYINT (1) UNSIGNED DEFAULT '0' NOT NULL;
      so there should be a purchased_without_account field in your orders table as well.

    If one of them is missing, run the SQL command for the table that is missing that field.

  20. I have added the PWA contribution and I am now getting the following error when I try to create a new account. What do I need to fix?

     

    1054 - Unknown column 'purchased_without_account' in 'field list'

     

    select customers_id, customers_email_address, purchased_without_account from customers where customers_email_address = '****'

     

    [TEP STOP]

     

    Thanks

     

    Jay d

     

    This means that somehow that field didn't get added when you ran your SQL command earlier. Which version of PWA are you installing?

     

    I have added the PWA contribution and I am now getting the following error when I try to create a new account. What do I need to fix?

     

    1054 - Unknown column 'purchased_without_account' in 'field list'

     

    select customers_id, customers_email_address, purchased_without_account from customers where customers_email_address = '****'

     

    [TEP STOP]

     

    Thanks

     

    Jay d

    Actually I just checked the documentation and it doesn't matter which version - the SQL commands are the same.

     

    When you ran it earlier, did you make sure that all 4 commands were run? You don't have to do them individually, but all 4 must be included. The commands are:

    ALTER TABLE customers ADD purchased_without_account TINYINT(1) UNSIGNED DEFAULT '0' NOT NULL AFTER customers_id;
    
    ALTER TABLE customers ADD INDEX (purchased_without_account);
    
    INSERT INTO configuration_group VALUES (40, 'Accounts', 'Configuration of Account settings', 40, 1);
    INSERT INTO configuration VALUES ('', 'Purchase Without Account', 'PWA_ON','true','Allow Customers to purchase without an account', 40, 1, '2003-04-08 13:07:44', '2003-04-08 12:10:51', NULL, 'tep_cfg_select_option(array(\'true\', \'false\'),');
    
    ALTER TABLE orders ADD purchased_without_account TINYINT (1) UNSIGNED DEFAULT '0' NOT NULL;

  21. Thank you for your help. I did that and it said it was successful. Do I have to do anything else after that or do I just close myphpadmin and I'm done?

     

    Jay d

     

    You're done! Pretty slick, B) eh?

     

    All this process does is add the appropriate fields and whatever content is necessary to implement the function.

     

    The alternative is to do it manually, so I think it's very cool that the authors of the contributions provide an SQL file to save time. It also insures accuracy. :thumbsup:

  22. Hello, I'm sorry if this has been asked before but I can't seem to find anything on it. I am trying to install the "Purchase without Account" and have come to a point where it tells you to

     

    "Go into your server's backend and use a SQL tool such as PHPMYADMIN to run the following SQL scripts. "

     

    I am not sure how to do that. I have never used the phpmyadmin and don't know where to start. Can anyone help me please.

     

    Thank you,

     

    Jay d

     

    Easy stuff, jay d:

     

    Login to PHPMyAdmin

    Click on the SQL tab (sometimes you have to first click on a table in the left column for the SQL tab to show)

    Copy all of the text that is in the pwa_install.sql file

    Paste it into the SQL text field (titled "Run SQL query/queries on database yourdatabasename" or similar)

    Click
    Go

    Taa daaaah! You're done.

  23. hi all,

     

    i've asked this elsewhere but no replies.

     

    if i have a product with a TEXT attribute, and a customer buys two, only the attributes from the last one are stored in the cart.

     

    if i remove the TEXT attribute, it works as expected, with two separate items in the cart , each with their own attributes.

     

    is this a fault of the contribution or have i done something wrong somewhere?

     

    thanks

    john

     

    I added this contribution and mine works fine using TEXT attributes in the scenario you describe.

     

    Check your code modifications. I found WinMerge to be a great help in finding small coding errors. It's open source software and you can download it at http://sourceforge.net/projects/winmerge.

×
×
  • Create New...