Jump to content

El_Heso

Members
  • Content count

    150
  • Joined

  • Last visited

Everything posted by El_Heso

  1. the problem is solved by Andrew who created the extra contrib. this came on my mail: Hi Tony For some reason your stock.php form does not seam to read the php self tag in admin/stock.php find: <td><form action="<? echo $PHP_SELF;?>" method=get> Changing it to: <td><form action="#" method=get> Andrew Thanks To Andrew problem is gone /Tony
  2. Hi! Does anybody really get this contrib to work? I have tested to install the new contrib for the new oscommerce but this happens even in a clean oscommerce: I set up QT Pro and can use all the functions except seemingly the most important --> Adding stock to attributes. I can get to the page to enter the quantity for the attributes but when I click "Add" after I enter my quantity, it sends me to https://www.xxxx.com/xxxx/xxx...&action=Add and says the page cannot be found. Any ideas what is going on? Regards Tony
  3. El_Heso

    manufacturer2 2.0

    Hi! I wonder how i can have the manufacturer 2 in index.php so when i choose a category it opens a second dropdown were i can choose gender for the product. Right now it opens 2 tables one for the dropdown for brands and one for manufactur 2. Hopefully i can manage to make the brand and manufactur 2 to work together but i dont know how i can code this to work. I dont want a manufactur 2 box beacuse i dont have any boxes on my site i only want the elseif statement to work in index.php so if i have connected a product with gender so should a second dropdown open over the product in the list were i can choose gender to sort the product. Hope you understand what i mean. Regards Tony
  4. El_Heso

    manufacturer2 2.0

    Hi! I wonder what i have done wrong, i have installed everything as i should but when i have selected example: wallet in my dropdownmenu for categories everything works so i can choose in the new dropdown in productlist for change to either all manufacturers or choose a single manufacturer but the new dropdown for manufacturers2 is not showing up on the page. in admin it works so i can put the info on to the product about manufacturers2 so the only problem is that it dont show up when i have selected a category or manufactur on the default page. Anyone know how i can make this work?? Regards Tony
  5. El_Heso

    Product Listing in Columns v2.0

    Hi! I wonder if someone have a qlue how to fix the price color to red in product_listing_col.php and i also have shortdesc installed and i want that text in gray someone have a qlue how to fix this? maybe it can be done by making a class? but i dont know how to fix that.... Regards Tony
  6. El_Heso

    Product Listing in Columns v2.0

    Hi! I wonder if someone know how to write in product_listing_col.php so if the quantity is 0 it should not display the buy now button before i installed this contrib i had it so in product_listing.php but i cant get it to work with this contrib. Anyone have a qlue? Regards Tony
  7. El_Heso

    Ultrapics + Lightbox 2.03.3

    Nobody have a qlue???? /Tony
  8. El_Heso

    [Contribution] STS v4

    Hi Folks! I have a big problem i have built a site on my computer at home and then i ftp up it to the server and took backup and reloaded the sql file in the database but when i look at the site the sts is not working but with the same files and installations it works on my computer, does anyone now what the problem can be??? Regards Tony Edit: never mind i missed a link so now it works
  9. El_Heso

    Ultrapics + Lightbox 2.03.3

    Hi! I wonder if someone have a qlue how to implement lightbox and enlarge popup window in product_listing.php?? Someone have tryed that? Regards Tony
  10. El_Heso

    Ultrapics + Lightbox 2.03.3

    Hi! I wonder if someone have a qlue how to implement lightbox and enlarge popup window in product_listing.php?? Someone have tryed that? Regards Tony
  11. El_Heso

    [Contribution] STS v4

    Hi Bill! I made it work now i updated the STS to your new one so it was problem with the old one. Thank you for your time. Regards Tony
  12. El_Heso

    [Contribution] STS v4

    Hi Bill! I have done it right but when i paste the ;headertags.php in the STS so will the homepage become a white blank page. Any idea where i can start looking for problem?? /Tony
  13. El_Heso

    [Contribution] STS v4

    Hi! I wonder if someone can help me i have both STS and HTC installed but when i turn STS on the Header tags dont work and when i turn STS off HTC works, I have looked everywhere but dont find the problem. Regards Tony
  14. El_Heso

    [CONTRIBUTION] PDF Customer Invoice

    Put your logo in images and it´s fixed ( with right name ofcourse )
  15. El_Heso

    [CONTRIBUTION] PDF Customer Invoice

    Hi Chris! No my mistake that´s working now but it´s the orders.php thats the problem is when i put your code in nothing works and i found what it was when i delete the AJAX module from it the code works so my question is how to implement your code so it works with the ajax module Regards Tony
  16. Hi! I have a automatic product notification so whe i press a button in admin all of my customer gets a notification email with the information they have signed for example: customer X sign up for stock changes so when i press my button it controlls if there has been some stock changes and if so are there any customer signed up for that notification and sends a email with the info and deletes the sign up info from the database. so far so good but i have a really big problem everything works except there is no email going out this is my code: <?php require('includes/application_top.php'); $notification_info_query = tep_db_query("select * from " . TABLE_PRODUCTS_NOTIFICATIONS . " order by products_id, email_adress, notification_type"); $notifications_exist = false; $message = ''; if (tep_db_num_rows($notification_info_query)){ $notifications_exist = true; $bv0 = 0; $bv1 = 0; $bv2 = 0; while ($notification_info = tep_db_fetch_array($notification_info_query)){ $notify = false; //check for stock changes if ($notification_info['notification_type']=='0'){ $product_info_query = tep_db_query("select products_name, products_quantity from " . TABLE_PRODUCTS . " JOIN " . TABLE_PRODUCTS_DESCRIPTION . " using (products_id) where products.products_id='".$notification_info['products_id']."'"); if (tep_db_num_rows($product_info_query)){ $product_info = tep_db_fetch_array($product_info_query); if ($product_info['products_quantity']>$notification_info['old_lager']) $notify = true; else $notify = false; } if ($notify==true){ //If stock has changed tell customer $message .= 'Kund ('.$notification_info['email_adress'].') meddelad om lagerändring<br>'; $bv0 = $bv0+1; //Build email $email_adress = $notification_info['email_adress']; $subject = 'Meddelande om produktbevakning'; $email_text = EMAIL_WELCOME . $product_info['products_name'] . "\n\n"; $email_text .= EMAIL_TEXT_LEV . "\n" . 'http://www.xxx.com/product_info.php?products_id=' . $notification_info['products_id'] . "\n\n"; $email_text .= EMAIL_CONTACT; tep_mail(' ', $email_address, $subject, $email_text, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS); //delete notification sign up tep_db_query("delete from " . TABLE_PRODUCTS_NOTIFICATIONS . " where products_id='".$notification_info['products_id']."' and email_adress='".$email_adress."' and notification_type='".$notification_info['notification_type']."'"); } //check price changes } else if ($notification_info['notification_type']=='1'){ $product_info_query = tep_db_query("select products_name, products_price, products_tax_class_id from " . TABLE_PRODUCTS . " JOIN " . TABLE_PRODUCTS_DESCRIPTION . " using (products_id) where products.products_id='".$notification_info['products_id']."'"); if (tep_db_num_rows($product_info_query)){ $product_info = tep_db_fetch_array($product_info_query); if ($product_info['products_price']<$notification_info['old_price']) $notify = true; else $notify = false; } if ($notify==true){ //if changes tell customer $message .= 'Kund ('.$notification_info['email_adress'].') meddelad om prisförändring<br>'; $bv1 = $bv1+1; //Build email $email_adress = $notification_info['email_adress']; $subject = 'Meddelande om produktbevakning'; $email_text = EMAIL_WELCOME . $product_info['products_name'] . "\n\n"; $newprice = number_format($product_info['products_price']*(1+0.01*tep_get_tax_rate($product_info['products_tax_class_id'])),0,'',' ') . ':-'; $email_text .= EMAIL_TEXT_PRICE . $newprice . "\n" . 'Du hittar produkten på nedanstående länk:' . "\n" . 'http://www.xxx.com/product_info.php?products_id=' . $notification_info['products_id'] . "\n\n"; $email_text .= EMAIL_CONTACT; tep_mail('aa', $email_address, $subject, $email_text, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS); //Update new price tep_db_query("update " . TABLE_PRODUCTS_NOTIFICATIONS . " set old_price='".$product_info['products_price']."' where products_id='".$notification_info['products_id']."' and email_adress='".$email_adress."' and notification_type='".$notification_info['notification_type']."'"); } //Notification price } else if ($notification_info['notification_type']=='2'){ $product_info_query = tep_db_query("select products_name, products_price, products_tax_class_id from " . TABLE_PRODUCTS . " JOIN " . TABLE_PRODUCTS_DESCRIPTION . " using (products_id) where products.products_id='".$notification_info['products_id']."'"); if (tep_db_num_rows($product_info_query)){ $product_info = tep_db_fetch_array($product_info_query); if ($product_info['products_price']<$notification_info['notification_value']) $notify = true; else $notify = false; } if ($notify==true){ //If changes tell customer $message .= 'Kund ('.$notification_info['email_adress'].') meddelad om pris under önskad nivå<br>'; $bv2 = $bv2+1; //Build email $email_adress = $notification_info['email_adress']; $subject = 'Meddelande om produktbevakning'; $email_text = EMAIL_WELCOME . $product_info['products_name'] . "\n\n"; $newprice = number_format($product_info['products_price']*(1+0.01*tep_get_tax_rate($product_info['products_tax_class_id'])),0,'',' ') . ':-'; $email_text .= EMAIL_TEXT_PRICE2 . $newprice . "\n" . 'Du hittar produkten på nedanstående länk:' . "\n" . 'http://www.xxx.com/product_info.php?products_id=' . $notification_info['products_id'] . "\n\n"; $email_text .= EMAIL_CONTACT; tep_mail('aa', $email_address, $subject, $email_text, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS); //Delete notification tep_db_query("delete from " . TABLE_PRODUCTS_NOTIFICATIONS . " where products_id='".$notification_info['products_id']."' and email_adress='".$email_adress."' and notification_type='".$notification_info['notification_type']."'"); } } } } ?> <!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 TITLE; ?></title> <link rel="stylesheet" type="text/css" href="includes/stylesheet.css"> </head> <body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" bgcolor="#FFFFFF"> <!-- header //--> <?php require(DIR_WS_INCLUDES . 'header.php'); ?> <!-- header_eof //--> <!-- body //--> <table border="0" width="100%" cellspacing="2" cellpadding="2"> <tr> <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="1" cellpadding="1" class="columnLeft"> <!-- left_navigation //--> <?php require(DIR_WS_INCLUDES . 'column_left.php'); ?> <!-- left_navigation_eof //--> </table></td> <!-- body_text //--> <td width="100%" valign="top"> <table border="0" cellpadding="0" cellspacing="10"> <?php echo '<tr><td class="smallText">'.$message.'</td></tr>'; if (!$notifications_exist){ echo '<tr><td>Det finns inga bevakningar just nu.</td></tr>'; } else { echo '<tr><td>Uppdateringen av bevakning är slutförd.</td></tr>'; echo '<tr><td>Lagerförändring: ' . $bv0 . ' st kunder meddelade och borttagna från bevakningslistan.</td></tr>'; echo '<tr><td>Prisförändring: ' . $bv1 . ' st kunder meddelade och uppdaterade.</td></tr>'; echo '<tr><td>Önskat pris nått: ' . $bv2 . ' st kunder meddelade och borttagna från bevakningslistan.</td></tr>'; } ?> </table> </td> <!-- body_text_eof //--> </tr> </table> <!-- body_eof //--> <!-- footer //--> <?php require(DIR_WS_INCLUDES . 'footer.php'); ?> <!-- footer_eof //--> <br> </body> </html> <?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?> Anyone have a qlue how to fix so it should send email? I dont see it so i need help Regards Tony
  17. El_Heso

    Show Payment module only if

    Still needs help :blush: Regards Tony
  18. El_Heso

    Show Payment module only if

    Hi! I wonder if someone can help me how to write to fix my problem. I have several payment modules installed one is to pay to a company who has invoices for me but the max limt for it´s services is 5.000 incl tax so i want to hide that option of payment IF the shoppingcarts value is higher then 5.000 incl tax So my question is WHERE and WHAT should i write i use checkout.php for payment choice code: //Om ordern är bekräftad, aktivera betalningsmodulen if (isset($HTTP_POST_VARS['action']) && ($HTTP_POST_VARS['action'] == 'register') && (tep_session_is_registered('customer_id'))){ require(DIR_WS_CLASSES . 'payment.php'); $payment_modules = new payment($payment); } else { //kolla om payment-formuläret är skickat.. ändra payment till det nya valet.. require(DIR_WS_CLASSES . 'payment.php'); $payment_modules = new payment; $payment_select = $payment_modules->selection(); if ((tep_session_is_registered('payment') || isset($HTTP_POST_VARS['payment'])) && (tep_count_payment_modules() > 1 )){ // load the selected payment module if (isset($HTTP_POST_VARS['payment'])) $payment = $HTTP_POST_VARS['payment']; //$payment_modules = new payment($payment); } else if (tep_count_payment_modules() > 1){ $payment = 'moneyorder'; tep_session_unregister('payment'); if (!tep_session_is_registered('payment')) tep_session_register('payment'); } //Om det bara finns 1 payment-modul else if (tep_count_payment_modules() < 2 ) { // Annars välj förskottsbetalning $payment_select = $payment_modules->selection(); $payment = 'moneyorder'; tep_session_unregister('payment'); if (!tep_session_is_registered('payment')) tep_session_register('payment'); //tep_redirect(tep_href_link(FILENAME_CHECKOUT_CONFIRMATION, '', 'SSL')); } } and the codes in payment.php: <?php class payment { var $modules, $selected_module; // class constructor function payment($module = '') { global $payment, $language, $PHP_SELF; if (defined('MODULE_PAYMENT_INSTALLED') && tep_not_null(MODULE_PAYMENT_INSTALLED)) { $this->modules = explode(';', MODULE_PAYMENT_INSTALLED); $include_modules = array(); if ( (tep_not_null($module)) && (in_array($module . '.' . substr($PHP_SELF, (strrpos($PHP_SELF, '.')+1)), $this->modules)) ) { $this->selected_module = $module; $include_modules[] = array('class' => $module, 'file' => $module . '.php'); } else { reset($this->modules); while (list(, $value) = each($this->modules)) { $class = substr($value, 0, strrpos($value, '.')); $include_modules[] = array('class' => $class, 'file' => $value); } } for ($i=0, $n=sizeof($include_modules); $i<$n; $i++) { include(DIR_WS_LANGUAGES . $language . '/modules/payment/' . $include_modules[$i]['file']); include(DIR_WS_MODULES . 'payment/' . $include_modules[$i]['file']); $GLOBALS[$include_modules[$i]['class']] = new $include_modules[$i]['class']; } // if there is only one payment method, select it as default because in // checkout_confirmation.php the $payment variable is being assigned the // $HTTP_POST_VARS['payment'] value which will be empty (no radio button selection possible) if ( (tep_count_payment_modules() == 1) && (!isset($GLOBALS[$payment]) || (isset($GLOBALS[$payment]) && !is_object($GLOBALS[$payment]))) ) { $payment = $include_modules[0]['class']; } if ( (tep_not_null($module)) && (in_array($module, $this->modules)) && (isset($GLOBALS[$module]->form_action_url)) ) { $this->form_action_url = $GLOBALS[$module]->form_action_url; } } } // class methods /* The following method is needed in the checkout_confirmation.php page due to a chicken and egg problem with the payment class and order class. The payment modules needs the order destination data for the dynamic status feature, and the order class needs the payment module title. The following method is a work-around to implementing the method in all payment modules available which would break the modules in the contributions section. This should be looked into again post 2.2. */ function update_status() { if (is_array($this->modules)) { if (is_object($GLOBALS[$this->selected_module])) { if (function_exists('method_exists')) { if (method_exists($GLOBALS[$this->selected_module], 'update_status')) { $GLOBALS[$this->selected_module]->update_status(); } } else { // PHP3 compatibility @call_user_method('update_status', $GLOBALS[$this->selected_module]); } } } } function javascript_validation() { $js = ''; if (is_array($this->modules)) { $js = '<script language="javascript"><!-- ' . "n" . 'function check_form() {' . "n" . ' var error = 0;' . "n" . ' var error_message = "' . JS_ERROR . '";' . "n" . ' var payment_value = null;' . "n" . ' if (document.checkout_payment.payment.length) {' . "n" . ' for (var i=0; i<document.checkout_payment.payment.length; i++) {' . "n" . ' if (document.checkout_payment.payment.checked) {' . "n" . ' payment_value = document.checkout_payment.payment.value;' . "n" . ' }' . "n" . ' }' . "n" . ' } else if (document.checkout_payment.payment.checked) {' . "n" . ' payment_value = document.checkout_payment.payment.value;' . "n" . ' } else if (document.checkout_payment.payment.value) {' . "n" . ' payment_value = document.checkout_payment.payment.value;' . "n" . ' }' . "nn"; reset($this->modules); while (list(, $value) = each($this->modules)) { $class = substr($value, 0, strrpos($value, '.')); if ($GLOBALS[$class]->enabled) { $js .= $GLOBALS[$class]->javascript_validation(); } } $js .= "n" . ' if (payment_value == null) {' . "n" . ' error_message = error_message + "' . JS_ERROR_NO_PAYMENT_MODULE_SELECTED . '";' . "n" . ' error = 1;' . "n" . ' }' . "nn" . ' if (error == 1) {' . "n" . ' alert(error_message);' . "n" . ' return false;' . "n" . ' } else {' . "n" . ' return true;' . "n" . ' }' . "n" . '}' . "n" . '//--></script>' . "n"; } return $js; } function selection() { $selection_array = array(); if (is_array($this->modules)) { reset($this->modules); while (list(, $value) = each($this->modules)) { $class = substr($value, 0, strrpos($value, '.')); if ($GLOBALS[$class]->enabled) { $selection = $GLOBALS[$class]->selection(); if (is_array($selection)) $selection_array[] = $selection; } } } return $selection_array; } function pre_confirmation_check() { if (is_array($this->modules)) { if (is_object($GLOBALS[$this->selected_module]) && ($GLOBALS[$this->selected_module]->enabled) ) { $GLOBALS[$this->selected_module]->pre_confirmation_check(); } } } function confirmation() { if (is_array($this->modules)) { if (is_object($GLOBALS[$this->selected_module]) && ($GLOBALS[$this->selected_module]->enabled) ) { return $GLOBALS[$this->selected_module]->confirmation(); } } } function process_button() { if (is_array($this->modules)) { if (is_object($GLOBALS[$this->selected_module]) && ($GLOBALS[$this->selected_module]->enabled) ) { return $GLOBALS[$this->selected_module]->process_button(); } } } function before_process() { if (is_array($this->modules)) { if (is_object($GLOBALS[$this->selected_module]) && ($GLOBALS[$this->selected_module]->enabled) ) { return $GLOBALS[$this->selected_module]->before_process(); } } } function after_process() { if (is_array($this->modules)) { if (is_object($GLOBALS[$this->selected_module]) && ($GLOBALS[$this->selected_module]->enabled) ) { return $GLOBALS[$this->selected_module]->after_process(); } } } function get_error() { if (is_array($this->modules)) { if (is_object($GLOBALS[$this->selected_module]) && ($GLOBALS[$this->selected_module]->enabled) ) { return $GLOBALS[$this->selected_module]->get_error(); } } } } ?> Hope someone have a qlue Regards Tony
  19. Hi! I want to display one of my payment methods if the summury in the shopping cart is below $5000 if it´s over 5000 it should not show this payment method Someone have a qlue? Regards Tony
  20. El_Heso

    How to display payment method only if

    Hi Chris! is there a way to use your contrib in checkout.php instead of checkout_payment.php beacuse i use PWA Regards Tony
  21. El_Heso

    How to display payment method only if

    is it difficult to change? Do you have some time to help me out with our contribs so the payment module i choose in admin, dont show up if the shopping cart´s value is bigger than 5000 /Tony
  22. El_Heso

    How to display payment method only if

    Hi again! when i read the notes on you contrib it seems like there´s a popup window telling why they cant purchase, that i want is that one of my payment methods should be hide if the purchase amount is bigger than $5000 "not displayed at all" can i do that with this contribs? /Tony
  23. El_Heso

    How to display payment method only if

    i dont want the payment method show if the value is more than 5000 even if the customer has bought of me before how can i fix that? Regards Tony
  24. El_Heso

    [CONTRIBUTION] PDF Customer Invoice

    true phpadmin adn pick the things you put in and delete direct from database or make a new sql query there you delete the items /Tony
×