Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Pronux

Pioneers
  • Posts

    98
  • Joined

  • Last visited

Posts posted by Pronux

  1. This is great! Installed TMS on a new 2.3.1 demo site we have and works easily. The only question I have now is populating the other tabs that currently have "hello world" statements in them. I would think we need to add a new field in the database for each product to populate the text in the tabs for product specific information. For example, we need product application data that is product specific. How do we add product information to appear in this area that is product specific?

    It's quite simple:

    1. Add the new field to your database, to the table products_description, for example name the new field "new_field".

    2. Add the new field to the sql-query on product_info.php, near line 37, for example change

    $product_info_query = tep_db_query("select p.products_id, pd.products_name,.........

    TO:

    $product_info_query = tep_db_query("select p.products_id, pd.new_field, pd.products_name,......

    3. Add the new field f.e. to the second tab:

    $TMS->tab[2]['content'] = = $product_info['new_field'];

     

    Mary Christmas! :thumbsup:

  2. categories.php and the code in install.txt are based on osCommerce 2.3.1, perhaps this was the reason for your first problem.

     

    The Notice-Errors: You have to change the PHP error handler in your installation: Go to catalog/admin/includes/TMS/Conf.php and outcomment the last to lines:

    //Error Handling (for debugging)

    //error_reporting(E_ALL);

    //ini_set("display_errors", 1);

     

    Design-Changes: Go to catalog/admin/includes/TMS/Conf.php and change the default (min-height) to a smaller value:

    $CONF['defaultContentSectionHeight'] = 10;

  3. We received a eMail from a user who has a modified osCommerce installation and some problems to install TMS. Our answer:

     

    No descriptions problem: At categories.php there are two lines which are loading the content (description) into each tab. Comment out the second line with // and try if it works:

     

    $TMS->tab[$tabNo]['content'] = tep_draw_textarea_field('products_description[' . $languages[$i]['id'] . ']', 'soft'.......

    //$TMS->tab[$tabNo]['content'] = str_ireplace('<textarea ', '<textarea style="width: 100%; height: 100%" ', $TMS->tab[$tabNo]['content']);

     

    If it doesn’t work, try this to test if you can load content to the tabs:

     

    $TMS->tab[$tabNo]['content'] = ‘this is a short test’;

    $TMS->tab[$tabNo]['content'] = str_ireplace('<textarea ', '<textarea style="width: 100%; height: 100%" ', $TMS->tab[$tabNo]['content']);

     

    Design: To change the width of the tab-menu and the tab height, go to /catalog/admin/includes/TMS/Conf.php and change the following entries:

    $CONF['totalWidth'] = 650;

    $CONF['tabPaddingTop'] = 0;

  4. This is the official support thread for the new Tab Menu Section (TMS) and Pronux TMS For Admin contribution.

     

    IMPORTANT: Before posting here, please try the following steps to solve your problem:

     

    1. Add following code to see possible errors:

     

    BEFORE

    include DIR_WS_INCLUDES.'TMS/Conf.php';

    ADD

    error_reporting(E_ALL);
    ini_set("display_errors", 1);

    2. Check if the stylesheet.css is correct: Have you added the TMS CSS entries to the right stylesheet.css? There is one for the shop and one for the admin.

    3. Upload the the modified and working PHP-files from zip package to your shop and try if it works: Important: backup/rename the original files first

    4. Empty your browser cache

    5. Post your question or problem here in the forum, if possible add a screenshot of the issue

     

    Demo Page: You can test the add-on live at:

    - http://oscommerce.pronux.ch/product_info.php?products_id=28

    - http://tms.pronux.ch

  5. Thank you for your quick answer. I think, if I devide $_SESSION['hidden_products'] to more sessions (e.g. $_SESSION['hidden_products_1'], $_SESSION['hidden_products_2'], ...) it would be work correctly.

     

    What do you think?

     

    It could work, but since SHP alters all categories/products related SQL queries (see /includes/functions/database.php) I don't recommend it, because it could make the SQL-queries in your shop too big. I recommend you to use another contribution which is better for your shop.

  6. I think that $_SESSION['hidden_products'] is to large. Variable $hidden_products has about 300.000 chars. What do you think about it?

     

    I think you are right. SHP stores all hidden articles in $_SESSION['hidden_products']. If you are hiding hundreds of articles it becomes to large for the session variable. Sorry, but I don't see a solution for this problem right now.

  7. @fernyburn:

     

    Do i simply change TABLE_CUSTOMERS & address_book to orders and billing_company ?

    You've found the right places, but I don't think that this would work. SHP needs the customer_id and from the customer record from (table customers) you can only find the customers_default_address_id in table address_book. If you are very clever, you can go to table orders and lookup the relevant billing_address_format_id. You have to try it.

     

     

    @goodolandy: Thanks for your feedback. You are not the first person who suggests the feature you mentioned (customer groups in combination with SSPC). Unfortunately it's not an easy thing to do. If osCommerce 3.0 will not have built-in this feature, we will develop it. For osCommerce 2.x we think it's too late.

  8. hey fernyburn,

     

    go into the file catalog/includes/functions/database.php and REPLACE:

     

    if(stristr($query, " where "))

     

    WITH:

     

    if(substr($query, 0, 8) == 'describe')
    {
       //do not modify query
    }
    else if(stristr($query, " where "))

     

    (2 times: near line 53 and near line 93)

     

    does it help ?

  9. hi fernyburn

     

    Can you post the complete query which fails please (you can do this by placing echo $query; at database.php before //START SHP

     

    Just started to implement this contribution - just wondering - is there another way to search for the customers like a text box to write there surname in, instead of the drop down menu.

     

    I have about 10000 customers in my database, so scrolling through all the b ' s to get to a name is a bit of a chore !!

     

    I know, but we have no time at the moment, sorry.

  10. I've received the following question via mail:

     

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

    Hi here!

     

    I would like to know how it would be possible to hide products without an assigned category.

     

    I want to hide products from the main store but make them available to those that link directly to them.

     

    This would be used for google advertising.

     

    Thank you

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

     

    Answer:

    Yes, you can hide products without an assigned category. BUT: you must define the customer(s) who can see the products (you have to select this customres in the admin for each product)

    So I'm not sure if this is the right contribution for your scenario.

  11. You said from includes/application_top.php????

     

    or other file???

     

    I mean the the sql query you mentioned in your post on 4 january: http://www.oscommerce.com/forums/topic/349008-simply-hide-products-shp/page__view__findpost__p__1471287

     

    I don't know where this query is in your shop, you have to search for it. Note: In a clean osCommerce installation this contribution works without a problem, so it must be a query which has been modified.

  12. The product edit page (categories.php) takes long to load if you have more than 1000 customers.

    That's possible, if I have time I will change it into an ajax field.

     

     

    The message log is in the categories box on the column_left.

    Can you tell me in which box (catalog/includes/boxes/) the error occur ?

  13. Hi,

     

    The code above removed the functionality of hiding products completely, so I removed that code.

    Is it possible to fix below in some way?

    Did you remove the correct code, it's just above the following lines:

     

    		$_SESSION['hidden_products']   			= $hidden_products;  
    	$_SESSION['hidden_categories'] 			= $hidden_categories;  
    	$_SESSION['hidden_products_timestamp'] 	= $hidden_products_timestamp;	

     

    1) When hiding a category it stills show in the categories menu. I guess this is a bug. When clicking on it theres no products inside since they are hidden. Can I hide the category name completely in the categories since it's hidden?

    If you installed it correctly, it will hide the category name. Have you installed some other contributions which may cause this error ?

  14. Yes, this should be easy. Open the file catalog/includes/functions/general.php, go to function tep_set_hidden_products and delete the following section:

     

    	$check_query = tep_db_query("SELECT DISTINCT shp.products_id FROM ".TABLE_PRODUCTS." shp WHERE shp.products_id NOT IN (".$hidden_products.") AND shp.products_status = '1' AND shp.products_id IN (SELECT products_id FROM ".TABLE_PRODUCTS_TO_CATEGORIES." WHERE categories_id IN (".$all_categories_temp."))");			  				  	
    if (tep_db_num_rows($check_query) > 0)
    {					
    	if($hidden_products != "0")
    	{
    		$hidden_products .= ", ";
    	}
    	else
    	{
    		$hidden_products = "";
    	}
    
              while($h_prods = tep_db_fetch_array($check_query))
              {	        		   	        				      
           	$hidden_products .= $h_prods['products_id'].", ";	        		        		       
              }	
              $hidden_products = substr($hidden_products, 0, -2);				       						     
    }

  15. Hi,

     

    This seems to be a bug which occurs only if you hide categories but no products. Please try the following fix:

     

    Open file catalog/includes/functions/general.php, go to function tep_set_hidden_products and add near line 1400 the code:

     

    else
    {
      $has_hidden_categories = true;			
    }

    before:

     

    //find hidden categories and also all products in there	
    if($has_hidden_categories)
    {

    after it should look like:

     

    else
    {
      $has_hidden_categories = true;			
    }
    
    //find hidden categories and also all products in there	
    if($has_hidden_categories)
    {

    Does this fix your problem ?

×
×
  • Create New...