Jump to content

FridayNight

Members
  • Content count

    79
  • Joined

  • Last visited

Posts posted by FridayNight


  1. Hi everybody,

     

    I have the featured products contribution installed and it works fine.

     

    Maybe somebody figuered it out already:

    How can I distinguish if a product is featured in the "normal" product listing? So that I can mark it for example with a overlay image "featured"?

    (I have already an overlay image "new" for new products and one for "sale" for special offers, but this was quite simple because this information was stored within the products table)

     

    Maybe there is an elegant way to add this query to the normal product listing query... without slowing all down to much.


  2. The product link from the shopping_cart.php is created like this:

     

    '	<td class="productListing-data" align="left"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . urlencode($products[$i]['id'])) . '">' . tep_image(DIR_WS_IMAGES . $products[$i]['image'], $products[$i]['name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'class="imgframe"') . '</a></td>'
    

     

    however when I echo the GET Variable passed from here on the product_info.php the special character "Ö" is lost:

     

    Example from above:

    488{txt_26}sample2{txt_21}A

     

    Any idea why this happen? Is there maybe some security trigger I am not aware of which strips down the special character from the GET variable?

     

    Would be great if one of you could check if the problem with text input fields and special characters and the going back (edit the product) from the shopping cart to the product_info is a bug not just for me.


  3. URLs from the shopping_cart.php:

     

    Example with value "AO" with normal "O" which works:

    product_info.php?products_id=488{txt_26}sample1{txt_21}AO

     

    Example with value "AÖ" with special character "Ö" which does not work:

    product_info.php?products_id=488{txt_26}sample2{txt_21}AÖ

     

    The url is correct, the database entry in customers_basket and customers_basket_attributes too. Just when hitting the product_info.php with a special character it is not able to read the values from neither the URL(GET) nor the database...


  4. I do not think that there is something wrong with the implementation as it works just fine with all entries except spezial characters like & () + and the german "umlaute" äöü...

    there are several files involved with Option Type ... I think the problem might be in the module option_types.php loaded in the product_info.php where it loads the value from the shopping_cart.php class:

     

    case OPTIONS_TYPE_TEXT:
      $tmp_html = '<input type="text" name="id[' . TEXT_PREFIX . $ProdOpt_ID . ']" id="id[' . TEXT_PREFIX . $ProdOpt_ID . ']" size="' . $ProdOpt_Length .'" maxlength="' . $ProdOpt_Length . '"
    						 value="' . $cart->contents[$HTTP_GET_VARS['products_id']]['attributes_values'][$ProdOpt_ID] .'"';
    

     

    but I have difficulties to figure out where to go on in the shopping_cart.php class to figure out what is being done with this:

    $cart->contents[$HTTP_GET_VARS['products_id']]['attributes_values'][$ProdOpt_ID]

     

    I can post more from my files if needed.

    But I also remember I read that some others had the same problem with loosing the customer inputs from going back from the shopping cart to the product info page in order to edit the product options.


  5. Hi,

     

    I have the problem with special characters like "&" "(" ")" "+" that they get lost when I want to edit a product from out of the shoping cart. Customer inputs like "this & that" get lost, infact all the customer inputs get lost as soon as there is one of these special characters.

    I guess there is some trick to mask these characters so that the do not interfere with the code.

     

    If somebody has found a solution for this issue would be great. Likewise I will share if I figure out something by myself.


  6. Hi,

     

    I tried some things I read on the fourty pages but none of them worked.

     

    I have the problem with special characters like "&" "(" ")" "+" that they get lost when I want to edit a product from out of the shoping cart. Customer inputs like "this & that" get lost, infact all the customer inputs get lost as soon as there is one of these special characters.

    I guess there is some trick to mask these characters so that the do not interfere with the code.

     

    If somebody has found a solution for this issue would be great. Likewise I will share if I figure out something by myself.

     

     

    Sorry wrong post should be in Option Types V2...


  7. Hi there,

     

    I have Problem with Option Type V2, I cannot delete items using Option Type from the shopping cart. Other items can be deleted. Further updating the amount of these Option Type items create a new item in the cart.

     

    In one shop it is working RC2 and in another one built up from this one is not working anymore. I guess I did some oscommerce version updates which interfere. Maybe somebody run into the same problem or knows where to look at?

    Thanks.


  8. Hi,

     

    I have the latest Version Administration Access Level Contribution installed and it is running well on my 2.2 RC2A Installation.

     

    Though I have a problem together with the Option Types v2 - AttribManager Contribution.

     

    When I want to edit a product in admin/categories.php I have no permission to access the Option Types.

     

    The Option Types contribution is installed in the admin/categories.php three times like this:

     

    ... require_once('attributeManager/includes/attributeManagerUpdateAtomic.inc.php'); ...

    ... <?php require_once( 'attributeManager/includes/attributeManagerHeader.inc.php' ); ?> ...

    ... <td colspan="2"><?php require_once( 'attributeManager/includes/attributeManagerPlaceHolder.inc.php' )?></td> ...

     

    Does anybody know how I can grant access to these required files from the Administration Access Level Contribution?


  9. Hi,

     

    I am not yet familiar with the new osC3 and I would like to use the "Private Shop" (http://addons.oscommerce.com/info/4856) contribution on a osC3 shop. It is a quite short add-on but I am not able to adapt it to osC3.

     

    For osC2 it was just necessary to add the following lines at the end of the application_top.php

     

    //Private Shop
     if (strpos($PHP_SELF, "login.php") == 0 && strpos($PHP_SELF, "logoff.php") == 0 && strpos($PHP_SELF, "create_account.php") == 0 && strpos($PHP_SELF, "create_account_success.php") == 0 && strpos($PHP_SELF, "privacy.php") == 0 && strpos($PHP_SELF, "conditions.php") == 0 && strpos($PHP_SELF, "password_forgotten.php") == 0)
     {
      if (!tep_session_is_registered('customer_id')) {
    	$navigation->set_snapshot();
    	tep_redirect(tep_href_link(FILENAME_LOGIN, '', 'SSL'));
      }
     }
    

     

    Would be nice if anybody knows how to convert this for osC3?


  10. @Zappo: First I want to thank for this great contribution. Installed and working just fine!

     

    Maybe somebody can help me how I can make the Option Types contribution work together with PDF data_sheet maker (http://addons.oscommerce.com/info/1077).

     

    When the generate pdf Link on the product_info.php is pressed then the generated datasheet pdf has all the options listed but without the values entered:

     

    datasheet_pdf.jpg

     

    The input values are not passed from the product_info.php to the pdf_datasheet_function.php.

     

    product_info.php:

    ...
    <!-- BOE: PDF Datasheets //-->
                   <td align="left" valign="middle" class="main"><!-- <?php echo '<a href="' . tep_href_link(FILENAME_PRODUCT_REVIEWS, tep_get_all_get_params()) . '">' . tep_image_button('button_reviews.gif', IMAGE_BUTTON_REVIEWS) . '</a>'; ?> --></td>
    	  <td align="center" valign="middle" class="main"><?php echo '<table border="0" cellspacing="0" cellpadding="0"><tr><td valign="middle"><a href="' . tep_href_link(FILENAME_PDF_DATASHEET, 'products_id=' . $product_info['products_id']) .'" target="_blank">' . TEXT_PDF_DOWNLOAD1 . '</a> </td><td valign="middle"><a href="' . tep_href_link(FILENAME_PDF_DATASHEET, 'products_id=' . $product_info['products_id']) .'" target="_blank">' . tep_image('images/pdf.png',TEXT_PDF_DOWNLOAD2) .'</a></td></tr></table>'; ?></td>
                   <td align="right" valign="middle" class="main"><?php echo tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART); ?></td>
    <!-- EOE: PDF Datasheets //-->
    ...
    

     

    pdf_datasheet_function.php:

    ...
    if(PDF_SHOW_OPTIONS) {
         if (tep_db_num_rows($products_options_name)) {
           $this->MultiCell(0,8,TEXT_PRODUCTS_OPTIONS . $print_catalog_array['name'] .' :',0,'L',0);
           $this->Ln(-5);
         }
         while ($products_options_name_values = tep_db_fetch_array($products_options_name)) {
           $products_options_array = array();
           $products_options_name_values['products_options_name'];
           $this->Ln(6);
           $attributes_heading_font=explode(",",PDF_ATTRIBUTES_HEADING_FONT);
           $this->SetFont($attributes_heading_font[0],$attributes_heading_font[1],$attributes_heading_font[2]);
           $this->Cell(190,5,$products_options_name_values['products_options_name'],0,0,'L');
           $this->Ln();
           $products_options = tep_db_query("select pov.products_options_values_id, pov.products_options_values_name, pa.options_values_price, pa.price_prefix from " . TABLE_PRODUCTS_ATTRIBUTES . " pa, " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov where pa.products_id = '" . $products_id . "' and pa.options_id = '" . $products_options_name_values['products_options_id'] . "' and pa.options_values_id = pov.products_options_values_id and pov.language_id = '" . $languages_id . "'" . " order by 0+pov.products_options_values_name");
           $count_options_values = tep_db_num_rows($products_options);
      		$count_options = 0;
    
           while ($products_options_values = tep_db_fetch_array($products_options)) {
             $products_options_array[] = array('id' => $products_options_values['products_options_values_id'], 'text' => $products_options_values['products_options_values_name'],  'price_id' => $products_options_values['products_options_values_id'],   'text2' => $products_options_values['options_values_price']);
             $w=$this->GetStringWidth($products_options_values['products_options_values_name'])+2;
             $attributes_font=explode(",",PDF_ATTRIBUTES_FONT);
             $this->SetFont($attributes_font[0],$attributes_font[1],$attributes_font[2]);
             $this->SetTextColor(0,0,200);
             $option_string = $products_options_values['products_options_values_name'] . $option_value;
             if ( $products_options_values['options_values_price'] != ' 0.0000' && PDF_SHOW_OPTIONS_PRICE == '1') {
               $count_options++; $add_to = ($count_options_values != $count_options ? ',' : '.' );
               $this->Write(5,$products_options_values['products_options_values_name']. ' (' . $products_options_values['price_prefix'] . $currencies->display_price($products_options_values['options_values_price'], tep_get_tax_rate($print_catalog['products_tax_class_id'])) . ')' . $add_to);
             } else {
               $count_options++; $add_to = ($count_options_values != $count_options ? ',' : '.' );
               $this->Write(5,$products_options_values['products_options_values_name'] . $add_to);
             }
             $this->Cell(3,6,"",0,0,'C');
             $this->SetTextColor(0,0,0);
           }
         }
       }
    ...
    

     

    Maybe somebody can help how to pass the custom input values to the pdf datasheet file?

     

    Would be great me and an interesting extra feature for everybody who want a custom product datasheet pdf.


  11. Thanks, I had the same problem like Roaddoctor and this fix worked!

     

    But I have some issues left to solve for my purpose. First would be:

     

    Is there a way to modify the pdf-output to show the selected options rather then all options available? (I have also Option Types v2 installed and would be happy if this would be also possible with the users input)

     

    I think the solution must be in these lines (row 541) of the pdf_datasheet_functions.php

     

     

       if(PDF_SHOW_OPTIONS) {
         if (tep_db_num_rows($products_options_name)) {
           $this->MultiCell(0,8,TEXT_PRODUCTS_OPTIONS . $print_catalog_array['name'] .' :',0,'L',0);
           $this->Ln(-5);
         }
         while ($products_options_name_values = tep_db_fetch_array($products_options_name)) {
           $products_options_array = array();
           $products_options_name_values['products_options_name'];
           $this->Ln(6);
           $attributes_heading_font=explode(",",PDF_ATTRIBUTES_HEADING_FONT);
           $this->SetFont($attributes_heading_font[0],$attributes_heading_font[1],$attributes_heading_font[2]);
           $this->Cell(190,5,$products_options_name_values['products_options_name'],0,0,'L');
           $this->Ln();
           $products_options = tep_db_query("select pov.products_options_values_id, pov.products_options_values_name, pa.options_values_price, pa.price_prefix from " . TABLE_PRODUCTS_ATTRIBUTES . " pa, " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov where pa.products_id = '" . $products_id . "' and pa.options_id = '" . $products_options_name_values['products_options_id'] . "' and pa.options_values_id = pov.products_options_values_id and pov.language_id = '" . $languages_id . "'" . " order by 0+pov.products_options_values_name");
           $count_options_values = tep_db_num_rows($products_options);
      		$count_options = 0;
    
           while ($products_options_values = tep_db_fetch_array($products_options)) {
             $products_options_array[] = array('id' => $products_options_values['products_options_values_id'], 'text' => $products_options_values['products_options_values_name'],  'price_id' => $products_options_values['products_options_values_id'],   'text2' => $products_options_values['options_values_price']);
             $w=$this->GetStringWidth($products_options_values['products_options_values_name'])+2;
             $attributes_font=explode(",",PDF_ATTRIBUTES_FONT);
             $this->SetFont($attributes_font[0],$attributes_font[1],$attributes_font[2]);
             $this->SetTextColor(0,0,200);
             $option_string = $products_options_values['products_options_values_name'] . $option_value;
             if ( $products_options_values['options_values_price'] != ' 0.0000' && PDF_SHOW_OPTIONS_PRICE == '1') {
               $count_options++; $add_to = ($count_options_values != $count_options ? ',' : '.' );
               $this->Write(5,$products_options_values['products_options_values_name']. ' (' . $products_options_values['price_prefix'] . $currencies->display_price($products_options_values['options_values_price'], tep_get_tax_rate($print_catalog['products_tax_class_id'])) . ')' . $add_to);
             } else {
               $count_options++; $add_to = ($count_options_values != $count_options ? ',' : '.' );
               $this->Write(5,$products_options_values['products_options_values_name'] . $add_to);
             }
             $this->Cell(3,6,"",0,0,'C');
             $this->SetTextColor(0,0,0);
           }
         }
       }
    


  12. Hi,

    I installed the Discount Coupon Codes Contribution yesterday and it is exactly what I was looking for!

     

    Still I have one issue I was not able to solve yet...

     

    As I have the "low order fee" module activated and my customers are charged a little amount if their order is lower then 10.00EUR this causes a problem now with the discount coupon module. If someone use a coupon and the overall prize is then less then the 10.00 EUR the customer will be charged with the low order fee.

     

    So the question is if there is a way that the low order fee is checked before the coupon is calculated or is it possible to turn off the low order fee if someone uses a coupon code?

     

    Thanks!

     

    I think I got it... I switch off the "low order fee" if any coupon code is entered by adding this code into ot_loworderfee.php:

     

       function ot_loworderfee() {
         $this->code = 'ot_loworderfee';
         $this->title = MODULE_ORDER_TOTAL_LOWORDERFEE_TITLE;
         $this->description = MODULE_ORDER_TOTAL_LOWORDERFEE_DESCRIPTION;
         $this->enabled = ((MODULE_ORDER_TOTAL_LOWORDERFEE_STATUS == 'true') ? true : false);
         $this->sort_order = MODULE_ORDER_TOTAL_LOWORDERFEE_SORT_ORDER;
    
         $this->output = array();
    // add this
         if (tep_session_is_registered('coupon')) $this->enabled = false;
    // end
       }
    

     

    Can use this workaround? My tests work out so far...


  13. I would use the code that double checks whether or not shipping charges should change based on the subtotal after discount to try and write the code to check the low order fee and see if that needs to be added after discount. This would require custom programming and some knowledge of PHP.

     

    yes, if nobody else has coded a solution so far I will have to give it a try... though my skills are limited ;)

    I guess I have to start with /includes/classes/discount_coupon.php right?


  14. Hi,

    I installed the Discount Coupon Codes Contribution yesterday and it is exactly what I was looking for!

     

    Still I have one issue I was not able to solve yet...

     

    As I have the "low order fee" module activated and my customers are charged a little amount if their order is lower then 10.00EUR this causes a problem now with the discount coupon module. If someone use a coupon and the overall prize is then less then the 10.00 EUR the customer will be charged with the low order fee.

     

    So the question is if there is a way that the low order fee is checked before the coupon is calculated or is it possible to turn off the low order fee if someone uses a coupon code?

     

    Thanks!


  15. FIXED!

     

    with these changes:

     

    in /includes/classes/order_total.php:

     

    //				include(DIR_WS_LANGUAGES . $language . '/modules/order_total/' . $value);
    //				include(DIR_WS_MODULES . 'order_total/' . $value);
    			require_once(DIR_WS_LANGUAGES . $language . '/modules/order_total/' . $value);
    			require_once(DIR_WS_MODULES . 'order_total/' . $value);

    (// old code)

     

     

    in /checkout_process.php:

    /*
    //PayPal Old
    require(DIR_WS_CLASSES . 'order_total.php');
    $order_total_modules = new order_total;
    $order_totals = $order_total_modules->process();
    */
    if(!class_exists('order_total')) {
    include_once(DIR_WS_CLASSES . 'order_total.php');
    $order_total_modules = new order_total;
    $order_totals = $order_total_modules->process();
    }

    (/* old code */)

     

     

    and in /includes/modules/payment/paypal_ipn.php:

    //	  include(DIR_WS_CLASSES . 'order_total.php');
    //	  $order_total_modules = new order_total;
    //	  $order_totals = $order_total_modules->process();
    if(!class_exists('order_total')) {
    include_once(DIR_WS_CLASSES . 'order_total.php');
    $order_total_modules = new order_total;
    $order_totals = $order_total_modules->process();

    (// old code)


  16. Since I update my shop and did some various changes I figured out now as it is live again that customers who pay with PayPal get this error when they return to the shop:

     

    cannot redeclare class order_total

     

    I guess the problem is within the checkout_process.php?

     

    Would be nice if somebody is able to help me with this issue. I can paste all the code if needed!


  17. hi,

     

    i've installed this contrib but somehow it is not working with me... on the checkout_confirmation.php page the fee does not appear.... it's like i would not install anything at all, still i've double checked everything - its installed like described

     

    any help would be great

     

    thanks

    caitanya

     

    I have the same problem, contribution installed and nothing appears...

     

    @caitanya: how did you fix it?

     

    THX

×