Jump to content

multimixer

♥Ambassador
  • Content count

    4,733
  • Joined

  • Last visited

  • Days Won

    72

Everything posted by multimixer

  1. multimixer

    [Contribution] STS v4

    Honestly I have no idea what you are doing
  2. multimixer

    [Contribution] STS v4

    Did you check if your STS installation works fine BEFORE uploading any new templates and BEFORE deleting the templates of the addon? Could you see your page change? Could you select other templates from the dropdown in admin? However, did you SELECT the new template folder from your admin? Do you see any drop down? I told you to be sure first that the installation work before starting to delete and upload other stuff. What happens is you place back the template that you deleted? (folder includes/sts_templates/single/)
  3. multimixer

    [Contribution] STS v4

    I assume that you deleted the templates that come with the addon, and hat you want to use one that is in folder catalog/includes/modules/sts_templates/appliances_osc/ You need to go to your admin (admin->modules->sts) click on "default" and say what template folder you want to use and whats the default template name. The folder /appliances_osc/ should appear in the drop down, the default template name I don't know, depends on your template, but maybe there is just one file
  4. multimixer

    Optional Related Products, Version 4.0

    Tke a virgin product_info.php file and make the addon modifications to it. Then upload it to your server replacing the current product_info.php you have. Does the module appear? (Not to mention to keep a copy of your product_info.php)
  5. multimixer

    [Contribution] STS v4

    If you dont have a folder [catalog}/incudes/sts_templates/ then definitely youdidn't made the installation correctly. Thats the place where all sts template files are uploaded. The includes/modules/sts_inc/folder contains files with sts related code, and thats not the place to upload any templates. Delete all the files you uploaded to there again. You should go on more careful: If instructions say to upload something to the /sts_templates/ folder and you don't have this folder, then you should check why you don't have it and what mistake you did, instead of saying "it doesn't matter" or maybe thinkng the instructions are wrong and using the next best folder that contains "sts" Also, before uploading any new themes, make sure the sts installation as it comes by default is working fine, that you have the templates that are included available in your admin and that you can select and change them. After this all work, go on with installing your desired template.
  6. I have SPPC version of 20 7 2008 by Jan Zonjee installed and it is working just fine. I would instal this and then go through the other uploads to see if there is something useful added In any case you will need a good file comparison program to do the job, thats the best way to go The link ->SPPC If your store is not modified it will be just a file replacing for the biggest part
  7. multimixer

    Optional Related Products, Version 4.0

    Well, to "take a look" will not give something: If the module is not there, then it isn't, if you can not see it, them me neither. It looks to me like you made some installation mistake, so go over this first An other option would be, to try to place the module to some other place of the page to see if it appears, amybe something going on with your floatings (left column floats right etc) PS I don't think that this has something to do in the middle of your page, right?
  8. multimixer

    [Contribution] STS v4

    Hard to say without knowing what template you have In general you need to look into your template files that are in [catalog]/includes/sts_templates/your_template_folder. Since it will be like plain html, you can replace the tag that will be called $logo$ or $company$ or something with any image or whatever you like, like in any html page Suspicious files are header.php.html if your template has this, or the default template, that can be called default.php.html, or in some cases it has the template name ie My_template_789.php.html. You can find this out going to admin->modules->STS, click on default and look whats the default template file
  9. multimixer

    [Contribution] STS v4

    Read this post
  10. multimixer

    Optional Related Products, Version 4.0

    Do you have this in your product_info.php? <?php include(DIR_WS_MODULES . FILENAME_RELATED_PRODUCTS); ?>
  11. multimixer

    [Contribution] Option Types v2

    You are not the first one who report this problem. The installation instructions uploaded by rosemaryann (13 11 2009) are either wrong or corrupted. Take the version of 18 10 2009 by Zappo and use a file comparison tool to merge the files Also go through the pages of this topic from 18 10 2009 on, for reported bugs, fixes and improvements A new version will be coming soon, but till then thats the best you can do
  12. multimixer

    NEW! Complete Order Editing Tool!

    Hi all If you have option types v2 installed and want to have the ability to set options to be calculated per unit or per item, also via the order editor, then here is the solution, posted in the option types v2 forum It works fine with Order editor version by surfalot (18.11.09), I don't know about the other versions And a question in file admin/order_editor/javascript.php and line about 703 we see if ((action != 'qty') && (action != 'price_incl')) { document.getElementById("update_products[" + pid + "][price_incl]").value = doFormat(priceInclValue, 4); } This says that the final price should not be updated when quantity changes. For the needs of my modification I changed that to if (action != 'price_incl') { // The (action != 'qty') condition taken out, so reaktion ok on qty changes document.getElementById("update_products[" + pid + "][price_incl]").value = doFormat(priceInclValue, 10); } Was there any particular reason, not to let the price(incl) change on quantity changes?
  13. multimixer

    [Contribution] Option Types v2

    Somehow the upload got corrupted Again just for 7) File admin/order_editor/order.php Find $attributes_query = tep_db_query("select products_options, products_options_values, options_values_price, price_prefix, orders_products_attributes_id from " . TABLE_ORDERS_PRODUCTS_ATTRIBUTES . " where orders_id = '" . (int)$order_id . "' and orders_products_id = '" . (int)$orders_products['orders_products_id'] . "'"); if (tep_db_num_rows($attributes_query)) { while ($attributes = tep_db_fetch_array($attributes_query)) { $this->products[$index]['attributes'][$subindex] = array('option' => $attributes['products_options'], 'value' => $attributes['products_options_values'], 'prefix' => $attributes['price_prefix'], 'price' => $attributes['options_values_price'], 'orders_products_attributes_id' => $attributes['orders_products_attributes_id']); Replace with // set price per unit / per item multimixer 20 8 10 added , options_per_name, options_price_calc $attributes_query = tep_db_query("select products_options, products_options_values, options_values_price, price_prefix, orders_products_attributes_id, options_per_name, options_price_calc from " . TABLE_ORDERS_PRODUCTS_ATTRIBUTES . " where orders_id = '" . (int)$order_id . "' and orders_products_id = '" . (int)$orders_products['orders_products_id'] . "'"); if (tep_db_num_rows($attributes_query)) { while ($attributes = tep_db_fetch_array($attributes_query)) { $this->products[$index]['attributes'][$subindex] = array('option' => $attributes['products_options'], 'value' => $attributes['products_options_values'], 'prefix' => $attributes['price_prefix'], 'price' => $attributes['options_values_price'], 'pername' => $attributes['options_per_name'], 'calcway' => $attributes['options_price_calc'], // set price per unit / per item multimixer 20 8 10 (2 lines above added) 'orders_products_attributes_id' => $attributes['orders_products_attributes_id']);
  14. multimixer

    [Contribution] Option Types v2

    Hello people A time ago I posted a solution to set products options to be calculated per item or per unit. Example: 1) Per unit (product price:5 + option price:1 = 6 x quantity: 500 = total: 3000) 2) Per item (product price:5 x quantity: 500 = 2500 + option price:1 = total:2501) The post is here It's all working fine, the only issue was, that the whole thing was not working with the "Order Editor" addon. I don't know if anyone is interested or even using this solution, anyway, here is the way to have this working with order editor too. Not to mention that you need to have order editor installed, I have the version by surfalot (of 18 11 09) Modification to enable "Order Editor" to calculate products options per item or per unit. Involved Files are checkout_process.php admin/edit_orders_add_product.php admin/edit_orders_ajax.php admin/edit_orders.php admin/order_editor/cart.php admin/order_editor/javascript.php admin/order_editor/order.php ------------------------------ Add one more field to the database If you did already my previous mod, then import this sql file to your DB via phpMyAdmin # osCommerce, Open Source E-Commerce Solutions # http://www.oscommerce.com # # Database Changes for Option Types v2 # # created by multimixer for http://multimixer.gr # # Released under the GNU General Public License # Add choice for options price to be calculated per item (once) or per unit # Upgrade to version 1 For order editor # Add calculation way to the orders_products_attributes table ALTER TABLE orders_products_attributes ADD options_price_calc INT( 1 ) DEFAULT '0' NOT NULL; If you did not, then you can use this, it contains all necessary DB changes # osCommerce, Open Source E-Commerce Solutions # http://www.oscommerce.com # # Database Changes for Option Types v2 # # created by multimixer for http://multimixer.gr # # Released under the GNU General Public License # Add choice for options price to be calculated per item (once) or per unit # Add calculation way and name to the products_options table ALTER TABLE products_options ADD products_options_price_calc INT( 1 ) DEFAULT '0' NOT NULL , ADD products_options_per_name VARCHAR( 32 ) DEFAULT 'per unit' NULL; # Add calculation way to the products_attributes table ALTER TABLE products_attributes ADD options_price_calc INT( 1 ) DEFAULT '0' NOT NULL; # Add calculation way and name to the orders_products_attributes table ALTER TABLE orders_products_attributes ADD options_price_calc INT( 1 ) DEFAULT '0' NOT NULL, ADD options_per_name VARCHAR( 32 ) DEFAULT 'per unit' NULL; From here on just "upgrade"instructions to my previous post, you need to do the changes there first. if you did, go on ------------------------ 1) File Checkout_process.php Find // set price per unit / per item multimixer 15 4 10 added , popt.products_options_per_name $attributes_query = "select popt.products_options_name, poval.products_options_values_name, pa.options_values_price, pa.price_prefix, pad.products_attributes_maxdays, pad.products_attributes_maxcount , pad.products_attributes_filename, popt.products_options_per_name Replace with // set price per unit / per item multimixer 15 4 10 added , popt.products_options_per_name, popt.products_options_price_calc (20 8 10) $attributes_query = "select popt.products_options_name, poval.products_options_values_name, pa.options_values_price, pa.price_prefix, pad.products_attributes_maxdays, pad.products_attributes_maxcount , pad.products_attributes_filename, popt.products_options_per_name, popt.products_options_price_calc Find // set price per unit / per item multimixer 15 4 10 added , popt.products_options_per_name $attributes = tep_db_query("select popt.products_options_name, poval.products_options_values_name, pa.options_values_price, pa.price_prefix, popt.products_options_per_name from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_OPTIONS_VALUES . " poval, " . TABLE_PRODUCTS_ATTRIBUTES . " pa where pa.products_id = '" . $order->products[$i]['id'] . "' and pa.options_id = '" . $order->products[$i]['attributes'][$j]['option_id'] . "' and pa.options_id = popt.products_options_id and pa.options_values_id = '" . $order->products[$i]['attributes'][$j]['value_id'] . "' and pa.options_values_id = poval.products_options_values_id and popt.language_id = '" . $languages_id . "' and poval.language_id = '" . $languages_id . "'"); Replace with // set price per unit / per item multimixer 15 4 10 added , popt.products_options_per_name, popt.products_options_price_calc (20 8 10) $attributes = tep_db_query("select popt.products_options_name, poval.products_options_values_name, pa.options_values_price, pa.price_prefix, popt.products_options_per_name, popt.products_options_price_calc from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_OPTIONS_VALUES . " poval, " . TABLE_PRODUCTS_ATTRIBUTES . " pa where pa.products_id = '" . $order->products[$i]['id'] . "' and pa.options_id = '" . $order->products[$i]['attributes'][$j]['option_id'] . "' and pa.options_id = popt.products_options_id and pa.options_values_id = '" . $order->products[$i]['attributes'][$j]['value_id'] . "' and pa.options_values_id = poval.products_options_values_id and popt.language_id = '" . $languages_id . "' and poval.language_id = '" . $languages_id . "'"); Find 'options_per_name' => $attributes_values['products_options_per_name']); // set price per unit / per item multimixer 15 4 10 ( 2 line above added / second on 20 8 10 For Order Editor) Replace with 'options_per_name' => $attributes_values['products_options_per_name'], 'options_price_calc' => $attributes_values['products_options_price_calc']); // set price per unit / per item multimixer 15 4 10 ( 2 line above added / second on 20 8 10 For Order Editor) ---------------------- 2) File admin/edit_orders_add_product.php Find if ($opt_price_prefix == '-') {$AddedOptionsPrice -= $opt_options_values_price;} else //default to positive {$AddedOptionsPrice += $opt_options_values_price;} Replace with // BOF set price per unit / per item multimixer 20 8 10 if ($opt_options_price_calc == '1') { // case per item if ($opt_price_prefix == '-') {$AddedOptionsPrice -= $opt_options_values_price / ($_POST['add_product_quantity']) ;} else //default to positive {$AddedOptionsPrice += $opt_options_values_price / ($_POST['add_product_quantity']) ;} } else { // default per unit if ($opt_price_prefix == '-') {$AddedOptionsPrice -= $opt_options_values_price;} else //default to positive {$AddedOptionsPrice += $opt_options_values_price;} } // EOF set price per unit / per item multimixer 20 8 10 Find $option_values_names[$option_value_id] = $opt_products_options_values_name; Add After $options_per_name[$option_id] = $opt_products_options_per_name; // set price per unit / per item multimixer 20 8 10 $options_price_calc[$option_id] = $opt_products_options_price_calc; // set price per unit / per item multimixer 20 8 10 Find 'price_prefix' => tep_db_prepare_input($option_value_details[$option_id][$option_value_id]['price_prefix'])); Replace with 'price_prefix' => tep_db_prepare_input($option_value_details[$option_id][$option_value_id]['price_prefix']), 'options_per_name' => tep_db_prepare_input($options_per_name[$option_id]), 'options_price_calc' => tep_db_prepare_input($options_price_calc[$option_id]), // set price per unit / per item multimixer 20 8 10 2 lines above added ); Find $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 . "'"); Replace with // set price per unit / per item multimixer 20 8 10 added , popt.products_options_per_name $products_options_name_query = tep_db_query("select distinct popt.products_options_id, popt.products_options_name, popt.products_options_per_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 . "'"); Find $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']) .')'; Replace with $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']) . ' ' . $products_options_name['products_options_per_name'] .')'; // set price per unit / per item multimixer 20 8 10 $products_options_name['products_options_per_name'] ---------------------- 3) File admin/edit_orders_ajax.php Find tep_db_query("UPDATE " . TABLE_ORDERS_PRODUCTS . " SET " . $_GET['field'] . " = '" . oe_iconv($_GET['new_value']) . "' WHERE orders_products_id = '" . $_GET['pid'] . "' AND orders_id = '" . $_GET['oID'] . "'"); Add after // BOF set price per unit / per item multimixer 20 8 10 if (isset($_GET['final_price'])) { tep_db_query("UPDATE " . TABLE_ORDERS_PRODUCTS . " SET final_price = '" . tep_db_input(tep_db_prepare_input($_GET['final_price'])) . "' WHERE orders_products_id = '" . $_GET['pid'] . "' AND orders_id = '" . $_GET['oID'] . "'"); } // EOF set price per unit / per item multimixer 20 8 10 ------------------------ 4) File admin/edit_orders.php Find // Update Any Attributes if(isset($products_details['attributes'])) { foreach($products_details['attributes'] as $orders_products_attributes_id => $attributes_details) { $Query = "UPDATE " . TABLE_ORDERS_PRODUCTS_ATTRIBUTES . " set products_options = '" . $attributes_details["option"] . "', products_options_values = '" . $attributes_details["value"] . "', options_values_price ='" . $attributes_details["price"] . "', price_prefix ='" . $attributes_details["prefix"] . "' where orders_products_attributes_id = '$orders_products_attributes_id';"; tep_db_query($Query); }//end of foreach($products_details["attributes"] }// end of if(isset($products_details[attributes])) Replace with // Update Any Attributes // set price per unit / per item multimixer 20 8 10 added options_per_name ='" . $attributes_details['pername'] . "', options_price_calc ='" . $attributes_details['calcway'] . "', if(isset($products_details['attributes'])) { foreach($products_details['attributes'] as $orders_products_attributes_id => $attributes_details) { $Query = "UPDATE " . TABLE_ORDERS_PRODUCTS_ATTRIBUTES . " set products_options = '" . $attributes_details["option"] . "', products_options_values = '" . $attributes_details["value"] . "', options_values_price ='" . $attributes_details["price"] . "', options_per_name ='" . $attributes_details['pername'] . "', options_price_calc ='" . $attributes_details['calcway'] . "', price_prefix ='" . $attributes_details["prefix"] . "' where orders_products_attributes_id = '$orders_products_attributes_id';"; tep_db_query($Query); }//end of foreach($products_details["attributes"] }// end of if(isset($products_details[attributes])) Find // currecies drop-down array $currency_query = tep_db_query("select distinct title, code from " . TABLE_CURRENCIES . " order by code ASC"); $currency_array = array(); while($currency = tep_db_fetch_array($currency_query)) { $currency_array[] = array('id' => $currency['code'], 'text' => $currency['code'] . ' - ' . $currency['title']); } Add after //BOF multimixer set price per unit / per item 20 8 10 $products_options_calc_way[OPTIONS_PER_UNIT] = OPTIONS_PER_UNIT_NAME; $products_options_calc_way[OPTIONS_PER_ITEM] = OPTIONS_PER_ITEM_NAME; // Translate calculation way values to english string function translate_type_to_name1($calc_way) { global $products_options_calc_way; return isset($products_options_calc_way[$calc_way]) ? $products_options_calc_way[$calc_way] : 'Error ' . $calc_way; } //EOF multimixer set price per unit / per item 20 8 10 Find "<input name='update_products[$orders_products_id][attributes][$orders_products_attributes_id][price]' size='7' value='" . $order->products[$i]['attributes'][$j]['price'] . "' onKeyUp=\"updatePrices('att_price', '" . $orders_products_id . "')\" onChange=\"updateAttributesField('hard', 'options_values_price', '" . $orders_products_attributes_id . "', '" . $orders_products_id . "', encodeURIComponent(this.value))\" id='p". $orders_products_id . "a" . $orders_products_attributes_id . "'>"; Replace with "<input name='update_products[$orders_products_id][attributes][$orders_products_attributes_id][price]' size='7' value='" . $order->products[$i]['attributes'][$j]['price'] . "' onKeyUp=\"updatePrices('att_price', '" . $orders_products_id . "')\" onChange=\"updateAttributesField('hard', 'options_values_price', '" . $orders_products_attributes_id . "', '" . $orders_products_id . "', encodeURIComponent(this.value))\" id='p". $orders_products_id . "a" . $orders_products_attributes_id . "'>" . //BOF set price per unit / per item multimixer 20 8 10 "<input name='update_products[$orders_products_id][attributes][$orders_products_attributes_id][pername]' size='10' value='" . oe_html_quotes($order->products[$i]['attributes'][$j]['pername']) . "' onChange=\"updateAttributesField('simple', 'options_per_name', '" . $orders_products_attributes_id . "', '" . $orders_products_id . "', encodeURIComponent(this.value))\">" . "<input type=hidden name='update_products[$orders_products_id][attributes][$orders_products_attributes_id][calcway]' size='1' id='p" . $orders_products_id . "_" . $orders_products_attributes_id . "_calcway' value='" . $order->products[$i]['attributes'][$j]['calcway'] . "' onKeyUp=\"updatePrices('att_price', '" . $orders_products_id . "')\" onChange=\"updateAttributesField('hard', 'options_price_calc', '" . $orders_products_attributes_id . "', '" . $orders_products_id . "', encodeURIComponent(this.value))\">"; echo translate_type_to_name1($order->products[$i]['attributes'][$j]['calcway']); //EOF set price per unit / per item multimixer 20 8 10 Find "<input name='update_products[$orders_products_id][attributes][$orders_products_attributes_id][price]' size='7' value='" . $order->products[$i]['attributes'][$j]['price'] . "' onKeyUp=\"updatePrices('att_price', '" . $orders_products_id . "')\" id='p". $orders_products_id . "a" . $orders_products_attributes_id . "'>"; Replace with "<input name='update_products[$orders_products_id][attributes][$orders_products_attributes_id][price]' size='7' value='" . $order->products[$i]['attributes'][$j]['price'] . "' onKeyUp=\"updatePrices('att_price', '" . $orders_products_id . "')\" id='p". $orders_products_id . "a" . $orders_products_attributes_id . "'>" . //BOF set price per unit / per item multimixer 20 8 10 "<input name='update_products[$orders_products_id][attributes][$orders_products_attributes_id][pername]' size='10' value='" . oe_html_quotes($order->products[$i]['attributes'][$j]['pername']) . "'>". "<input type=hidden name='update_products[$orders_products_id][attributes][$orders_products_attributes_id][calcway]' size='1' id='p" . $orders_products_id . "_" . $orders_products_attributes_id . "_calcway' value='" . $order->products[$i]['attributes'][$j]['calcway'] . "' onKeyUp=\"updatePrices('att_price', '" . $orders_products_id . "')\">" ; echo translate_type_to_name1($order->products[$i]['attributes'][$j]['calcway']); //EOF set price per unit / per item multimixer 20 8 10 ----------------------------- 5) File admin/order_editor/cart.php Find $attribute_price_query = tep_db_query("select options_values_price, price_prefix from " . TABLE_PRODUCTS_ATTRIBUTES . " where products_id = '" . $prid . "' and options_id = '" . $option . "' and options_values_id = '" . $value . "'"); $attribute_price = tep_db_fetch_array($attribute_price_query); if ($attribute_price['price_prefix'] == '+') { $this->total += $qty * tep_add_tax($attribute_price['options_values_price'], $products_tax); } else { $this->total -= $qty * tep_add_tax($attribute_price['options_values_price'], $products_tax); } Replace with // BOF set price per unit / per item multimixer 20 8 10 added options_price_calc $attribute_price_query = tep_db_query("select options_values_price, price_prefix, options_price_calc from " . TABLE_PRODUCTS_ATTRIBUTES . " where products_id = '" . $prid . "' and options_id = '" . $option . "' and options_values_id = '" . $value . "'"); // EOF set price per unit / per item multimixer 20 8 10 $attribute_price = tep_db_fetch_array($attribute_price_query); // BOF set price per unit / per item multimixer 20 8 10 if ($attribute_price['options_price_calc'] == '0') { // EOF set price per unit / per item multimixer 20 8 10 if ($attribute_price['price_prefix'] == '+') { $this->total += $qty * tep_add_tax($attribute_price['options_values_price'], $products_tax); } else { $this->total -= $qty * tep_add_tax($attribute_price['options_values_price'], $products_tax); } // BOF set price per unit / per item multimixer 20 8 10 } else { if ($attribute_price['price_prefix'] == '+') { $this->total += tep_add_tax($attribute_price['options_values_price'], $products_tax); } else { $this->total -= tep_add_tax($attribute_price['options_values_price'], $products_tax); } } // EOF set price per unit / per item multimixer 20 8 10 Find $attribute_price_query = tep_db_query("select options_values_price, price_prefix from " . TABLE_PRODUCTS_ATTRIBUTES . " where products_id = '" . $products_id . "' and options_id = '" . $option . "' and options_values_id = '" . $value . "'"); $attribute_price = tep_db_fetch_array($attribute_price_query); if ($attribute_price['price_prefix'] == '+') { $attributes_price += $attribute_price['options_values_price']; } else { $attributes_price -= $attribute_price['options_values_price']; } Replace with // BOF set price per unit / per item multimixer 20 8 10 added options_price_calc $attribute_price_query = tep_db_query("select options_values_price, price_prefix, options_price_calc from " . TABLE_PRODUCTS_ATTRIBUTES . " where products_id = '" . $products_id . "' and options_id = '" . $option . "' and options_values_id = '" . $value . "'"); // EOF set price per unit / per item multimixer 20 8 10 $attribute_price = tep_db_fetch_array($attribute_price_query); // BOF set price per unit / per item multimixer 20 8 10 if ($attribute_price['options_price_calc'] == '0') { // EOF set price per unit / per item multimixer 20 8 10 if ($attribute_price['price_prefix'] == '+') { $attributes_price += $attribute_price['options_values_price']; } else { $attributes_price -= $attribute_price['options_values_price']; } // BOF set price per unit / per item multimixer 20 8 10 } else { if ($attribute_price['price_prefix'] == '+') { $attributes_price += $attribute_price['options_values_price'] / $this->contents[$products_id]['qty']; } else { $attributes_price -= $attribute_price['options_values_price'] / $this->contents[$products_id]['qty']; } } // EOF set price per unit / per item multimixer 20 8 10 ----------------------------- 6) File admin/order_editor/javascript.php Find var url = "<?php echo FILENAME_ORDERS_EDIT_AJAX; ?>?action=update_product_field&oID=<?php echo $_GET['oID']; ?>&pid=" + pid + "&field=" + field + "&new_value=" + value; Replace with // BOF set price per unit / per item multimixer 20 8 10 var final_price = document.getElementById("update_products[" + pid + "][final_price]").value; // set price per unit / per item multimixer 20 8 10 var url = "<?php echo FILENAME_ORDERS_EDIT_AJAX; ?>?action=update_product_field&oID=<?php echo $_GET['oID']; ?>&pid=" + pid + "&field=" + field + "&new_value=" + value + "&final_price=" + final_price; // EOF set price per unit / per item multimixer 20 8 10 Find if ((action != 'qty') && (action != 'price_incl')) { document.getElementById("update_products[" + pid + "][price_incl]").value = doFormat(priceInclValue, 4); } Replace with //BOF set price per unit / per item multimixer 20 8 10 if ((action != 'qty') && (action != 'price_incl')) { // BOF original /* if ((action != 'qty') && (action != 'price_incl')) { document.getElementById("update_products[" + pid + "][price_incl]").value = doFormat(priceInclValue, 4); } */ //EOF original if (action != 'price_incl') { // The (action != 'qty') condition taken out, so reaktion ok on qty changes // price incl document.getElementById("update_products[" + pid + "][price_incl]").value = doFormat(priceInclValue, 10); } //EOF set price per unit / per item multimixer 20 8 10 Find function getAttributesPrices(pid){ //get any attributes prices that may exist var sum =0; var el=document.getElementsByTagName('input');//all the input elements for(var i=0;i<el.length;i++){ if(el[i].id.indexOf(pid)>-1){ var aid=el[i].id.replace(pid,'').replace('p', '').replace('a', '');//extract the attribute id var p=el[i].id.replace(pid,'').replace(/\d/g,''); if((p=='pa') && (document.getElementById('p' + pid + '_' + aid + '_prefix')) && (document.getElementById('p' + pid + '_' + aid + '_prefix').value) == '-') { sum-=Number(el[i].value); } if((p=='pa') && (document.getElementById('p' + pid + '_' + aid + '_prefix')) && (document.getElementById('p' + pid + '_' + aid + '_prefix').value) == '+') { sum+=Number(el[i].value); } } } return sum } //end function getAttributePrices(pid) Replace with //BOF set price per unit / per item multimixer 20 8 10 if ((action != 'qty') && (action != 'price_incl')) { // BOF original /* function getAttributesPrices(pid){ //get any attributes prices that may exist var sum =0; var el=document.getElementsByTagName('input');//all the input elements var qty = document.getElementById("update_products[" + pid + "][qty]").value; //set price per unit / per item multimixer 20 8 10 for(var i=0;i<el.length;i++){ if(el[i].id.indexOf(pid)>-1){ var aid=el[i].id.replace(pid,'').replace('p', '').replace('a', '');//extract the attribute id var p=el[i].id.replace(pid,'').replace(/\d/g,''); if((p=='pa') && (document.getElementById('p' + pid + '_' + aid + '_prefix')) && (document.getElementById('p' + pid + '_' + aid + '_prefix').value) == '-') { sum-=Number(el[i].value); } // if((p=='pa') if((p=='pa') && (document.getElementById('p' + pid + '_' + aid + '_prefix')) && (document.getElementById('p' + pid + '_' + aid + '_prefix').value) == '+') { sum+=Number(el[i].value); } // if((p=='pa') } // end if(el[i].id.indexOf(pid)>-1){ } // end for(var i=0;i<el.length;i++){ return sum } //end function getAttributePrices(pid) */ //EOF original function getAttributesPrices(pid){ //get any attributes prices that may exist var sum =0; var el=document.getElementsByTagName('input');//all the input elements var qty = document.getElementById("update_products[" + pid + "][qty]").value; //set price per unit / per item multimixer 20 8 10 for(var i=0;i<el.length;i++){ if(el[i].id.indexOf(pid)>-1){ var aid=el[i].id.replace(pid,'').replace('p', '').replace('a', '');//extract the attribute id var p=el[i].id.replace(pid,'').replace(/\d/g,''); if((p=='pa') && (document.getElementById('p' + pid + '_' + aid + '_calcway')) && (document.getElementById('p' + pid + '_' + aid + '_calcway').value) == '0') { // if per unit if((p=='pa') && (document.getElementById('p' + pid + '_' + aid + '_prefix')) && (document.getElementById('p' + pid + '_' + aid + '_prefix').value) == '-') { sum-=Number(el[i].value); } // if((p=='pa') if((p=='pa') && (document.getElementById('p' + pid + '_' + aid + '_prefix')) && (document.getElementById('p' + pid + '_' + aid + '_prefix').value) == '+') { sum+=Number(el[i].value); } // if((p=='pa') } // end if per unit if((p=='pa') && (document.getElementById('p' + pid + '_' + aid + '_calcway')) && (document.getElementById('p' + pid + '_' + aid + '_calcway').value) == '1') { // if per item if((p=='pa') && (document.getElementById('p' + pid + '_' + aid + '_prefix')) && (document.getElementById('p' + pid + '_' + aid + '_prefix').value) == '-') { sum-=Number(el[i].value) / qty; } // if((p=='pa') if((p=='pa') && (document.getElementById('p' + pid + '_' + aid + '_prefix')) && (document.getElementById('p' + pid + '_' + aid + '_prefix').value) == '+') { sum+=Number(el[i].value) / qty; } // if((p=='pa') } // end if per item } // end if(el[i].id.indexOf(pid)>-1){ } // end for(var i=0;i<el.length;i++){ return sum } //end function getAttributePrices(pid) //EOF set price per unit / per item multimixer 20 8 10 -------------------------------------- 7) File admin/order_editor/order.php Find $attributes_query = tep_db_query("select products_options, products_options_values, options_values_price, price_prefix, orders_products_attributes_id from " . TABLE_ORDERS_PRODUCTS_ATTRIBUTES . " where orders_id = '" . (int)$order_id . "' and orders_products_id = '" . (int)$orders_products['orders_products_id'] . "'"); if (tep_db_num_rows($attributes_query)) { while ($attributes = tep_db_fetch_array($attributes_query)) { $this->products[$index]['attributes'][$subindex] = array('option' => $attributes['products_options'], 'value' => $attributes['products_options_values'], 'prefix' => $attributes['price_prefix'], 'price' => $attributes['options_values_price'], 'orders_products_attributes_id' => $attributes['orders_products_attributes_id']); Replace with // set price per unit / per item multimixer 20 8 10 added , options_per_name, options_price_calc $attributes_query = tep_db_query("select products_options, products_options_values, options_values_price, price_prefix, orders_products_attributes_id, options_per_name, options_price_calc from " . TABLE_ORDERS_PRODUCTS_ATTRIBUTES . " where orders_id = '" . (int)$order_id . "' and orders_products_id = '" . (int)$orders_products['orders_products_id'] . "'"); if (tep_db_num_rows($attributes_query)) { while ($attributes = tep_db_fetch_array($attributes_query)) { $this->products[$index]['attributes'][$subindex] = array('option' => $attributes['products_options'], 'value' => $attributes['products_options_val2520'calcway' => $attributes['options_price_calc'], // set price per unit / per item multimixer 20 8 10 (2 lines above added) 'orders_products_attributes_id' => $attributes['orders_products_attributes_id']); ------------------------------ You are done :) ------------------------------ What is new? Going now to your order editor in admin, you will see that adding a new product with attributes will calculate the price correctly, depending on the option setting you have for every option (to be per item or per unit) After the product is added you will see 2 more field beside each attribute price. - Th2520'calcway' => $attributes['options_price_calc'], // set price per unit / per item multimixer 20 8 10 (2 lines above added) 'orders_products_attributes_id' => $attributes['orders_products_attributes_id']); [/code] ------------------------------ You are done :) ------------------------------ What is new? Going now to your order editor in admin, you will see that adding a new product with attributes will calculate the price correctly, depending on the option setting you have for every option (to be per item or per unit) After the product is added you will see 2 more field beside each attribute price. - The input field is to enter a calculation way description, that free text up to 32 characters - On the right there is a text saying "per item" or "per unit", thats just for you to know how the attributes price is getting calculated. This is not meant to be changed (it's set once per option in attribute manager) but if you want you can: In file admin/edit_orders.php search for "<input type=hidden and delete the type=hidden Doing this, you will see one more input field with values 0 (=per unit) or 1 (=per item). Changing between this 2 values will change the attribute calculation way just for this attribute, this product and this order, no influence to other settings -------------------------------- Last note: I'm sorry if this all appear like replacing huge parts of code. In real in most of the cases you are just adding something to the code. Reading the issues the most users have with "details" like a forgotten } etc, I prefered to post complete parts of code to make it easier to copy paste without too much thinking Have a nice day all
  15. multimixer

    [Contribution] STS v4

    It's not very clear what you mean when saying "how to change the product information" STS. STS will not help you to change the information itself. This you do via your admin->catalog by adding prices, images, descriptions to each product. STS will help you in the way to display this information. If you don't want the product info pages to look same like your other pages, you can create a product_info.php.html template in 2 different ways 1) Top level template (to be placed in includes/sts_templates/templatename/): Here you can change the general appereance of the product info page, ie not to have a specials box on the left or whatever. The actula content of the page comes stil via the $content$ tag, that means all content of the regular product_info.php as it is definded/styled in this file 2) Content template (to be placed in includes/sts_templates/templatename/content): Here you can control each element of the product info page, ie where do you want the price, description, image etc to be placed? To have this, you need to turn the "product info" option of STS on in your admin. All tags used in this content templae are defined in the file includes/modules/sts_inc/product_info.php. You can go there and apply any css or whatever to the various tags, so that your page looks unique. You can also have a different styling for each product or all products of one category on both levels You can go through this recent post by Bill for a better insight
  16. multimixer

    sts module not show up in administration

    Please saty at the original topic you started. You will not get more, or better, or faster help if you spread your one and only issue all over the forum
  17. multimixer

    [Contribution] STS v4

    As I told you, you didn't finish the installation of osCommerce correctly. Your issue is not related to STS Here is your other topic. You have already 3 post about this in the forum, please do not start more
  18. multimixer

    Question about Template Installation

    You need to do the installation first as mentioned in your other post
  19. multimixer

    Fatal Error

    There is nothing "for free" except maybe some garbage. The only really free and really working store that I know, is the original osCommerce package from here. If you want any changes to this you have either to invest your time or money. In your case I would go back to the original osCommerce first. Then you can consider to install STS or BTS, or you can search the forum about how to change the design. There are some very good and instructive posts about. Also some templates available in the addon section
  20. multimixer

    [Contribution] Additional Images Module

    1) Do you mean that if you turn lightbox off and use the regular pop up, that the image is larger then? (400x400)? 2) What are your settings for the pop up image in admin, image configuration? Do you have a size defined there? What size?
  21. multimixer

    [Contribution] Additional Images Module

    The module can not make the images larger for you. You need to upload the biggest image (that will be used for pop up or lightbox) and the smaller 2 images will be created automatically according to the settings you have in admin. What size are the images you upload?
  22. multimixer

    [Contribution] STS v4

    You have various ways to go 1. You use the infobox. First thing is you go to file includes/boxes/information.php and remove the linebreaks <br>. Then you will want to make a template for your infobox, this you call infobox_information.php.html and you place it into the "boxes" folder of your sts template folder. The simpliest way is to have just the $content tag thre, no header no nothing. Last, you place the infobox tag to your template wherever you like. 2. You create a tag for each page, as your question. You can look how it is done in file includes/modules/sts_inc/general.php. For example a link to the login page would look like this $sts->template['login'] = '<a href=' . tep_href_link(FILENAME_LOGIN, '', 'SSL') . '>' . HEADER_TITLE_LOGIN . '</a>'; 3. You make the links directly in your template, like this <li><a href="<?php echo tep_href_link(FILENAME_PRIVACY, '', 'NONSSL'); ?>"><?php echo(LINK_PRIVACY); ?></a></li> . Of course you need to put it into your own table or div structure + maybe some additional css. If you have your store just in one language, then you dont need a special text definition like in the example, but you can replace <?php echo(LINK_PRIVACY); ?> with just "privacy" or whatever. There are many posts about this and similar issues already in this topic, here are some useful links
  23. ... is back, hello to all

  24. multimixer

    [Contribution] Option Types v2

    I just checked and I have no problem with this. Is your issue connected somehow with SPPC and OTv2? Do you have a modified store? Did you try on a vanilla install to see how it works?
  25. multimixer

    Automatic Image resizing plus lightbox

    Take a look at "additional images" addon
×