Collines

Members
  • Content count

    161
  • Joined

  • Last visited

  • Days Won

    2

Collines last won the day on August 6 2011

Collines had the most liked content!

Community Reputation

9 Neutral

1 Follower

About Collines

Profile Information

  • Real Name
    Mark
  • Gender
    Male
  1. Hi I am using the SPPC contribution and also offer free shipping to my customers for order over $50. The free shipping is calculated by using the option in the order totals module for shipping. I would like to ensure that my wholesale customers do not receive the free shipping. This is the code from ot_shipping that calculates the free shipping. I assume that I have to insert some code around this to ensure tat this only applies to customers that belong to the regular group but do not know how to do this. if ( ($pass == true) && ( ($order->info['total'] - $order->info['shipping_cost']) >= MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING_OVER) ) { $order->info['shipping_method'] = FREE_SHIPPING_TITLE; $order->info['total'] -= $order->info['shipping_cost']; $order->info['shipping_cost'] = 0; } Any help would be greatly appreciated Thank you.
  2. Hi I am using the order editor with SPPC and have managed to get everything working perfectly except for one small problem. Is anyone able to figure this out PLEASE? When I add a products that has attributes to the order, using the order editor, the product is only added using the standard attribute price. I nedd it to add the product using the attribute price for the selected customer group. This seems to be the applicable code: $products_options_name_query = tep_db_query("select distinct popt.products_options_id, popt.products_options_name from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id='" . (int)$add_product_products_id . "' and patrib.options_id = popt.products_options_id and popt.language_id = '" . $languages_id . "'"); while ($products_options_name = tep_db_fetch_array($products_options_name_query)) { $selected = 0; $products_options_array = array(); if ($i > 1) echo ' <td class="dataTableContent"> </td>' . "\n"; $products_options_query = tep_db_query("select pov.products_options_values_id, pov.products_options_values_name, pa.options_values_price, pa.code_suffix, pa.price_prefix from " . TABLE_PRODUCTS_ATTRIBUTES . " pa, " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov where pa.products_id = '" . (int)$add_product_products_id . "' and pa.options_id = '" . $products_options_name['products_options_id'] . "' and pa.options_values_id = pov.products_options_values_id and pov.language_id = '" . $languages_id . "'"); while ($products_options = tep_db_fetch_array($products_options_query)) { $products_options_array[] = array('id' => $products_options['products_options_values_id'], 'text' => $products_options_name['products_options_name'] . ' - ' . $products_options['products_options_values_name']); if ($products_options['options_values_price'] != '0') { $products_options_array[sizeof($products_options_array)-1]['text'] .= ' (' . $products_options['price_prefix'] . $currencies->format($products_options['options_values_price'], true, $order->info['currency'], $order->info['currency_value']) .')'; } } if(isset($_POST['add_product_options'])) { $selected_attribute = $_POST['add_product_options'][$products_options_name['products_options_id']]; } else { $selected_attribute = false; } I have seen that using the customer side of the store, product_info.php uses this code to ensure that the correct attribute price is used for the customer group: $products_options_name_query = tep_db_query("select distinct popt.products_options_id, popt.products_options_name from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id='" . (int)$HTTP_GET_VARS['products_id'] . "' and patrib.options_id = popt.products_options_id and popt.language_id = '" . (int)$languages_id . "' and find_in_set('".$customer_group_id."', attributes_hide_from_groups) = 0 order by popt.products_options_name"); while ($products_options_name = tep_db_fetch_array($products_options_name_query)) { $products_options_array = array(); $products_options_query = tep_db_query("select pov.products_options_values_id, pov.products_options_values_name, pa.options_values_price, pa.price_prefix, pa.products_attributes_id from " . TABLE_PRODUCTS_ATTRIBUTES . " pa, " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov where pa.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pa.options_id = '" . (int)$products_options_name['products_options_id'] . "' and pa.options_values_id = pov.products_options_values_id and pov.language_id = '" . (int)$languages_id . "' and find_in_set('".$customer_group_id."', attributes_hide_from_groups) = 0"); $list_of_prdcts_attributes_id = ''; $products_options = array(); // makes sure this array is empty again while ($_products_options = tep_db_fetch_array($products_options_query)) { $products_options[] = $_products_options; $list_of_prdcts_attributes_id .= $_products_options['products_attributes_id'].","; } if (tep_not_null($list_of_prdcts_attributes_id) && $customer_group_id != '0') { $select_list_of_prdcts_attributes_ids = "(" . substr($list_of_prdcts_attributes_id, 0 , -1) . ")"; $pag_query = tep_db_query("select products_attributes_id, options_values_price, price_prefix from " . TABLE_PRODUCTS_ATTRIBUTES_GROUPS . " where products_attributes_id IN " . $select_list_of_prdcts_attributes_ids . " AND customers_group_id = '" . $customer_group_id . "'"); while ($pag_array = tep_db_fetch_array($pag_query)) { $cg_attr_prices[] = $pag_array; } // substitute options_values_price and prefix for those for the customer group (if available) if ($customer_group_id != '0' && tep_not_null($cg_attr_prices)) { for ($n = 0 ; $n < count($products_options); $n++) { for ($i = 0; $i < count($cg_attr_prices) ; $i++) { if ($cg_attr_prices[$i]['products_attributes_id'] == $products_options[$n]['products_attributes_id']) { $products_options[$n]['price_prefix'] = $cg_attr_prices[$i]['price_prefix']; $products_options[$n]['options_values_price'] = $cg_attr_prices[$i]['options_values_price']; } } // end for ($i = 0; $i < count($cg_att_prices) ; $i++) } } // end if ($customer_group_id != '0' && (tep_not_null($cg_attr_prices)) } // end if (tep_not_null($list_of_prdcts_attributes_id) && $customer_group_id != '0') for ($n = 0 ; $n < count($products_options); $n++) { $products_options_array[] = array('id' => $products_options[$n]['products_options_values_id'], 'text' => $products_options[$n]['products_options_values_name']); if ($products_options[$n]['options_values_price'] != '0') { $products_options_array[sizeof($products_options_array)-1]['text'] .= ' (' . $products_options[$n]['price_prefix'] . $currencies->display_price($products_options[$n]['options_values_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) .') '; } } // EOF SPPC attributes mod if (isset($cart->contents[$HTTP_GET_VARS['products_id']]['attributes'][$products_options_name['products_options_id']])) { $selected_attribute = $cart->contents[$HTTP_GET_VARS['products_id']]['attributes'][$products_options_name['products_options_id']]; } else { $selected_attribute = false; } Is there any genius here, who know how to integrate the product_info.php code into the code in edit_orders_add_product.php so that the order editor can also use the customer group prices for attributes instead of just the standard attribute price? Thank you so much for taking a look at this.
  3. Yes ot_redemptions is from the points and rewards system.
  4. Has anyone been able to make custom order totals like ot_redemptions, ot_gv and ot_coupon work with edit_orders? The above solution seems to be in the right direction but for me it is adding the amount of the custom order total instead of deducting it. As a temporary fix, does anyone know how to make ot_custom be deducted instead of added?
  5. It is not so easy to install contributions on top of each other as each contribution does change the files. The only way to do it is to look for the line that seems to be the one that needs changing and change just the bit that is different. Often, you will get something like Change $product_query = tep_db_query("select pd.products_name, pd.products_url............. to $product_query = tep_db_query("select pd.products_name, pd.products_head_title_tag, pd.products_head_desc_tag, pd.products_head_keywords_tag, pd.products_url....... But your previous contributions would have already changed the first code to something like, $product_query = tep_db_query("select pd.products_name, pd.products_description, pd.products_url............. You will not find the line requested because of the (example) 'pd.products_description' in your file. You have to find the line that looks like it is right and slot in the bit that needs changing, WITHOUT undoing the first contributions. This takes practice and you need to a) Backup first B) Test test test One file in particular that many of these contributions makes changes to is admin/categories.php. YOu have to just test and be careful.
  6. There is no contribution to do this, but there are various IP to country programs available on the internet. Some are free and some cost a small fee. The easiest ones to use are those that check the IP on their servers. Some require you to install a database of IP addresses (which is huge) and this needs updating regularly, so opt for one that checks the IP address on the providers server. search for IP to country or for IP to location.
  7. Check that the file dutch.php is in the directory admin/includes/languages There should be a folder called dutch and a file called dutch.php in the languages folder. They also both have to be spelled exactly the same way. No capitalization.
  8. Have you installed the language file for the module in languages/english/shipping/ This type of error is usually caused by a missing language file.
  9. Have you activated the module in the admin panel by going to admin....modules...order total modules?
  10. Most osCommerce template makers make templates that are very similar to this one and they are made for osCommerce and come with installation instructions. Simply search online for osCommerce template providers. Trying to install a template recommended from someone who has never used osCommerce would be crazy.
  11. Hmmmm, sorry to have wasted your time. I have been at this for two days now and managed to get it right just after posting here. There must be something about posting a stupid request for help that makes things suddenly work. Just in case anyone else is as dumb as me, to get the category tags to fill (on a bts shop), in page control, select index.php then tick the option 'category' and like magic, the tags will be filled with the correct information drawn from the category pages. The trick was in selecting index.php on the page control.
  12. Hi I am using this great contribution with a bts shop. I have tried numerous times to get the meta-tags to work with the categories pages (index_nested.php and index_products.php) but it will only display the default message for the meta tags i.e. 'Replace me in Page Control under index.php'. The tags work perfectly with the product info pages. Has anyone managed to get this to work correctly with the category pages on a bts shop?
  13. The contribution for header tags that requires hardly any effort to install is..... KissMT Dynamic SEO Meta & Canonical Header Tags
  14. Have you tried going to github and downloading the latest version of the store from there? The Paypal Standard version included there worked for me. http://github.com/osCommerce/oscommerce2
  15. Just make changes to the style sheet. Make a backup of it first, if you are worried about making mistakes, then you can always just replace from the backup if you make a mess.