Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

empo

Archived
  • Posts

    98
  • Joined

  • Last visited

Posts posted by empo

  1. problem that sts and my module use same functions

     

    you may go to includes\functions\product_manage.php

    and erase this function:

     

    function tep_get_category_tree($parent_id = '0', $spacing = '', $exclude = '', $category_tree_array = '', $include_itself = false) {
    ? ?global $languages_id;
    
    ? ?if (!is_array($category_tree_array)) $category_tree_array = array();
    ? ?if ( (sizeof($category_tree_array) < 1) && ($exclude != '0') ) $category_tree_array[] = array('id' => '0', 'text' => TEXT_TOP);
    
    ? ?if ($include_itself) {
    ? ? ?$category_query = tep_db_query("select cd.categories_name from " . TABLE_CATEGORIES_DESCRIPTION . " cd where cd.language_id = '" . (int)$languages_id . "' and cd.categories_id = '" . (int)$parent_id . "'");
    ? ? ?$category = tep_db_fetch_array($category_query);
    ? ? ?$category_tree_array[] = array('id' => $parent_id, 'text' => $category['categories_name']);
    ? ?}
    
    ? ?$categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.categories_id = cd.categories_id and cd.language_id = '" . (int)$languages_id . "' and c.parent_id = '" . (int)$parent_id . "' order by c.sort_order, cd.categories_name");
    ? ?while ($categories = tep_db_fetch_array($categories_query)) {
    ? ? ?if ($exclude != $categories['categories_id']) $category_tree_array[] = array('id' => $categories['categories_id'], 'text' => $spacing . $categories['categories_name']);
    ? ? ?$category_tree_array = tep_get_category_tree($categories['categories_id'], $spacing . '   ', $exclude, $category_tree_array);
    ? ?}
    
    ? ?return $category_tree_array;
    ?}

  2. 2->jimtsik i need ms1 if you have it send it to me

     

    some mistake was in last update so change it from

     

    15.

    ## Open file: product_reviews_write.php at line :51

    ## Add code :

    //BOF:Customer Add product

    $customer_query = tep_db_query("select customers_firstname, customers_lastname,customers_email_address from " . TABLE_CUSTOMERS . " where customers_id = '" . (int)$product_info['customer_id'] . "'");

    $customer = tep_db_fetch_array($customer_query);

    define(EMAIL_TEXT_SUBJECT,'New review added for your product');

    $mail = "There New Review added for product ".$product_info['products_name']." you add\n\n";

    $mail .= "Review :\n".$review."\n\n";

    tep_mail($pcustomer['customers_firstname'] . ' ' . $pcustomer['customers_lastname'], $pcustomer['customers_email_address'], EMAIL_TEXT_SUBJECT, $email, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);

    //EOF:Customer add product

     

    to:

     

    15.

    ## Open file: product_reviews_write.php at line :51

    ## Add code :

    //BOF:Customer Add product

    $pcustomer_query = tep_db_query("select customers_firstname, customers_lastname,customers_email_address from " . TABLE_CUSTOMERS . " where customers_id = '" . (int)$product_info['customer_id'] . "'");

    $pcustomer = tep_db_fetch_array($pcustomer_query);

    define(EMAIL_TEXT_SUBJECT,'New review added for your product');

    $mail = "There New Review added for product ".$product_info['products_name']." you add\n\n";

    $mail .= "Review :\n".$review."\n\n";

    tep_mail($pcustomer['customers_firstname'] . ' ' . $pcustomer['customers_lastname'], $pcustomer['customers_email_address'], EMAIL_TEXT_SUBJECT, $mail, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);

    //EOF:Customer add product

  3. Your contribution sounds really great and is something that I could really use.  However, I'm having some difficulties with seeing how it works.

     

    I've gone out to your sample site (http://www.procreator.info/shop/) to see how the customer can add a product.  I can't seem to see where the product is added.  Also, where does the administrator go to approve the new product?

     

    Thanks for your help.

    For see how this contribute work you need to login in with

    http://www.procreator.info/shop/

    User:[email protected]

    Pass:testing

    then go to my account

    after that you add new product this product must be approved by administrator

    so go to admin section and approve it after this you will see your new product

  4. 1.In my contribution customer use default oscommerce upload class (a little bit changed)so they cant use Image uploader

    2.And for sure they cant delete files or upload files which are not images

     

    3.Try to use this code:

     

    <?
    require('includes/application_top.php');
    
    $navigation->remove_current_page();
    
    $products_query = tep_db_query("select pd.products_name, p.products_image, p.products_image_lrg, p.products_image_xl_1, p.products_image_xl_2, p.products_image_xl_3, p.products_image_xl_4, p.products_image_xl_5, p.products_image_xl_6 from " . TABLE_PRODUCTS . " p left join " . TABLE_PRODUCTS_DESCRIPTION . " pd on p.products_id = pd.products_id where p.products_status = '1' and p.products_id = '" . (int)$HTTP_GET_VARS['pID'] . "' and pd.language_id = '" . (int)$languages_id . "'");
    $products = tep_db_fetch_array($products_query);
    ?>
    <!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html <?php echo HTML_PARAMS; ?>>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">
    <title><?php echo $products['products_name']; ?></title>
    <base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>">
    <script language="javascript"><!--
    var i=0;
    function resize() {
    if (navigator.appName == 'Netscape') i=40;
    if (document.images[0]) window.resizeTo(document.images[0].width +30, document.images[0].height+60-i);
    self.focus();
    }
    //--></script>
    </head>
    <body onload="resize();">
    <? if (is_file(DIR_WS_IMAGES ."thumb/".$products['products_image'])){$temp="thumb/";}else{$temp=NULL;}?>
    
    <?php              // LINE 36
             if (($HTTP_GET_VARS['image'] ==0) && ($products['products_image_lrg'] != '')) {
       echo tep_image(DIR_WS_IMAGES . $products['products_image_lrg'], $products['products_name'], LARGE_IMAGE_WIDTH, LARGE_IMAGE_HEIGHT);
       } elseif ($HTTP_GET_VARS['image'] ==1) {
       echo tep_image(DIR_WS_IMAGES . $products['products_image_xl_1'], $products['products_name'], LARGE_IMAGE_WIDTH, LARGE_IMAGE_HEIGHT);
       } elseif ($HTTP_GET_VARS['image'] ==2) {
       echo tep_image(DIR_WS_IMAGES . $products['products_image_xl_2'], $products['products_name'], LARGE_IMAGE_WIDTH, LARGE_IMAGE_HEIGHT);
       } elseif ($HTTP_GET_VARS['image'] ==3) {
       echo tep_image(DIR_WS_IMAGES . $products['products_image_xl_3'], $products['products_name'], LARGE_IMAGE_WIDTH, LARGE_IMAGE_HEIGHT);
       } elseif ($HTTP_GET_VARS['image'] ==4) {
       echo tep_image(DIR_WS_IMAGES . $products['products_image_xl_4'], $products['products_name'], LARGE_IMAGE_WIDTH, LARGE_IMAGE_HEIGHT);
       } elseif ($HTTP_GET_VARS['image'] ==5) {
       echo tep_image(DIR_WS_IMAGES . $products['products_image_xl_5'], $products['products_name'], LARGE_IMAGE_WIDTH, LARGE_IMAGE_HEIGHT);
       } elseif ($HTTP_GET_VARS['image'] ==6) {
       echo tep_image(DIR_WS_IMAGES . $products['products_image_xl_6'], $products['products_name'], LARGE_IMAGE_WIDTH, LARGE_IMAGE_HEIGHT);
       } else
       echo tep_image(DIR_WS_IMAGES .$temp. $products['products_image'], $products['products_name'], LARGE_IMAGE_WIDTH, LARGE_IMAGE_HEIGHT);
       ?>
    </body>
    </html>
    <?php require('includes/application_bottom.php'); ?>

×
×
  • Create New...