Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

bhbilbao

Pioneers
  • Posts

    308
  • Joined

  • Last visited

  • Days Won

    1

Posts posted by bhbilbao

  1. it uses the wrong conversion. If I change 'á' => 'a' to 'á' => 'c' the result of this word

     

    7.Could be a problem with the database engine. I dont know about portugues. Look in languages/portugues.php

    define('CHARSET', 'iso-8859-1');

    Some new versions of osc uses UTF-8

     

    Compare it with the database engine & collation.

    Good luck.

  2. 1.the files must be in \includes\modules\ultimate_seo_urls5\includes\character_conversion

    2. make 1 file per language

    3. your file seems to be the spanish version. Rename it as espanol.php

    4. if you installed for example 3 languages in your osc, delete the other ones folders. = 1 folder per languaje(default espanol, english, german)

    5. It seems to be right but try with this one:

    <?php // Spanish
    $char_convert = array('á' => 'a', 'é' => 'e', 'í' => 'i', 'ñ' => 'n', 'ã' => 'a', 'á' => 'a', 'ó' => 'o', 'ú' => 'u', 'ü' => 'u', 'Á' => 'A', 'É' => 'E', 'Í' => 'I', 'Ñ' => 'N', 'Ó' => 'O', 'Ú' => 'U', 'Ü' => 'U', '¿' => '-', '¡' => '-');
    ?>

     

     

     

    6. this is the code that gets the error:

    	 $final_text_array = array();
     foreach ( $text_array as $key => $text ) {
     if ( tep_not_null( trim( $text ) ) ) {
    	 $final_text_array[$key] = $text;
     }
     }
     // We will cache this result
     Usu_Main::i()->getVar( 'registry' )->attach( $this->key, $this->keys_index[$this->key], $final_text_array );
     return $final_text_array;
    }

    Could be that you have some products without any products_name asigned (empty or null). Try to write some name description for all languages. Then RESET cache.

  3. Choose the uri format path_rewrite Choose how your product link text is made up cp

     

    Hi again Robert,

    for products (product_info,php) works fine with path_rewrite + cp.

     

    But for articles doesnt add the category because they are topics ( xxx-t-3.html).

    Is there a way in the articles contribution to add the topic before??

     

    I want this:

    http:// myweb .com/news/this-is-an-article-a-17.html

    http:// myweb .com/articles/this-is-an-article-a-18.html

    http:// myweb .com/reviews/this-is-an-article-a-19.html

     

    In other way for future releases of your addon it could be interesting to add the category path only for some categories products (selectable).

     

    Thanks in advance.

  4. Hi Robert Fisher,

    i need sugestion for this. Using the article_info.php contibution the urls goes right. For example:

    http:// myweb .com/this-is-an-article-a-17.html

     

    but i need to add a word(not category or topic) between as:

    http:// myweb .com/articles/this-is-an-article-a-17.html

     

    How can I get this??

    1) In .htaccess

      # Articles contribution
     RewriteRule ^([a-z0-9/-]+)-t-([0-9_]+).html$ articles.php [NC,L,QSA]
     RewriteRule ^([a-z0-9/-]+)-au-([0-9]+).html$ articles.php [NC,L,QSA]
     RewriteRule ^([a-z0-9/-]+)-a-([0-9]+).html$ article_info.php [NC,L,QSA]

     

    2) In your addon. where to add the "articles/" word???

     

    Thanks in advance.

  5. @@RobC1962

    try these solutions:

    1) remove from general.php and includes it in each archive manually:

     require('includes/application_top.php');
    require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_ARTICLE_INFO);
    include(DIR_WS_FUNCTIONS . '/refund_functions.php');

     

    2)put the doctype at begining of archive. before the includes

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <?php
    require('includes/application_top.php');
    require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_ARTICLE_INFO);
    include(DIR_WS_FUNCTIONS . '/refund_functions.php');
    

     

    or

    3)refund_functions.php

    at the begining change

    <?
    to
    <?php
    

  6. Hi all, i continue with the same problem described here:

    http://forums.oscomm...ost__p__1509926

     

    checkout_payment.php

    <?php
    // Start - CREDIT CLASS Gift Voucher Contribution
    echo $order_total_modules->credit_selection();
    // End - CREDIT CLASS Gift Voucher Contribution
    ?>

     

    In /includes/modules/order_total/ot_gv.php

    		$image_submit = '<input type="image" name="submit_redeem" onClick="submitFunction()" src="' . DIR_WS_LANGUAGES . $language . '/images/buttons/button_redeem.gif" border="0" alt="' . IMAGE_REDEEM_VOUCHER . '" title = "' . IMAGE_REDEEM_VOUCHER . '">';

     

     

    In /includes/modules/order_total/ot_couponphp

    
    
     $selection_string .= TEXT_ENTER_GV_CODE . tep_draw_input_field('gv_redeem_code', 'redeem code') ;
     $selection_string .= ' ';
     $selection_string .= tep_image_submit('button_redeem.gif', IMAGE_REDEEM_VOUCHER, 'onclick="return submitFunction()"');

     

     

     

    I insert the code GIFT20 on the box, but clicking button_redeem.gif nothing happens!!!! Cannot redeem!

    I dont know how to fix it.

  7. For other people asked. There is no need to use with CCGV contrib. They are diferent contribs(but they works in same manner).

    The CCGV has additional advantages but its hard to install.

     

    CCGV tables:

    #
    # Table structure for table 'coupon_email_track'
    #
    
    #
    # Table structure for table 'coupon_gv_customer'
    #
    
    #
    # Table structure for table 'coupon_gv_queue'
    #
    
    #
    # Table structure for table 'coupon_redeem_track'
    #
    
    
    #
    # Table structure for table 'coupons'
    #
    
    #
    # Table structure for table 'coupons_description'
    #

     

    Account balance tables:

    CREATE TABLE customers_balance_history

     

    I will try to modify them and only use 1 table for them, in this case coupon_gv_customer

    amount=customers_account_balance

  8. Rosemaryann,

    same problem here(the same problem as CCGV contrib).

    Im thinking to notify to customer when this happens.

     

    For other people with problems, try deleting:

    ot_account_balance_org.php

     

    use only ot_account_balance.php

    and activate it on modules with the highest order number.

     

    In my case there is problems in the instalation instructions:

    First:

    In file catalog\admin\orders.php
    
    Find:
    
    case 'deleteconfirm':
    $oID = tep_db_prepare_input($HTTP_GET_VARS['oID']);
    tep_remove_order($oID, $HTTP_POST_VARS['restock']);
    tep_redirect(tep_href_link(FILENAME_ORDERS, tep_get_all_get_params(array('oID', 'action'))));
    break;
    
    REPLACE with:
    
    // Account Balance Modif
    case 'deleteconfirm':
    $oID = tep_db_prepare_input($HTTP_GET_VARS['oID']);
    tep_remove_order($oID, $HTTP_POST_VARS['restock']);
    
    tep_add_customer_balance($oID, $HTTP_POST_VARS['account_balance'], $cID);
    
    tep_redirect(tep_href_link(FILENAME_ORDERS, tep_get_all_get_params(array('oID', 'action'))));
    break;
    // End Account Balance Modif

     

    then:

    In file catalog\admin\orders.php
    
    Find:
    
    		if ($order_updated == true) {
    			 $messageStack->add_session(SUCCESS_ORDER_UPDATED, 'success');
    		} else {
    			  $messageStack->add_session(WARNING_ORDER_NOT_UPDATED, 'warning');
    		}
    
    		tep_redirect(tep_href_link(FILENAME_ORDERS, tep_get_all_get_params(array('action')) . 'action=edit'));
    		break;
    
    
    
    Add after:
    
    // Account Balance Modif
    case 'deleteconfirm':
    	$oID = tep_db_prepare_input($HTTP_GET_VARS['oID']);
    	$ab = tep_db_prepare_input($HTTP_POST_VARS['account_balance']);
    
    
    if ($ab == true) {
    ... bla bla bla

     

    case deleteconfirm appears twice, 2 times!!

    In the original code the first part is deleted.

     

     

    In other case I think there is need to place some code in checkout_confirmation.php

    In estimate_shipping is right, and the email order confirmation also right. But checkout_confirmation bad.

     

    Also, with admin/order_edit.php needs to modify, all quantities to 0€.

     

    Other issue is on customers_balance_history.php

    Adding credit from customers_edit page works fine, it adds a line to customers_balance_history table.

    The problem here is after finishing the order, when a customer checks out, the account balance is reduced right but it doesnt add any line to customers_balance_history table (suposed a new line with Order #)

  9. sathenzar

     

    try site root/modules/order_total

    to

    site root/includes/modules/order_total

     

     

    My question is about the install instructions, I think they were wrong:

    First:

    In file catalog\admin\orders.php
    
    Find:
    
    case 'deleteconfirm':
       $oID = tep_db_prepare_input($HTTP_GET_VARS['oID']);
       tep_remove_order($oID, $HTTP_POST_VARS['restock']);
       tep_redirect(tep_href_link(FILENAME_ORDERS, tep_get_all_get_params(array('oID', 'action'))));
    break;
    
    REPLACE with:
    
    // Account Balance Modif
    case 'deleteconfirm':
       $oID = tep_db_prepare_input($HTTP_GET_VARS['oID']);
       tep_remove_order($oID, $HTTP_POST_VARS['restock']);
    
       tep_add_customer_balance($oID, $HTTP_POST_VARS['account_balance'], $cID);
    
       tep_redirect(tep_href_link(FILENAME_ORDERS, tep_get_all_get_params(array('oID', 'action'))));
    break;
    // End Account Balance Modif
    

     

    then:

    In file catalog\admin\orders.php
    
    Find:
    
        if ($order_updated == true) {
    	 $messageStack->add_session(SUCCESS_ORDER_UPDATED, 'success');
        } else {
    	  $messageStack->add_session(WARNING_ORDER_NOT_UPDATED, 'warning');
        }
    
        tep_redirect(tep_href_link(FILENAME_ORDERS, tep_get_all_get_params(array('action')) . 'action=edit'));
        break;
    
    
    
    Add after:
    
    // Account Balance Modif
       case 'deleteconfirm':
           $oID = tep_db_prepare_input($HTTP_GET_VARS['oID']);
           $ab = tep_db_prepare_input($HTTP_POST_VARS['account_balance']);
    
    
       if ($ab == true) {
    ... bla bla bla

     

    case deleteconfirm appears twice, 2 times!!

    In the original code the first part is deleted.

  10. I also need help for Individual Item Status v 1.00

    http://addons.oscommerce.com/info/5644

     

    All works fine except for orders.php

    After changing the item status in editors page it goes to orders list page (exiting the order editor page). I want to stay in the editors page and not to redirect to other page, because for example changing the status for 10 items of an order i must to enter and exit 10 times to edit that order.

     

    I think this is the code orders.php:

    tep_redirect(tep_href_link(FILENAME_ORDERS, tep_get_all_get_params(array('action')) . 'action=edit'));

     

    I tried to replace with this one(no luck):

    tep_redirect(tep_href_link(FILENAME_ORDERS, tep_get_all_get_params(array ('oID', 'action=edit')) . 'oID=' . $orders['orders_id']));

  11. Fillally get to work with account_notifications ans newsletters_products modlule.

     

    My question now,

    how to get working with this contribution:

    Send email to customers with an attachment included

    http://addons.oscommerce.com/info/4583

     

    Especially here:

    And replace with:
       $from = tep_db_prepare_input($HTTP_POST_VARS['from']);
       $subject = tep_db_prepare_input($HTTP_POST_VARS['subject']);
       $message = tep_db_prepare_input($HTTP_POST_VARS['message']);
    
       //Let's build a message object using the email class
       $mimemessage = new email(array('X-Mailer: osCommerce'));
    
       if ($_FILES['userfile']['size'] > 0) { 
    
    	  $attachment_name   = $HTTP_POST_FILES['userfile']['name'];
    	  $attachment_type   = $HTTP_POST_FILES['userfile']['type'];
         //$attachment_size = $HTTP_POST_FILES['userfile']['size']; //Just in case you want to check and limit the size
    	  new upload('userfile', DIR_FS_DOWNLOAD);
    	  $attachment_file   = DIR_FS_DOWNLOAD . $attachment_name;
    	  $attachments	   = $mimemessage->get_file($attachment_file);
             $mimemessage->add_attachment($attachments, $attachment_name, $attachment_type);
      }
    
       // Build the text version
       $text = strip_tags($message);
       if (EMAIL_USE_HTML == 'true') {
      $mimemessage->add_html($message, $text);
       } else {
      $mimemessage->add_text($message);
       }
    
       $mimemessage->build_message();
       while ($mail = tep_db_fetch_array($mail_query)) {
      $mimemessage->send($mail['customers_firstname'] . ' ' . $mail['customers_lastname'], $mail['customers_email_address'], '', $from, $subject);
       }
    
       tep_redirect(tep_href_link(FILENAME_MAIL, 'mail_sent_to=' . urlencode($mail_sent_to)));
    
    
    

  12. After installing it the Mail Manager account_notifications.php stopped to work.

     

    Im thinking is related to this contribution.

     

    After unmark the products and press CONTINUE (to delete them from the database). It goes to the account page and says "OK. Product notification deleted", but after returning to account_notifications.php the products remains there (didnt delete!).

  13. Hi again Jan,

    I have a problem in products_info.php

    here:

    
    <?php
    //added for cross xsell
       if ((USE_CACHE == 'true') && empty($SID)) {
    
       echo tep_cache_also_purchased(3600);
       echo tep_cache_xsell_products(3600);
    //  echo tep_cache_products_sets(3600);
    
       } else {
    
    //  include(DIR_WS_MODULES . FILENAME_ALSO_PURCHASED_PRODUCTS);
    //  include(DIR_WS_MODULES . FILENAME_XSELL_PRODUCTS);
    //  include(DIR_WS_MODULES . FILENAME_PRODUCT_SETS);
    //  include(DIR_WS_MODULES . 'product_sets.php');
     }
    
    

     

    The problem is when caching xsell_products

     

    In this case working:

    echo tep_cache_also_purchased(3600);

    // echo tep_cache_xsell_products(3600); //added for Xsell

    // echo tep_cache_products_sets(3600);

     

    I think the bad code is in catalog/includes/functions/cache.php

    // Cache the also Xell module
     function tep_cache_xsell_products($auto_expire = false, $refresh = false) {
    global $HTTP_GET_VARS, $language, $languages_id;
    
    $cache_output = '';
    
    if (isset($HTTP_GET_VARS['products_id']) && is_numeric($HTTP_GET_VARS['products_id'])) {
      if (($refresh == true) || !read_cache($cache_output, 'xsell_products-' . $language . '.cache' . $HTTP_GET_VARS['products_id'], $auto_expire)) {
    	ob_start();
    	include(DIR_WS_MODULES . FILENAME_XSELL_PRODUCTS);
    	$cache_output = ob_get_contents();
    	ob_end_clean();
    	write_cache($cache_output, 'xsell_products-' . $language . '.cache' . $HTTP_GET_VARS['products_id']);
      }
    }
    
    return $cache_output;
     }

    It should be modified??

     

    In other hand, you said with hide products sppc to use also_purchased_products_hide_products.php

    what it should done??

    a. modify the define in filenames.php to also_purchased_products_hide_products.php, or

    b. modify the archive also_purchased_products.php

  14. Also a white page with a modified products_new.php file:

     

    index.php

    <?php  
    // needed for the new products module shown below
       $new_products_category_id = $current_category_id;
    ?>
    <tr>
      <td><?php include(DIR_WS_MODULES . FILENAME_NEW_PRODUCTS); ?></td>
    </tr>

     

     

    includes/modules/products_new.php

    <?php
     $info_box_contents = array();
     $info_box_contents[] = array('text' => sprintf(TABLE_HEADING_NEW_PRODUCTS, strftime('%B')));
    
    //  new contentBoxHeading($info_box_contents);
    
     if ( (!isset($new_products_category_id)) || ($new_products_category_id == '0') ) {
    
      $new_products_query = tep_db_query("select p.products_id, p.products_quantity, p.products_image, p.products_tax_class_id, pd.products_name, if(s.status, s.specials_new_products_price, p.products_price) as products_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.latest_product='1' and p.products_status = '1' and p.products_id = pd.products_id and quotes_email_address NOT LIKE '%@%' and pd.language_id = '" . (int)$languages_id . "' and p.products_id = p2c.products_id " . $new_products_where . " order by p.products_date_added desc limit " . MAX_DISPLAY_NEW_PRODUCTS);
    
    
     } else {
      $new_products_query = tep_db_query("select distinct p.products_id, p.products_quantity, p.products_image, p.products_tax_class_id, pd.products_name, if(s.status, s.specials_new_products_price, p.products_price) as products_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_CATEGORIES . " c where p.products_id = p2c.products_id and p2c.categories_id = c.categories_id" . $new_products_where . " and c.parent_id = '" . (int)$new_products_category_id . "' and p.latest_product='1' and p.products_status = '1' and quotes_email_address NOT LIKE '%@%' and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' order by p.products_date_added desc limit " . MAX_DISPLAY_NEW_PRODUCTS);
    
     }
    
     $row = 0;
     $col = 0;
     $info_box_contents = array();
     while ($new_products = tep_db_fetch_array($new_products_query)) {
       $new_products['products_name'] = tep_get_products_name($new_products['products_id']);
    
    $sql = 'SELECT `products_short` FROM `products_description.............

     

     

    Only works in product_listings pages. Im thinking on unistalling it and install Optimize Category Box as says Jan.

    The contribution works great with a vanilla 2.2rca2 install, but not in a high modified case like me. Too much problems.

  15. I get a white page on products listings with sppc.

     

    I edited the admin/includes/configuration_cache.php

     

    and modified the

    tep_function count_products_in_category

    to

    function count_products_in_category

     

    example:

    <?php
    /*
    $Id: configuration_cache.php,v 1.32 2004/04/06 20:24:09 daemonj Exp $
    */
    $rQuery  = tep_db_query('SELECT `categories_id` FROM `categories`');
    $aResult = array();
    while ($r = tep_db_fetch_array($rQuery)) {
      $aResult[] = $r['categories_id'];
    }
    
    // Return the number of products in a category
    // TABLES: products, products_to_categories, categories
     function count_products_in_category($category_id, $include_inactive = false) {
    
     // Unless Customer logged in show products
     // BOF Separate Pricing Per Customer, hide products and categories for groups
    	 global $sppc_customer_group_id;
    	 if(!tep_session_is_registered('sppc_customer_group_id')) {
    	 $customer_group_id = '0';
    	 } else {
    	  $customer_group_id = $sppc_customer_group_id;
    	 }
    	$products_count = 0;
    	if ($include_inactive == true) {
    	  $products_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c left join " . TABLE_CATEGORIES . " c using(categories_id) where p.products_id = p2c.products_id and p2c.categories_id = '" . (int)$category_id . "' and find_in_set('".$customer_group_id."', products_hide_from_groups) = 0 and find_in_set('" . $customer_group_id . "', categories_hide_from_groups) = 0");
    	} else {
    	  $products_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c left join " . TABLE_CATEGORIES . " c using(categories_id) where p.products_id = p2c.products_id and p.products_status = '1' and p2c.categories_id = '" . (int)$category_id . "' and find_in_set('".$customer_group_id."', products_hide_from_groups) = 0 and find_in_set('" . $customer_group_id . "', categories_hide_from_groups) = 0");
    	}
    			$products = tep_db_fetch_array($products_query);
    	$products_count += $products['total'];
    // no need to find child categories that are hidden from this customer or have a higher level category that is hidden
    	$child_categories_query = tep_db_query("select categories_id from " . TABLE_CATEGORIES . " where parent_id = '" . (int)$category_id . "' and find_in_set('" . $customer_group_id . "', categories_hide_from_groups) = 0");
    // EOF Separate Pricing Per Customer, hide products and categories for groups
    	if (tep_db_num_rows($child_categories_query)) {
    	  while ($child_categories = tep_db_fetch_array($child_categories_query)) {
    			$products_count += tep_count_products_in_category($child_categories['categories_id'], $include_inactive);
    	  }
    	}
    
    	return $products_count;
     }
    
    
    function count_has_category_subcategories($category_id) {

     

    For the moment seems to work.

×
×
  • Create New...