Jump to content

jdice

Members
  • Content count

    105
  • Joined

  • Last visited

Posts posted by jdice


  1. Hi...I uploaded googlesitemap generator by bobby about a year ago. It only has two files...googlesitemapcategories.php & googlesitemapproducts.php. Then I go to google.com/webmasters/sitemaps and put my website in. However, the googlesitecategories.php is fine but googlesitemapproducts.php is not. Google is giving me this error: 1193 Invalid date

    An invalid date was found. Please fix the date or formatting before resubmitting....FOR MY googlesitemapproducts.php page. does anyone know how I fix this? Here is my products.php page:

    <?php 
           /** 
            * Google Sitemap Generator 
            *  
            * Script to generate a Google sitemap for osCommerce based stores 
            * 
            * @license http://opensource.org/licenses/gpl-license.php GNU Public License 
            * @version 1.2 
            * @link http://www.oscommerce-freelancers.com/ osCommerce-Freelancers 
            * @copyright Copyright 2006, Bobby Easland  
            * @author Bobby Easland  
            * @filesource 
            */ 
    
           /* 
            * Include the application_top.php script 
            */ 
           include_once('includes/application_top.php'); 
    
           /* 
            * Send the XML content header 
            */ 
           header('Content-Type: text/xml'); 
    
           /* 
            * Echo the XML out tag 
            */ 
           echo '<?xml version="1.0" encoding="UTF-8"?>' . "\n"; 
    ?> 
    <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"> 
    <?php 
    
           /* 
            * Define the uniform node function  
            */ 
           function GenerateNode($data){ 
                   $content = ''; 
                   $content .= "\t" . '<url>' . "\n"; 
                   $content .= "\t\t" . '<loc>'.trim($data['loc']).'</loc>' . "\n"; 
                   $content .= "\t\t" . '<lastmod>'.trim($data['lastmod']).'</lastmod>' . "\n"; 
                   $content .= "\t\t" . '<changefreq>'.trim($data['changefreq']).'</changefreq>' . "\n"; 
                   $content .= "\t\t" . '<priority>'.trim($data['priority']).'</priority>' . "\n"; 
                   $content .= "\t" . '</url>' . "\n"; 
                   return $content; 
           } # end function 
    
           /* 
            * Define the SQL for the products query  
            */ 
           $sql = "SELECT products_id as pID,  
                                                                    products_date_added as date_added,  
                                                                    products_last_modified as last_mod,  
                                                                    products_ordered   
                                           FROM " . TABLE_PRODUCTS . "  
                                           WHERE products_status = '1'  
                                           ORDER BY products_last_modified DESC,  
                                                    products_date_added DESC,  
                                                                            products_ordered DESC"; 
    
           /* 
            * Execute the query 
            */ 
           $query = tep_db_query($sql); 
    
           /* 
            * If there are returned rows... 
            * Basic sanity check  
            */ 
           if ( tep_db_num_rows($query) > 0 ){ 
    
                   /* 
                    * Initialize the variable containers 
                    */ 
                   $container = array(); 
                   $number = 0; 
                   $top = 0; 
    
                   /* 
                    * Loop the query result set 
                    */ 
                   while( $result = tep_db_fetch_array($query) ){ 
                           $top = max($top, $result['products_ordered']); 
                           $location = tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $result['pID'], 'NONSSL', false); 
                           if ( tep_not_null($result['last_mod']) ){ 
                                   $lastmod = $result['last_mod']; 
                           } else { 
                                   $lastmod = $result['date_added']; 
                           } 
                           $changefreq = 'weekly'; 
                           $ratio = ($top > 0) ? ($result['products_ordered']/$top) : 0; 
                           $priority = $ratio < .1 ? .1 : number_format($ratio, 1, '.', '');  
    
                           /* 
                            * Initialize the content container array 
                            */ 
                           $container = array('loc' => htmlspecialchars(utf8_encode($location)), 
                                                                                                    'lastmod' => date ("Y-m-d", strtotime($lastmod)), 
                                                                                                    'changefreq' => $changefreq, 
                                                                                                    'priority' => $priority 
                                                                                                   ); 
    
                           /* 
                            * Echo the generated node 
                            */ 
                           echo generateNode($container); 
                   } # end while 
           } # end if 
    
           /* 
            * Close the urlset 
            */ 
           echo '</urlset>'; 
    
           /* 
            * Include the application_bottom.php script  
            */ 
           include_once('includes/application_bottom.php'); 
    ?>


  2. Hi...I uploaded googlesitemap generator by bobby about a year ago. It only has two files...googlesitemapcategories.php & googlesitemapproducts.php. Then I go to google.com/webmasters/sitemaps and put my website in. However, the googlesitecategories.php is fine but googlesitemapproducts.php is not. Google is giving me this error: 1193 Invalid date

    An invalid date was found. Please fix the date or formatting before resubmitting. How do I do that?

     

    Also, shouldn't I be submitting an index page to google? Like mysite.com/catalog instead of mysite.com? Thanks for help and time, Sincerely, Janet

     

    I am not sure what to do. my server date and time is this: 10/18/2009 22:04:17

     

    Here is my googlesitemapproducts.php page:

    <?php
    /**
     * Google Sitemap Generator
     * 
     * Script to generate a Google sitemap for osCommerce based stores
     *
     * @license http://opensource.org/licenses/gpl-license.php GNU Public License
     * @version 1.2
     * @link http://www.oscommerce-freelancers.com/ osCommerce-Freelancers
     * @copyright Copyright 2006, Bobby Easland 
     * @author Bobby Easland 
     * @filesource
     */
    
    /*
     * Include the application_top.php script
     */
    include_once('includes/application_top.php');
    
    /*
     * Send the XML content header
     */
    header('Content-Type: text/xml');
    
    /*
     * Echo the XML out tag
     */
    echo '<?xml version="1.0" encoding="UTF-8"?>' . "\n";
    ?>
    <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
    <?php
    
    /*
     * Define the uniform node function 
     */
    function GenerateNode($data){
    	$content = '';
    	$content .= "\t" . '<url>' . "\n";
    	$content .= "\t\t" . '<loc>'.trim($data['loc']).'</loc>' . "\n";
    	$content .= "\t\t" . '<lastmod>'.trim($data['lastmod']).'</lastmod>' . "\n";
    	$content .= "\t\t" . '<changefreq>'.trim($data['changefreq']).'</changefreq>' . "\n";
    	$content .= "\t\t" . '<priority>'.trim($data['priority']).'</priority>' . "\n";
    	$content .= "\t" . '</url>' . "\n";
    	return $content;
    } # end function
    
    /*
     * Define the SQL for the products query 
     */
    $sql = "SELECT products_id as pID, 
    							 products_date_added as date_added, 
    							 products_last_modified as last_mod, 
    							 products_ordered  
    				FROM " . TABLE_PRODUCTS . " 
    				WHERE products_status = '1' 
    				ORDER BY products_last_modified DESC, 
    				         products_date_added DESC, 
    								 products_ordered DESC";
    
    /*
     * Execute the query
     */
    $query = tep_db_query($sql);
    
    /*
     * If there are returned rows...
     * Basic sanity check 
     */
    if ( tep_db_num_rows($query) > 0 ){
    
    	/*
    	 * Initialize the variable containers
    	 */
    	$container = array();
    	$number = 0;
    	$top = 0;
    
    	/*
    	 * Loop the query result set
    	 */
    	while( $result = tep_db_fetch_array($query) ){
    		$top = max($top, $result['products_ordered']);
    		$location = tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $result['pID'], 'NONSSL', false);
    		if ( tep_not_null($result['last_mod']) ){
    			$lastmod = $result['last_mod'];
    		} else {
    			$lastmod = $result['date_added'];
    		}
    		$changefreq = 'weekly';
    		$ratio = ($top > 0) ? ($result['products_ordered']/$top) : 0;
    		$priority = $ratio < .1 ? .1 : number_format($ratio, 1, '.', ''); 
    
    		/*
    		 * Initialize the content container array
    		 */
    		$container = array('loc' => htmlspecialchars(utf8_encode($location)),
    							 				 'lastmod' => date ("Y-m-d", strtotime($lastmod)),
    							 				 'changefreq' => $changefreq,
    							 				 'priority' => $priority
    											);
    
    		/*
    		 * Echo the generated node
    		 */
    		echo generateNode($container);
    	} # end while
    } # end if
    
    /*
     * Close the urlset
     */
    echo '</urlset>';
    
    /*
     * Include the application_bottom.php script 
     */
    include_once('includes/application_bottom.php');
    ?>


  3. No, you need to disable everything except UPS Ground. Use the choices in the UPS module setup menu.

     

    Regards

    Jim

     

    Okay...you are probably going to think I am the stupidest person on this planet. I did not check any choices in the UPS module setup menu. I should have known to. I guess when I had installed a previous DHL shipping module...I had to go in and comment out code to exclude certain shipping options. In this MVS, you can do that in the adminstration section. I feel so stupid. Now I am getting UPS ground quotes back.

     

    Thanks for your time,

    Janet


  4. It appears that UPS is responding correctly. This means that something in your site is not showing the information from the module. I'm not familiar with your template, but it could be that it is not showing multi-line quotes correctly. You could try disabling everything except UPS Ground and see if that works. Otherwise I'm stumped.

     

    Regards

    Jim

     

    I tried disabling everything but ups...just ups symbol and weight shows up...not shipping quote.


  5. Okay, I replaced both you@yourdomain.com with my email address and took the slashes/star out.

     

    what next?

    Okay I ran a sale through...this is what ups sends me:

     

    UPSOnLine4%1DM%08846%US%46219%US%105%2%76.16%0.00%76.16% 8:00 A.M.%
    4%1DA%08846%US%46219%US%105%2%44.38%0.00%44.38%10:30 A.M.%
    4%1DP%08846%US%46219%US%135%2%40.80%0.00%40.80%End of Day%
    4%2DA%08846%US%46219%US%205%2%18.19%0.00%18.19%End of Day%
    4%3DS%08846%US%46219%US%305%2%13.48%0.00%13.48%End of Day%
    4%GND%08846%US%46219%US%005%2%10.34%0.00%10.34%End of Day%
    
    


  6. It's unlikely to be a template problem if you have that much working. Now it's time to see what UPS is returning. Find this code in catalog/includes/modules/vendor_shipping/ups.php:

     

    /*
    mail('you@yourdomain.com','UPS response',$body,'From: <you@yourdomain.com>');
    */

    and remove the comments and replace you@yourdomain.com with your email address.

     

    Regards

    Jim

    Okay, I replaced both you@yourdomain.com with my email address and took the slashes/star out.

     

    what next?


  7. UPS is quirky and can be a pain to get working. If you have the standard module working, make certain that you have all of the settings in the vendor version exactly the same. You can change them to your vendor's settings once you have verified that the module works correctly. You must be on the Production server as well. Good luck, and ask again if you are still having problems.

     

    Regards

    Jim

    Do you think the fact that I have BTS template would affect the installation of this module. I have installed several contributions splitting files in both the catalog area and template/fallback folder before with no problems. But I did look at the osmax version of MVS and compared it alittle. I do not have Osmax. I just have a bts template. I noticed the sql files were vastly different. If so...do you know what files need to be changed. It is mostly working...flat rates are working just fine. and UPS symbol is showing up during checkout and so are the pounds. I am just not getting ups quotes back during checkout.

     

    Just thought I would ask...I know you don't have all day to help us self learners. ...so don't feel like you have to answer all my questions. But I know sometimes...it could be something simple you already know...I could quickly change.

     

    Thanks for your help so far,

    Janet


  8. Okay...it is late....I will look at my version of MVS. When I have MVS turned on...UPS and my flat fee come up...but UPS is not returning quotes. Only my flat fee quote is coming up. Maybe there is another reason I am overlooking. I will look into it some more. Maybe I don't need to modify regular shipping modules as I thought. If MVS is supposed to work after installation..right out of box...then I have done something wrong. Maybe there is another reason UPS is not returning quotes. Well, now I have us both scratching our heads.

     

    Janet

     

    The table module supplied with MVS should just work, so I'm at a loss to understand the need to modify it all over again. Good practice for modding shipping modules, maybe.

     

    There are two UPS shipping modules in the MVS distribution: UPS Choice and UPSXML. Both of them are working in stores that I have built and currently maintain. You need to use the Vendors section of your admin to access these. True, these modules only work with MVS turned on, so you'll need the standard module if you turn it off.

     

    Note that the standard modules go in catalog/includes/modules/shipping/ while the MVS-modified ones are in catalog/includes/modules/vendor_shipping/. Putting a module in the wrong place will cause all sorts of errors.

     

    I'm wandering around here because I still don't understand the problem. Help?

     

    Regards

    Jim


  9. Well...my version of oscommerce did not have a ups module at all. I have a shop with two different suppliers. One supplier ships with a flat fee...the other supplier uses ups. i have used Multivendorshipping in the past. This worked quite well with two different shipping methods. So I upload MVSV1.1 like I did before. I first modifed the Table module to work with mvs. This took care of my flat rate shipping. Then I realized I did not even have ups to begin with as one of my shipping modules in my original oscommerce. So I upload UPS Choice. Got it working perfectly by itself...UPS Choice returned quotes just fine. And then I went to modify the UPS Choice file to work with MVS but I have been unsuccessful. When I enable MVS in my administration by clicking TRUE. My checkout page show UPS and flat rate shipping as options however, UPS is not returning any quotes. However, when I click False turning of MVS. UPS choice returns quotes just fine by itself. So I must have modified catalog/shipping/modules/ups wrong.

     

    If there is an easier way to do this...I open to suggestions.

     

    Janet

     

     

     

    Not a bother, since it mostly hurts you. We usually search through the new posts for ones with zero responses, so yours was more likely to be overlooked. Fortunately I spotted the MVS in your title and took a look.

     

    The version of UPS Choice included with MVS is older than the current version from the UPS Choice Contribution. Is this why you are modifying this one rather than just using the module provided? Is there some bug in the old version, or some feature in the new one that you need? Have you tried the modified version? I can help more if I know what you are trying to accomplish here.

     

    Regards

    Jim


  10. Hello, Thank you for your response. However, I believe you have to adapt the existing UPS Choice Shipping Module to work the MVS UPS Choice Module. It involves alot of moifications. I first did the table module which was easy but I am not having such an easy time adapting the UPS choice Shipping Module to work with MVS. There seem to be alot of modifcations. I was hoping to compare my files to someone else's. The needed modified file I am referring to is: catalog/includes/modules/shipping/ups.php. This file I believe must be modified properly to work with MVS.

     

    Sorry if anyone thought I was being pushy bumping my post...just thought my post was getting lost in the shuffle. I have spent a month on this total trying to solve this myself and searching/googling oscommerce solutions extensively before asking for help over a week ago. So after a long day of searching again, and repeated attempted trials...I did finally post again in hopes someone would see my post who had knowledge. I honestly meant no harm. Sincere apologizes to anyone I bothered.

     

    Thank you again and I will continue working on this:)

    Janet

     

    quote name='kymation' date='Feb 27 2009, 06:45 PM' post='1374335']

    Not trying to be rude, but please don't bump your posts. It makes it less likely that you will get an answer.

     

    The UPS Choice module is included with the MVS distribution. See catalog/includes/modules/vendors_shipping/ups.php.

     

    Regards

    Jim


  11. Hi....Not to be bum...but was wondering if anyone has modified UPS CHOICE files to work with MVS(multivendor shipping)? I think it is just two files that have to be modified....includes/modules/shipping/ups AND includes/languages/english/modules/shipping/ups files? I have spend all day on this...and taking a break finally. The TABLE file in the example modifications(instructions for modifications) are vastly different from UPS files. I'm not sure I am even doing it right.

     

    I have got UPS choice to work just fine in the original shipping modules that come with oscommerce. However, not with MVS. I know I have to do alot of modifications to the two files above to get them to work together.

     

    I was just wondering if someone has already conquered this and willing to share it?

     

    Thanks for viewing my post,

    Janet

     

    ANYONE???


  12. Hi....Not to be bum...but was wondering if anyone has modified UPS CHOICE files to work with MVS(multivendor shipping)? I think it is just two files that have to be modified....includes/modules/shipping/ups AND includes/languages/english/modules/shipping/ups files? I have spend all day on this...and taking a break finally. The TABLE file in the example modifications(instructions for modifications) are vastly different from UPS files. I'm not sure I am even doing it right.

     

    I have got UPS choice to work just fine in the original shipping modules that come with oscommerce. However, not with MVS. I know I have to do alot of modifications to the two files above to get them to work together.

     

    I was just wondering if someone has already conquered this and willing to share it?

     

    Thanks for viewing my post,

    Janet


  13. In the Vendor list, highlight the Vendor you want to add shipping to, and select the "Manage" button from the right. Then you will see a listing of all the shipping modules available, they will be worked with the same way you work with "Modules" in osCommerce.

     

    Good luck, Craig :)

     

    Okay...that was so silly of me...how could I have overlooked it. I was clicking all those buttons. I had remembered seeing it before...but couldn't remember where. I must have thought I clicked on the manage button the second time around and didn't. Gosh thanks for your help.

     

    Janet :rolleyes:


  14. No, "tep_href_link" is defined in "includes/functions/html_output.php"

     

    This is a function built to make sure sessions id's and other background data is being passed properly.

     

    Check that file and see if there are any issues there, Craig :)

     

    okay...I finally got the vendor module working....I had a couple files in the wrong place...some minor corrections in code as well.

     

    So now I have set up a sample vendor 1 ...but I see no shipping option to choose from for each particular vendor I use...like ups or flat rates or table rates...

     

    I see a place for handling charges....tare weight...etc...but no shipping option to choose from for each vendor.

    where do I do this at?

     

    Sincerely,

    Janet


  15. Okay...to anyone who can help...I have finished what I thought were table modifications.

     

    However, In the beginning in the module instructions...it says to take the table.php file from catalog/includes/modules/shipping/table.php and to make changes to this file.

     

    At the end...after all modifications are done...it says to put it in the file to includes/modules/vendor_shipping/and close it.

     

    Now I am confused. Because when I went to my cpanel and tried to upload it to includes/modules/vendor_shipping/ and to save it as table.php.

     

    There is already a modified MVS file there...

     

    Why don't I just put the table.php file back to where I got it from to begin with ....like the catalog/includes/modules/shipping/table.php ???

     

    Or did I just modify the wrong file????

     

    Please someone respond to this...if you know the answer.

     

    Janet


  16. I think I have figured this one out...but now I am stuck on another part of the instructions where it says ....

     

    Now things get interesting. The changes in this section vary widely between modules, so I

    can only give you general instructions. You need to make changes to all of the constants

    in the quote method, which is all of the code between these lines (where the row of dots

    is):

     

    my function codes look really different compared to the ones in the instructions..mine have no row of dots also...this is what mine looks like...how do I change it:

     

    if ($this->tax_class > 0) {

    $this->quotes['tax'] = tep_get_tax_rate($this->tax_class, $order->delivery['country']['id'], $order->delivery['zone_id']);

    }

     

    if (tep_not_null($this->icon)) $this->quotes['icon'] = tep_image($this->icon, $this->title);

     

    return $this->quotes;

     

    Janet

     

    Nevermind...I was looking in the wrong spot...mine are located differently in the file...actually further up the file...and they do look like the example given. Not sure they are the only ones...but from I can see...they look the same. But there was my original post further up...step one of the table module modifications...I still need answered. So if someone has a moment...to look and help to answer my question.

     

    Janet


  17. Okay....I'm a kind of thrown for a loop here. I've been able to manage to upload several contributions...but these instructions are not very clear to me.

     

    Next, look at the rest of the constants listed near the ones that you commented out. You

    can ignore any of the constants that contain the string _TEXT_; those will not change. If

    there are more that are similar to the ones you have commented out, you'll need to make

    changes to those as well. For example (from a different module of course), you might have

    a module that requires a username and password to access a remote server:

     

    ---------------------------------------------------------------------------------------

    $this->access_username = MODULE_SHIPPING_BAX_USERNAME; //Set in admin

    $this->access_password = MODULE_SHIPPING_BAX_PASSWORD; //Set in admin

    ---------------------------------------------------------------------------------------

    First, comment those lines out. Next, copy the following code for each of the constants

    that you have found:

     

    ---------------------------------------------------------------------------------------

    function foo($vendors_id='1') {

    $this->foo = constant('CONSTANT_' . $vendors_id);

    return $this->foo;

    }

     

    Now......do I comment out the $this codes above and what do I do with the function foo codes above...copy them to where?

     

    I know if I had an example...I would understand this better....but this is puzzling to me.

     

    Janet

     

    I think I have figured this one out...but now I am stuck on another part of the instructions where it says ....

     

    Now things get interesting. The changes in this section vary widely between modules, so I

    can only give you general instructions. You need to make changes to all of the constants

    in the quote method, which is all of the code between these lines (where the row of dots

    is):

     

    my function codes look really different compared to the ones in the instructions..mine have no row of dots also...this is what mine looks like...how do I change it:

     

    if ($this->tax_class > 0) {

    $this->quotes['tax'] = tep_get_tax_rate($this->tax_class, $order->delivery['country']['id'], $order->delivery['zone_id']);

    }

     

    if (tep_not_null($this->icon)) $this->quotes['icon'] = tep_image($this->icon, $this->title);

     

    return $this->quotes;

     

    Janet


  18. Okay....I'm a kind of thrown for a loop here. I've been able to manage to upload several contributions...but these instructions are not very clear to me.

     

    Next, look at the rest of the constants listed near the ones that you commented out. You

    can ignore any of the constants that contain the string _TEXT_; those will not change. If

    there are more that are similar to the ones you have commented out, you'll need to make

    changes to those as well. For example (from a different module of course), you might have

    a module that requires a username and password to access a remote server:

     

    ---------------------------------------------------------------------------------------

    $this->access_username = MODULE_SHIPPING_BAX_USERNAME; //Set in admin

    $this->access_password = MODULE_SHIPPING_BAX_PASSWORD; //Set in admin

    ---------------------------------------------------------------------------------------

     

     

    First, comment those lines out. Next, copy the following code for each of the constants

    that you have found:

     

    ---------------------------------------------------------------------------------------

    function foo($vendors_id='1') {

    $this->foo = constant('CONSTANT_' . $vendors_id);

    return $this->foo;

    }

     

    Now......do I comment out the $this codes above and what do I do with the function foo codes above...copy them to where?

     

    I know if I had an example...I would understand this better....but this is puzzling to me.

     

    Janet


  19. Hello,

     

    I am now doing the table modules under shipping. I am needing some example. Where it says....

     

    There are six constants in the above

    code that need to be changed. They are similar to the constants that we commented

    out in the previous section. Using the commented-out code, make changes to the above

    constants to make them match the ones that we removed. Don't delete the underscore at the

    end of the new constants; we need that.

     

    Well...here is a commented out constant from above...

     

    //$this->sort_order = MODULE_SHIPPING_TABLE_SORT_ORDER;

     

    Here is the code I am to change to make it look alike...

     

    $this->sort_order = @constant('MODULE_SHIPPING_TABLE_SORT_ORDER_' . $vendors_id);

    } else {

     

    What do I change? What should it look like? do i take $vendors_id out?

     

    Janet


  20. STILL NEEDING HELP. I just realized that ultimate seo urls also changes the html_output file also....could these two contributions...MVS and ULTIMATE SEO URLS be causing conflict?

     

    Could this be why I am shown this error(below) after I login to my administration?

     

    Error!

     

    Unable to determine the page link!

     

    Function used:

     

    tep_href_link('', '', '')

     

    Anyone familiar with hardcoding enough to help and maybe take a look at my html_output file above???

    Janet

     

    Hello,

     

    I totally tookout the administrative side and reuploaded. I had a couple files in the wrong place and when I thought I uploaded database files...they weren't there. I reloaded them and now vendor module is in.

     

    Janet


  21. Hey Chris, I'm trying to do the same thing and haven't been able to find a contribution that does it... have you had any luck?? Thanks!

     

    Tyler

    Your might take a look at this one below.... I would not suggest Multi-vendor Shipping. There is not much support for it. I tried MVS. I wished I had went this route instead.

     

    But I think this contribution has per product shipping.

    http://forums.oscommerce.com/index.php?showtopic=290520


  22. hi

     

    has anyone ported multvendor shipping (MVS) for BTS yet? If so...I would love a copy of your files and changes made MVS to make is work with BTS...if anyone still has it?

     

    Janet

    ANYONE?


  23. Thank you, I appreciate you sayin gthat. Yes, I always support mine, though it may not be as quickly as I would like. No, I haven't done an Articles Manager contribution.

     

    Jack

     

    Hi...I am getting this error(below) after I try to login to my administration after trying to install the Multi-vendor shipping contribution. Will dynamic sitemap help me find the problem in my administration? Everyone keeps talking about categories and site pages...so I wondering if it will detect a fix in the administration side.

     

    Error!

     

    Unable to determine the page link!

     

    Function used:

     

    tep_href_link('', '', '')

     

    Signed,

    Janet


  24. Hi...can anyone help???

     

    I have uploaded MVS to my store. I have not done the modules file yet. But when I try to login to my administration...I get a blank page that says this:

     

    Error!

     

    Unable to determine the page link!

     

    Function used:

     

    tep_href_link('', '', '')

     

    I don't know what I am looking for to fix it? I have a BTS template...but from I am reading other BTS users have used this MVS contribution. You do have to place a couple things in the fallback files...but I have done that lots of times with other contributions...so I am making changes in the correct places. Someone suggested my html_output file.

     

    Should I look in ...admin/includes/functions/html_output? Well here is the html_output file...if anyone can look at it and help. Sorry...I hate take up space

     

    Janet

    <?php
    /*
     $Id: html_output.php,v 1.29 2003/06/25 20:32:44 hpdl Exp $
    
     Modified for MVS V1.0 2006/03/25 JCK/CWG
     osCommerce, Open Source E-Commerce Solutions
     [url="http://www.oscommerce.com"]http://www.oscommerce.com[/url]
    
     Copyright © 2006 osCommerce
    
     Released under the GNU General Public License
    */
    
    ////
    // The HTML href link wrapper function
    //  function tep_href_link($page = '', $parameters = '', $connection = 'NONSSL') {
       if ($page == '') {
         die('</td></tr></table></td></tr></table><br><br><font color="#ff0000"><b>Error!</b></font><br><br><b>Unable to determine the page link!<br><br>Function used:<br><br>tep_href_link(\'' . $page . '\', \'' . $parameters . '\', \'' . $connection . '\')</b>');
       }
       if ($connection == 'NONSSL') {
         $link = HTTP_SERVER . DIR_WS_ADMIN;
       } elseif ($connection == 'SSL') {
         if (ENABLE_SSL == 'true') {
           $link = HTTPS_SERVER . DIR_WS_ADMIN;
         } else {
           $link = HTTP_SERVER . DIR_WS_ADMIN;
         }
       } else {
         die('</td></tr></table></td></tr></table><br><br><font color="#ff0000"><b>Error!</b></font><br><br><b>Unable to determine connection method on a link!<br><br>Known methods: NONSSL SSL<br><br>Function used:<br><br>tep_href_link(\'' . $page . '\', \'' . $parameters . '\', \'' . $connection . '\')</b>');
       }
       if ($parameters == '') {
         $link = $link . $page . '?' . SID;
       } else {
         $link = $link . $page . '?' . $parameters . '&' . SID;
       }
    
       while ( (substr($link, -1) == '&') || (substr($link, -1) == '?') ) $link = substr($link, 0, -1);
    
       return $link;
    //  }
    
     function tep_catalog_href_link($page = '', $parameters = '', $connection = 'NONSSL') {
       if ($connection == 'NONSSL') {
         $link = HTTP_CATALOG_SERVER . DIR_WS_CATALOG;
       } elseif ($connection == 'SSL') {
         if (ENABLE_SSL_CATALOG == 'true') {
           $link = HTTPS_CATALOG_SERVER . DIR_WS_CATALOG;
         } else {
           $link = HTTP_CATALOG_SERVER . DIR_WS_CATALOG;
         }
       } else {
         die('</td></tr></table></td></tr></table><br><br><font color="#ff0000"><b>Error!</b></font><br><br><b>Unable to determine connection method on a link!<br><br>Known methods: NONSSL SSL<br><br>Function used:<br><br>tep_href_link(\'' . $page . '\', \'' . $parameters . '\', \'' . $connection . '\')</b>');
       }
       if ($parameters == '') {
         $link .= $page;
       } else {
         $link .= $page . '?' . $parameters;
       }
    
       while ( (substr($link, -1) == '&') || (substr($link, -1) == '?') ) $link = substr($link, 0, -1);
    
       return $link;
     }
    
    ////
    // The HTML image wrapper function
     function tep_image($src, $alt = '', $width = '', $height = '', $parameters = '') {
       $image = '<img src="' . tep_output_string($src) . '" border="0" alt="' . tep_output_string($alt) . '"';
    
       if (tep_not_null($alt)) {
         $image .= ' title=" ' . tep_output_string($alt) . ' "';
       }
    
       if (tep_not_null($width) && tep_not_null($height)) {
         $image .= ' width="' . tep_output_string($width) . '" height="' . tep_output_string($height) . '"';
       }
    
       if (tep_not_null($parameters)) $image .= ' ' . $parameters;
    
       $image .= '>';
    
       return $image;
     }
    
    ////
    // The HTML form submit button wrapper function
    // Outputs a button in the selected language
     function tep_image_submit($image, $alt = '', $parameters = '') {
       global $language;
    
       $image_submit = '<input type="image" src="' . tep_output_string(DIR_WS_LANGUAGES . $language . '/images/buttons/' . $image) . '" border="0" alt="' . tep_output_string($alt) . '"';
    
       if (tep_not_null($alt)) $image_submit .= ' title=" ' . tep_output_string($alt) . ' "';
    
       if (tep_not_null($parameters)) $image_submit .= ' ' . $parameters;
    
       $image_submit .= '>';
    
       return $image_submit;
     }
    
    ////
    // Draw a 1 pixel black line
     function tep_black_line() {
       return tep_image(DIR_WS_IMAGES . 'pixel_black.gif', '', '100%', '1');
     }
    
    ////
    // Output a separator either through whitespace, or with an image
     function tep_draw_separator($image = 'pixel_black.gif', $width = '100%', $height = '1') {
       return tep_image(DIR_WS_IMAGES . $image, '', $width, $height);
     }
    
    ////
    // Output a function button in the selected language
     function tep_image_button($image, $alt = '', $params = '') {
       global $language;
    
       return tep_image(DIR_WS_LANGUAGES . $language . '/images/buttons/' . $image, $alt, '', '', $params);
     }
    
    ////
    // javascript to dynamically update the states/provinces list when the country is changed
    // TABLES: zones
     function tep_js_zone_list($country, $form, $field) {
       $countries_query = tep_db_query("select distinct zone_country_id from " . TABLE_ZONES . " order by zone_country_id");
       $num_country = 1;
       $output_string = '';
       while ($countries = tep_db_fetch_array($countries_query)) {
         if ($num_country == 1) {
           $output_string .= '  if (' . $country . ' == "' . $countries['zone_country_id'] . '") {' . "\n";
         } else {
           $output_string .= '  } else if (' . $country . ' == "' . $countries['zone_country_id'] . '") {' . "\n";
         }
    
         $states_query = tep_db_query("select zone_name, zone_id from " . TABLE_ZONES . " where zone_country_id = '" . $countries['zone_country_id'] . "' order by zone_name");
    
         $num_state = 1;
         while ($states = tep_db_fetch_array($states_query)) {
           if ($num_state == '1') $output_string .= '    ' . $form . '.' . $field . '.options[0] = new Option("' . PLEASE_SELECT . '", "");' . "\n";
           $output_string .= '    ' . $form . '.' . $field . '.options[' . $num_state . '] = new Option("' . $states['zone_name'] . '", "' . $states['zone_id'] . '");' . "\n";
           $num_state++;
         }
         $num_country++;
       }
       $output_string .= '  } else {' . "\n" .
                         '    ' . $form . '.' . $field . '.options[0] = new Option("' . TYPE_BELOW . '", "");' . "\n" .
                         '  }' . "\n";
    
       return $output_string;
     }
    
    ////
    // Output a form
     function tep_draw_form($name, $action, $parameters = '', $method = 'post', $params = '') {
       $form = '<form name="' . tep_output_string($name) . '" action="';
       if (tep_not_null($parameters)) {
         $form .= tep_href_link($action, $parameters);
       } else {
         $form .= tep_href_link($action);
       }
       $form .= '" method="' . tep_output_string($method) . '"';
       if (tep_not_null($params)) {
         $form .= ' ' . $params;
       }
       $form .= '>';
    
       return $form;
     }
    
    ////
    // Output a form input field
     function tep_draw_input_field($name, $value = '', $parameters = '', $required = false, $type = 'text', $reinsert_value = true) {
       $field = '<input type="' . tep_output_string($type) . '" name="' . tep_output_string($name) . '"';
    
       if (isset($GLOBALS[$name]) && ($reinsert_value == true) && is_string($GLOBALS[$name])) {
         $field .= ' value="' . tep_output_string(stripslashes($GLOBALS[$name])) . '"';
       } elseif (tep_not_null($value)) {
         $field .= ' value="' . tep_output_string($value) . '"';
       }
    
       if (tep_not_null($parameters)) $field .= ' ' . $parameters;
    
       $field .= '>';
    
       if ($required == true) $field .= TEXT_FIELD_REQUIRED;
    
       return $field;
     }
    
    ////
    // Output a form password field
     function tep_draw_password_field($name, $value = '', $required = false) {
       $field = tep_draw_input_field($name, $value, 'maxlength="40"', $required, 'password', false);
    
       return $field;
     }
    
    ////
    // Output a form filefield
     function tep_draw_file_field($name, $required = false) {
       $field = tep_draw_input_field($name, '', '', $required, 'file');
    
       return $field;
     }
    
    ////
    // Output a selection field - alias function for tep_draw_checkbox_field() and tep_draw_radio_field()
     function tep_draw_selection_field($name, $type, $value = '', $checked = false, $compare = '') {
       $selection = '<input type="' . tep_output_string($type) . '" name="' . tep_output_string($name) . '"';
    
       if (tep_not_null($value)) $selection .= ' value="' . tep_output_string($value) . '"';
    
       if ( ($checked == true) || (isset($GLOBALS[$name]) && is_string($GLOBALS[$name]) && ($GLOBALS[$name] == 'on')) || (isset($value) && isset($GLOBALS[$name]) && (stripslashes($GLOBALS[$name]) == $value)) || (tep_not_null($value) && tep_not_null($compare) && ($value == $compare)) ) {
         $selection .= ' CHECKED';
       }
    
       $selection .= '>';
    
       return $selection;
     }
    
    ////
    // Output a form checkbox field
     function tep_draw_checkbox_field($name, $value = '', $checked = false, $compare = '') {
       return tep_draw_selection_field($name, 'checkbox', $value, $checked, $compare);
     }
    
    ////
    // Output a form radio field
     function tep_draw_radio_field($name, $value = '', $checked = false, $compare = '') {
       return tep_draw_selection_field($name, 'radio', $value, $checked, $compare);
     }
    
    ////
    // Output a form textarea field
     function tep_draw_textarea_field($name, $wrap, $width, $height, $text = '', $parameters = '', $reinsert_value = true) {
       $field = '<textarea name="' . tep_output_string($name) . '" wrap="' . tep_output_string($wrap) . '" cols="' . tep_output_string($width) . '" rows="' . tep_output_string($height) . '"';
    
       if (tep_not_null($parameters)) $field .= ' ' . $parameters;
    
       $field .= '>';
    
       if ( (isset($GLOBALS[$name])) && ($reinsert_value == true) ) {
         $field .= tep_output_string_protected(stripslashes($GLOBALS[$name]));
       } elseif (tep_not_null($text)) {
         $field .= tep_output_string_protected($text);
       }
    
       $field .= '</textarea>';
    
       return $field;
     }
    
    ////
    // Output a form hidden field
     function tep_draw_hidden_field($name, $value = '', $parameters = '') {
       $field = '<input type="hidden" name="' . tep_output_string($name) . '"';
    
       if (tep_not_null($value)) {
         $field .= ' value="' . tep_output_string($value) . '"';
       } elseif (isset($GLOBALS[$name]) && is_string($GLOBALS[$name])) {
         $field .= ' value="' . tep_output_string(stripslashes($GLOBALS[$name])) . '"';
       }
    
       if (tep_not_null($parameters)) $field .= ' ' . $parameters;
    
       $field .= '>';
    
       return $field;
     }
    
    ////
    // Output a form pull down menu
     function tep_draw_pull_down_menu($name, $values, $default = '', $parameters = '', $required = false) {
       $field = '<select name="' . tep_output_string($name) . '"';
    
       if (tep_not_null($parameters)) $field .= ' ' . $parameters;
    
       $field .= '>';
    
       if (empty($default) && isset($GLOBALS[$name])) $default = stripslashes($GLOBALS[$name]);
    
       for ($i=0, $n=sizeof($values); $i<$n; $i++) {
         $field .= '<option value="' . tep_output_string($values[$i]['id']) . '"';
         if ($default == $values[$i]['id']) {
           $field .= ' SELECTED';
         }
    
         $field .= '>' . tep_output_string($values[$i]['text'], array('"' => '"', '\'' => ''', '<' => '<', '>' => '>')) . '</option>';
       }
       $field .= '</select>';
    
       if ($required == true) $field .= TEXT_FIELD_REQUIRED;
    
       return $field;
     }
     //MVS Start
     ////
    // Creates a pull-down list of countries
    function tep_get_country_list($name, $selected = '', $parameters = '') {
      $countries = tep_get_countries();
    
      return tep_draw_pull_down_menu($name, $countries, $selected, $parameters);
    }
    //MVS End
    ?>

     

    STILL NEEDING HELP. I just realized that ultimate seo urls also changes the html_output file also....could these two contributions...MVS and ULTIMATE SEO URLS be causing conflict?

     

    Could this be why I am shown this error(below) after I login to my administration?

     

    Error!

     

    Unable to determine the page link!

     

    Function used:

     

    tep_href_link('', '', '')

     

    Anyone familiar with hardcoding enough to help and maybe take a look at my html_output file above???

     

     

    Janet


  25. Hi...can anyone help???

     

    I have uploaded MVS to my store. I have not done the modules file yet. But when I try to login to my administration...I get a blank page that says this:

     

    Error!

     

    Unable to determine the page link!

     

    Function used:

     

    tep_href_link('', '', '')

     

    I don't know what I am looking for to fix it? I have a BTS template...but from I am reading other BTS users have used this MVS contribution. You do have to place a couple things in the fallback files...but I have done that lots of times with other contributions...so I am making changes in the correct places. Someone suggested my html_output file.

     

    Should I look in ...admin/includes/functions/html_output? Well here is the html_output file...if anyone can look at it and help. Sorry...I hate take up space

     

    Janet

    <?php
    /*
     $Id: html_output.php,v 1.29 2003/06/25 20:32:44 hpdl Exp $
    
     Modified for MVS V1.0 2006/03/25 JCK/CWG
     osCommerce, Open Source E-Commerce Solutions
     [url="http://www.oscommerce.com"]http://www.oscommerce.com[/url]
    
     Copyright © 2006 osCommerce
    
     Released under the GNU General Public License
    */
    
    ////
    // The HTML href link wrapper function
    //  function tep_href_link($page = '', $parameters = '', $connection = 'NONSSL') {
       if ($page == '') {
         die('</td></tr></table></td></tr></table><br><br><font color="#ff0000"><b>Error!</b></font><br><br><b>Unable to determine the page link!<br><br>Function used:<br><br>tep_href_link(\'' . $page . '\', \'' . $parameters . '\', \'' . $connection . '\')</b>');
       }
       if ($connection == 'NONSSL') {
         $link = HTTP_SERVER . DIR_WS_ADMIN;
       } elseif ($connection == 'SSL') {
         if (ENABLE_SSL == 'true') {
           $link = HTTPS_SERVER . DIR_WS_ADMIN;
         } else {
           $link = HTTP_SERVER . DIR_WS_ADMIN;
         }
       } else {
         die('</td></tr></table></td></tr></table><br><br><font color="#ff0000"><b>Error!</b></font><br><br><b>Unable to determine connection method on a link!<br><br>Known methods: NONSSL SSL<br><br>Function used:<br><br>tep_href_link(\'' . $page . '\', \'' . $parameters . '\', \'' . $connection . '\')</b>');
       }
       if ($parameters == '') {
         $link = $link . $page . '?' . SID;
       } else {
         $link = $link . $page . '?' . $parameters . '&' . SID;
       }
    
       while ( (substr($link, -1) == '&') || (substr($link, -1) == '?') ) $link = substr($link, 0, -1);
    
       return $link;
    //  }
    
     function tep_catalog_href_link($page = '', $parameters = '', $connection = 'NONSSL') {
       if ($connection == 'NONSSL') {
         $link = HTTP_CATALOG_SERVER . DIR_WS_CATALOG;
       } elseif ($connection == 'SSL') {
         if (ENABLE_SSL_CATALOG == 'true') {
           $link = HTTPS_CATALOG_SERVER . DIR_WS_CATALOG;
         } else {
           $link = HTTP_CATALOG_SERVER . DIR_WS_CATALOG;
         }
       } else {
         die('</td></tr></table></td></tr></table><br><br><font color="#ff0000"><b>Error!</b></font><br><br><b>Unable to determine connection method on a link!<br><br>Known methods: NONSSL SSL<br><br>Function used:<br><br>tep_href_link(\'' . $page . '\', \'' . $parameters . '\', \'' . $connection . '\')</b>');
       }
       if ($parameters == '') {
         $link .= $page;
       } else {
         $link .= $page . '?' . $parameters;
       }
    
       while ( (substr($link, -1) == '&') || (substr($link, -1) == '?') ) $link = substr($link, 0, -1);
    
       return $link;
     }
    
    ////
    // The HTML image wrapper function
     function tep_image($src, $alt = '', $width = '', $height = '', $parameters = '') {
       $image = '<img src="' . tep_output_string($src) . '" border="0" alt="' . tep_output_string($alt) . '"';
    
       if (tep_not_null($alt)) {
         $image .= ' title=" ' . tep_output_string($alt) . ' "';
       }
    
       if (tep_not_null($width) && tep_not_null($height)) {
         $image .= ' width="' . tep_output_string($width) . '" height="' . tep_output_string($height) . '"';
       }
    
       if (tep_not_null($parameters)) $image .= ' ' . $parameters;
    
       $image .= '>';
    
       return $image;
     }
    
    ////
    // The HTML form submit button wrapper function
    // Outputs a button in the selected language
     function tep_image_submit($image, $alt = '', $parameters = '') {
       global $language;
    
       $image_submit = '<input type="image" src="' . tep_output_string(DIR_WS_LANGUAGES . $language . '/images/buttons/' . $image) . '" border="0" alt="' . tep_output_string($alt) . '"';
    
       if (tep_not_null($alt)) $image_submit .= ' title=" ' . tep_output_string($alt) . ' "';
    
       if (tep_not_null($parameters)) $image_submit .= ' ' . $parameters;
    
       $image_submit .= '>';
    
       return $image_submit;
     }
    
    ////
    // Draw a 1 pixel black line
     function tep_black_line() {
       return tep_image(DIR_WS_IMAGES . 'pixel_black.gif', '', '100%', '1');
     }
    
    ////
    // Output a separator either through whitespace, or with an image
     function tep_draw_separator($image = 'pixel_black.gif', $width = '100%', $height = '1') {
       return tep_image(DIR_WS_IMAGES . $image, '', $width, $height);
     }
    
    ////
    // Output a function button in the selected language
     function tep_image_button($image, $alt = '', $params = '') {
       global $language;
    
       return tep_image(DIR_WS_LANGUAGES . $language . '/images/buttons/' . $image, $alt, '', '', $params);
     }
    
    ////
    // javascript to dynamically update the states/provinces list when the country is changed
    // TABLES: zones
     function tep_js_zone_list($country, $form, $field) {
       $countries_query = tep_db_query("select distinct zone_country_id from " . TABLE_ZONES . " order by zone_country_id");
       $num_country = 1;
       $output_string = '';
       while ($countries = tep_db_fetch_array($countries_query)) {
         if ($num_country == 1) {
           $output_string .= '  if (' . $country . ' == "' . $countries['zone_country_id'] . '") {' . "\n";
         } else {
           $output_string .= '  } else if (' . $country . ' == "' . $countries['zone_country_id'] . '") {' . "\n";
         }
    
         $states_query = tep_db_query("select zone_name, zone_id from " . TABLE_ZONES . " where zone_country_id = '" . $countries['zone_country_id'] . "' order by zone_name");
    
         $num_state = 1;
         while ($states = tep_db_fetch_array($states_query)) {
           if ($num_state == '1') $output_string .= '    ' . $form . '.' . $field . '.options[0] = new Option("' . PLEASE_SELECT . '", "");' . "\n";
           $output_string .= '    ' . $form . '.' . $field . '.options[' . $num_state . '] = new Option("' . $states['zone_name'] . '", "' . $states['zone_id'] . '");' . "\n";
           $num_state++;
         }
         $num_country++;
       }
       $output_string .= '  } else {' . "\n" .
                         '    ' . $form . '.' . $field . '.options[0] = new Option("' . TYPE_BELOW . '", "");' . "\n" .
                         '  }' . "\n";
    
       return $output_string;
     }
    
    ////
    // Output a form
     function tep_draw_form($name, $action, $parameters = '', $method = 'post', $params = '') {
       $form = '<form name="' . tep_output_string($name) . '" action="';
       if (tep_not_null($parameters)) {
         $form .= tep_href_link($action, $parameters);
       } else {
         $form .= tep_href_link($action);
       }
       $form .= '" method="' . tep_output_string($method) . '"';
       if (tep_not_null($params)) {
         $form .= ' ' . $params;
       }
       $form .= '>';
    
       return $form;
     }
    
    ////
    // Output a form input field
     function tep_draw_input_field($name, $value = '', $parameters = '', $required = false, $type = 'text', $reinsert_value = true) {
       $field = '<input type="' . tep_output_string($type) . '" name="' . tep_output_string($name) . '"';
    
       if (isset($GLOBALS[$name]) && ($reinsert_value == true) && is_string($GLOBALS[$name])) {
         $field .= ' value="' . tep_output_string(stripslashes($GLOBALS[$name])) . '"';
       } elseif (tep_not_null($value)) {
         $field .= ' value="' . tep_output_string($value) . '"';
       }
    
       if (tep_not_null($parameters)) $field .= ' ' . $parameters;
    
       $field .= '>';
    
       if ($required == true) $field .= TEXT_FIELD_REQUIRED;
    
       return $field;
     }
    
    ////
    // Output a form password field
     function tep_draw_password_field($name, $value = '', $required = false) {
       $field = tep_draw_input_field($name, $value, 'maxlength="40"', $required, 'password', false);
    
       return $field;
     }
    
    ////
    // Output a form filefield
     function tep_draw_file_field($name, $required = false) {
       $field = tep_draw_input_field($name, '', '', $required, 'file');
    
       return $field;
     }
    
    ////
    // Output a selection field - alias function for tep_draw_checkbox_field() and tep_draw_radio_field()
     function tep_draw_selection_field($name, $type, $value = '', $checked = false, $compare = '') {
       $selection = '<input type="' . tep_output_string($type) . '" name="' . tep_output_string($name) . '"';
    
       if (tep_not_null($value)) $selection .= ' value="' . tep_output_string($value) . '"';
    
       if ( ($checked == true) || (isset($GLOBALS[$name]) && is_string($GLOBALS[$name]) && ($GLOBALS[$name] == 'on')) || (isset($value) && isset($GLOBALS[$name]) && (stripslashes($GLOBALS[$name]) == $value)) || (tep_not_null($value) && tep_not_null($compare) && ($value == $compare)) ) {
         $selection .= ' CHECKED';
       }
    
       $selection .= '>';
    
       return $selection;
     }
    
    ////
    // Output a form checkbox field
     function tep_draw_checkbox_field($name, $value = '', $checked = false, $compare = '') {
       return tep_draw_selection_field($name, 'checkbox', $value, $checked, $compare);
     }
    
    ////
    // Output a form radio field
     function tep_draw_radio_field($name, $value = '', $checked = false, $compare = '') {
       return tep_draw_selection_field($name, 'radio', $value, $checked, $compare);
     }
    
    ////
    // Output a form textarea field
     function tep_draw_textarea_field($name, $wrap, $width, $height, $text = '', $parameters = '', $reinsert_value = true) {
       $field = '<textarea name="' . tep_output_string($name) . '" wrap="' . tep_output_string($wrap) . '" cols="' . tep_output_string($width) . '" rows="' . tep_output_string($height) . '"';
    
       if (tep_not_null($parameters)) $field .= ' ' . $parameters;
    
       $field .= '>';
    
       if ( (isset($GLOBALS[$name])) && ($reinsert_value == true) ) {
         $field .= tep_output_string_protected(stripslashes($GLOBALS[$name]));
       } elseif (tep_not_null($text)) {
         $field .= tep_output_string_protected($text);
       }
    
       $field .= '</textarea>';
    
       return $field;
     }
    
    ////
    // Output a form hidden field
     function tep_draw_hidden_field($name, $value = '', $parameters = '') {
       $field = '<input type="hidden" name="' . tep_output_string($name) . '"';
    
       if (tep_not_null($value)) {
         $field .= ' value="' . tep_output_string($value) . '"';
       } elseif (isset($GLOBALS[$name]) && is_string($GLOBALS[$name])) {
         $field .= ' value="' . tep_output_string(stripslashes($GLOBALS[$name])) . '"';
       }
    
       if (tep_not_null($parameters)) $field .= ' ' . $parameters;
    
       $field .= '>';
    
       return $field;
     }
    
    ////
    // Output a form pull down menu
     function tep_draw_pull_down_menu($name, $values, $default = '', $parameters = '', $required = false) {
       $field = '<select name="' . tep_output_string($name) . '"';
    
       if (tep_not_null($parameters)) $field .= ' ' . $parameters;
    
       $field .= '>';
    
       if (empty($default) && isset($GLOBALS[$name])) $default = stripslashes($GLOBALS[$name]);
    
       for ($i=0, $n=sizeof($values); $i<$n; $i++) {
         $field .= '<option value="' . tep_output_string($values[$i]['id']) . '"';
         if ($default == $values[$i]['id']) {
           $field .= ' SELECTED';
         }
    
         $field .= '>' . tep_output_string($values[$i]['text'], array('"' => '"', '\'' => ''', '<' => '<', '>' => '>')) . '</option>';
       }
       $field .= '</select>';
    
       if ($required == true) $field .= TEXT_FIELD_REQUIRED;
    
       return $field;
     }
     //MVS Start
     ////
    // Creates a pull-down list of countries
    function tep_get_country_list($name, $selected = '', $parameters = '') {
      $countries = tep_get_countries();
    
      return tep_draw_pull_down_menu($name, $countries, $selected, $parameters);
    }
    //MVS End
    ?>

×