Jump to content
Latest News: (loading..)

Portman

Members
  • Content count

    63
  • Joined

  • Last visited

Everything posted by Portman

  1. Hi, I am having trouble with currency conversion.... I am using BS Frozen, The function for XE in localization.php looks like this... function quote_xe_currency($to, $from = DEFAULT_CURRENCY) { $page = file('http://www.xe.com/currencyconverter/convert/?Amount=1&From=' . $from . '&To=' . $to); $match = array(); preg_match('/[0-9.]+\s*' . $from . '\s*=\s*([0-9.]+)\s*' . $to . '/', implode('', $page), $match); if (sizeof($match) > 0) { return $match[1]; } else { return false; } } I updated the link according to some stuff I read in another post and if I manually enter the link a browser it works fine.... THere have been no modifications to other files that may be related as far as I know. every time I click the 'Update Exchange Rate' button in the currencies section I get the following errors... Warning: The primary exchange rate server (xe) failed for AUS Dollar (AUD) - trying the secondary exchange rate server. The exchange rate for AUS Dollar (AUD) was updated successfully via fixer. Warning: The primary exchange rate server (xe) failed for Euro (EUR) - trying the secondary exchange rate server. Error: The exchange rate for Euro (EUR) was not updated via fixer. Is it a valid currency code? Warning: The primary exchange rate server (xe) failed for U.S. Dollar (USD) - trying the secondary exchange rate server. Error: The exchange rate for U.S. Dollar (USD) was not updated via fixer. Is it a valid currency code? Warning: The primary exchange rate server (xe) failed for Pounds Sterling (GBP) - trying the secondary exchange rate server. Error: The exchange rate for Pounds Sterling (GBP) was not updated via fixer. Is it a valid currency code? Warning: The primary exchange rate server (xe) failed for Canadian Dollar (CAD) - trying the secondary exchange rate server. Error: The exchange rate for Canadian Dollar (CAD) was not updated via fixer. Is it a valid currency code? AUD is my Default Currency.... Is there anything else I need to look at to try and fix this issue?
  2. Hi, Is there a particular modal Addon that I can add to the main body of my website... rather than in the left or right box or shopping cart type sections. I have one or two places on my website (one on checkout_confirmation page, and 'Ill probably want to add one on the payment page as well) .... If there is not one for my particular need then what would be the best addon for me to modify (particularly thinking I will need a couple of them operating at once on different pages) I am using the most up to date BS frozen
  3. Portman

    Help with Modal Addons

    Thanks @JcMagpie, is this the one you are suggesting? https://apps.oscommerce.com/89uS9&modular-checkout-pages-bs
  4. Hi.... I am trying to modify my admin/specials.php file so that I can change the price for multiple "wholesale" customer groups (think SPPC) I have got it to work for a price value, but I am trying to make it work for a percentage and that is where I am coming unstuck... can someone have a look at the following code and help me out .... case 'update': $specials_id = tep_db_prepare_input($_POST['specials_id']); $products_price = tep_db_prepare_input($_POST['products_price']); $specials_price = tep_db_prepare_input($_POST['specials_price']); $expdate = tep_db_prepare_input($_POST['expdate']); // Added by peter for Wholesale special prices $array_specials_ws_price = array(); for ($i=1; $i<=MODULE_STORE_WHOLESALE_GROUPS; $i++) { $value_specials_ws_price = ['specials_price_ws_' . $i]; $wholesale_price = ("products_ws_price_$i"); $value_specials_ws_price = tep_db_prepare_input($_POST['specials_price_ws_' . $i]); if (substr($value_specials_ws_price, -1) == '%') { $new_special_ws_insert_query = tep_db_query("select products_id, products_ws_price_1 from " . TABLE_PRODUCTS . " where products_id = '" . (int)$products_id . "'"); $new_special_ws_insert = tep_db_fetch_array($new_special_ws_insert_query); $wholesale_price_holder = $new_special_ws_insert['products_ws_price_1']; $value_specials_ws_price = ($wholesale_price_holder - (($value_specials_ws_price / 100) * $wholesale_price_holder)); } $array_specials_ws_price[] = ("specials_new_ws_price_$i = " . $value_specials_ws_price); // ********************************************************************* } $array_specials_ws_price = implode(', ', $array_specials_ws_price); // EOF Added by Peter if (substr($specials_price, -1) == '%') $specials_price = ($products_price - (($specials_price / 100) * $products_price)); $expires_date = ''; if (tep_not_null($expdate)) { $expires_date = substr($expdate, 0, 4) . substr($expdate, 5, 2) . substr($expdate, 8, 2); } // Next Line modified By Peter for Wholesale special prices tep_db_query("update " . TABLE_SPECIALS . " set specials_new_products_price = '" . tep_db_input($specials_price) . "', $array_specials_ws_price, specials_last_modified = now(), expires_date = " . (tep_not_null($expires_date) ? "'" . tep_db_input($expires_date) . "'" : 'null') . " where specials_id = '" . (int)$specials_id . "'"); tep_redirect(tep_href_link('specials.php', 'page=' . $_GET['page'] . '&sID=' . $specials_id)); break; I have simplified it a bit to try and find what I am doing wrong... my hope is to select the value in $wholesale_price in the query eventually, but for now I am querying a static field "products_ws_price_1". Basically, when I enter a percentage in the first field , but put price values in the other fields I get this error ; 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' specials_new_ws_price_2 = 32.0000, specials_new_ws_price_3 = 33.0000, specials_' at line 1 update specials set specials_new_products_price = '28.7920', specials_new_ws_price_1 = , specials_new_ws_price_2 = 32.0000, specials_new_ws_price_3 = 33.0000, specials_new_ws_price_4 = 34.0000, specials_new_ws_price_5 = 35.0000, specials_new_ws_price_6 = 36.0000, specials_new_ws_price_7 = 37.0000, specials_last_modified = now(), expires_date = '20190301' where specials_id = '6' Any help would be appreciated.
  5. Portman

    Updating admin/specials.php

    never mind.... sorted it out.... I assume this ok, or is there a better way to do it?... for ($i=1; $i<=x; $i++) { $temp_holder = "specials_new_ws_price_$i"; $specials_new_ws_prices = ($sInfo->$temp_holder); echo $specials_new_ws_prices; }
  6. Hi, I'm trying to modify the admin/specials.php page so that i can update multiple different prices for different groups (think SPPC or Wholesale Lite) I am playing around with the update and insert section of the file... tep_db_query("insert into " . TABLE_SPECIALS . " (products_id, specials_new_products_price, specials_date_added, expires_date, status) values ('" . (int)$products_id . "', '" . tep_db_input($specials_price) . "', now(), " . (tep_not_null($expires_date) ? "'" . tep_db_input($expires_date) . "'" : 'null') . ", '1')"); tep_db_query("update " . TABLE_SPECIALS . " set specials_new_products_price = '" . tep_db_input($specials_price) . "', specials_last_modified = now(), expires_date = " . (tep_not_null($expires_date) ? "'" . tep_db_input($expires_date) . "'" : 'null') . " where specials_id = '" . (int)$specials_id . "'"); but I need to make a loop so that I can insert the multiple different prices.... In an attempt to get across what I want to do here is what my thought process is in a broken code kind of way... tep_db_query("insert into " . TABLE_SPECIALS . " (products_id, specials_new_products_price, ... for ($i=1; $i<=xxx; $i++) { insert_new_special_price_ . $i; } ... specials_date_added, expires_date, status) values ('" . (int)$products_id . "', '" . tep_db_input($specials_price) . "', now(), " . (tep_not_null($expires_date) ? "'" . tep_db_input($expires_date) . "'" : 'null') . ", '1')"); I have been trying different things and been looking around for solutions, but for the life of me I cant get it to work. Can anyone give me some help
  7. Portman

    Updating admin/specials.php

    Hi everyone... can someone please help me out with this one.... I'm trying to get this to work... for ($i=1; $i<=x; $i++) { $specials_new_ws_prices = ($sInfo->specials_new_ws_price_$i); echo $specials_new_ws_prices ; } obviously I get a "syntax error, unexpected '$i' (T_VARIABLE)" on the above... if I change it to; $specials_new_ws_prices = ($sInfo->specials_new_ws_price_1); It prints the correct value from the database, so how do I make it work using the value of $i The idea is to populate an input field in the loop. Thanks,
  8. Portman

    Updating admin/specials.php

    Thanks @Dan Cole I think that has done what I am hoping to do.... now to see if I can recreate it!!
  9. Portman

    Updating admin/specials.php

    Sorry, my above example does not make a lot of sense.... can I create 2 arrays... 1 with the table labels ... 1 with the record values and then add them to the tep_db_query line.... this sort of thing.... $array_labels = for ($i=1; $i<=xxx; $i++) { table_label_ . $i; } $array_values = for ($i=1; $i<=xxx; $i++) { insert_new_special_price_ . $i; } tep_db_query("insert into " . TABLE_SPECIALS . " (products_id, specials_new_products_price, . '" $array_labels "' . specials_date_added, expires_date, status) values ('" . (int)$products_id . "', '" . tep_db_input($specials_price) . "', '" . $array_values . "' ,now(), " . (tep_not_null($expires_date) ? "'" . tep_db_input($expires_date) . "'" : 'null') . ", '1')");
  10. Ok, so I'm playing around with hiding particular products from particular customers... I have made a variable $hide_product where the value 1 means the product is hidden and 0 means it is visible... I am trying to modify bm_specials.php and bm_whats_new.php so that if $hide_product = 1 that product does not show up in the box and another is selected... Im assuming it is these lines of code I need to modify, but for the life of me I can't figure it out bm_specials.php if ($random_product = tep_random_select("select p.products_id, pd.products_name, p.products_price, p.products_tax_class_id, p.products_image, s.specials_new_products_price from products p, products_description pd, specials s where p.products_status = '1' and p.products_id = s.products_id and pd.products_id = s.products_id and pd.language_id = '" . (int)$languages_id . "' and s.status = '1' order by s.specials_date_added desc limit " . MAX_RANDOM_SELECT_SPECIALS)) { bm_whats_new.php if ($random_product = tep_random_select("select products_id, products_image, products_tax_class_id, products_price from " . TABLE_PRODUCTS . " where products_status = '1' order by products_date_added desc limit " . MAX_RANDOM_SELECT_NEW)) { any help would be appreciated
  11. thanks @multimixer I was trying to plug the variable in there rather than the record from the database...
  12. Portman

    call to new function in addon

    thanks @raiwa... that was what I needed to know! Yes I am modifying one of your addons - or at least trying to - at this stage trying to create the ability to hide products from particular wholesale groups
  13. Hi I am using BS Frozen I have been doing some modifications to an add-on and I have created a new <function> to the code to make the add-on operate in the way I need it to... This has worked fine within the files of the add-on.... Now I want to call that function (located in catalog/includes/module/store/st_addon.php) in catalog/product_info.php... Can I do that? and if so how?
  14. Hi - Quick question (hopefully) I am using BS Frozen. I am looking for the section of code that controls the appearance of the special price when it is displayed in product_info.php... I need to hide the struck through original price if a customer is not logged in - I have done it in the specials box and the specials in product_listing.php but cant find where the full listing instance is kept. Any help would be appreciated.
  15. Ahhhhh, Thanks @Tsimi I didn't think of looking there!
  16. Hi, I Just installed a fresh version of bootstrap 2341 frozen to do some playing around with however, when I go to the admin page all the left hand side navigation boxes are missing.... I'm assuming it has something to do with the config file but I think that is all ok... Ill include it here... any ideas on what could be wrong? <?php define('HTTP_SERVER', 'https://creativeabundance.com.au'); define('HTTPS_SERVER', 'https://creativeabundance.com.au'); define('ENABLE_SSL', true); define('HTTP_COOKIE_DOMAIN', 'creativeabundance.com.au'); define('HTTPS_COOKIE_DOMAIN', 'creativeabundance.com.au'); define('HTTP_COOKIE_PATH', '/sales/admin/'); define('HTTPS_COOKIE_PATH', '/sales/admin/'); define('HTTP_CATALOG_SERVER', 'https://creativeabundance.com.au'); define('HTTPS_CATALOG_SERVER', 'https://creativeabundance.com.au'); define('ENABLE_SSL_CATALOG', 'true'); define('DIR_FS_DOCUMENT_ROOT', '/home/creativ3/public_html/sales/'); define('DIR_WS_ADMIN', '/sales/admin/'); define('DIR_WS_HTTPS_ADMIN', '/sales/admin/'); define('DIR_FS_ADMIN', '/home/creativ3/public_html/sales/admin/'); define('DIR_WS_CATALOG', '/sales/'); define('DIR_WS_HTTPS_CATALOG', '/sales/'); define('DIR_FS_CATALOG', '/home/creativ3/public_html/sales/'); define('DIR_WS_CATALOG_IMAGES', DIR_WS_CATALOG . 'images/'); define('DIR_WS_CATALOG_LANGUAGES', DIR_WS_CATALOG . 'includes/languages/'); define('DIR_FS_CATALOG_LANGUAGES', DIR_FS_CATALOG . 'includes/languages/'); define('DIR_FS_CATALOG_IMAGES', DIR_FS_CATALOG . 'images/'); define('DIR_FS_CATALOG_MODULES', DIR_FS_CATALOG . 'includes/modules/'); define('DIR_FS_BACKUP', DIR_FS_ADMIN . 'backups/'); define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/'); define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/'); define('DB_SERVER', 'localhost'); define('DB_SERVER_USERNAME', 'xxxxx'); define('DB_SERVER_PASSWORD', 'xxxxxx'); define('DB_DATABASE', 'xxxxxx'); define('USE_PCONNECT', 'false'); define('STORE_SESSIONS', 'mysql'); define('CFG_TIME_ZONE', 'Australia/Melbourne'); ?>
  17. thanks @MrPhil, I have reinstalled using your link.
  18. Hi @Jack_mcs Thanks for that, that did the job!!!! Hi @MrPhil I downloaded it from GitHub using this link in the forum https://forums.oscommerce.com/topic/412924-frozen/ Is there something to suggest I don't have the correct version?
  19. Hi, I cant seem to find a working solution for this anywhere. The problem I am having occurs only when the customer is NOT logged into paypal before selecting paypal express as their payment option. Here is the general flow of the order process; 1. - customer finishes their order and selects EXPRESS SHIPPING 2. - Customer selects paypal extress as payment option 3. - customer is taken to paypal where they log in and see their order including EXPRESS SHIPPING (I think they can change this to standard shipping at this point, but we are assuming they do not). Customer confirms order on Paypal site. 4. Customer is sent back to checkout_confirmation.php - where shipping has reverted to STANDARD SHIPPING (with no option to change back to express shipping). Customer confirms order is forced to pay for standard shipping even if they want express. both standard and express Shipping modules are based on the zone based shipping modules and work for other payment modules fine Any help would be greatly appreciated...
  20. THanks for that @clustersolutions I have not been able to get to the website in the last few days, but I think this will help a heap.
  21. Portman

    Separate Pricing Per Customer for Edge

    Hi @raiwa I have installed your app on a clean install of edge so I can play around with it and make sure it does what I want with it... I have come across a problem that makes me think something has gone wrong with my installation... but maybe I am just reading it wrong... I am trying to add multiple groups the instructions say; but I cannot find any reference to wholesale group numbers in there... here is a screenshot Ill be so grateful if this app can work for my requirements, any help would be appreciated.
  22. Portman

    HTML emails?

    Hi @tgely does a github or other link still exist where I can download this addon? all the links I have tried have not worked.
  23. Ok... here goes, SPPC allows you to create a number of customer groups to allow different prices for different customer groups. The default group is 0, then you have groups 1,2,3 etc which are applied on the admin side of the site. as part of the mod an extra field is added to the ‘customers’ table called ‘customers_group_id’ when a new customer creates an account that is set to 0. What I was hoping to do was to modify your app so that it does not show prices if the customer is not logged in, but it also does not show prices if the customers_group_id is 0 (essentially meaning that they don’t see prices and cannot purchase from my site until I have approved them by setting customer_group_id to something other than 0)
  24. Hey @clustersolutions this addon is great and is really what I need for my B2B website... I am wondering if you could give me a few pointers on how to modify it a bit to work for my store - which is strictly Wholesale only . I don't want non authorised members being able to see prices or generate orders . I am using SPPC on my site and would really like to modify 'display price for login members only' so that it checks if the customer is part of the default SPPC group (customers_group_id = 0) so that if they are part of group 0 they are treated as not being logged in. It is only once their status to another SPPC group has been updated in admin that they can see prices. The 'customers_group_id' field is in the customers table so it should not be to hard to do, but I just can't get my head around it - have you got any thoughts on where I should start?
  25. Hi, I am playing around with the responsive 2.3.4 . The only real modification I have done to the original is to try to add SPPC onto it. As I was testing the add on I noticed that when I use the category links on the left the items do not load onto the page. There are essentially enough place holders for the items in the category but they are all blank and when i click on one it says "D'oh. Product not found" - the items are there and loading properly for example i can see them and access them in the new products section. I've looked through index.php and includes/application_top.php but don't think the problem lies there... is there somewhere else I should be looking? any help would be appreciated !
×