Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

RedShark

Archived
  • Posts

    11
  • Joined

  • Last visited

Profile Information

  • Real Name
    Wouter

RedShark's Achievements

  1. Have u even read the thread?!? I made a perfect notepad addon....
  2. Peter, You can change some settings in includes/coolmenu.php, f.e. I'm not sure if I'm using te latest version of Coolmenu, I was abuot to check it when I bumped into your question :) Hope it helps you :)
  3. I have the same problem as pingpong, does anyone now how to get Coolmenu centered? According to the value 'oCMenu.menuPlacement="center"' in includes/coolmenu.php the coolmenu should be centered. In some way is is centered, but not in the way the rest of the shop in centered. The 'center' result are quite different in IE and Firefox BTW.
  4. Just a small message from me about this great contrib! Since I did not read the whole thread it might be mentioned before, but the thing is that I got soms SQL errors in de the author and review pages in the admin section. In wanted to add an author when I recieved the error. I didn't had any authors in my database yet, so my guess is that the split page function messes up the contrib when the authors table is empty. I tried several options, first one was to comment the line where the split pages function is used. This made my error go away, but I wasn't able to create (insert) a new author. So i just entered one author directly in the authors table in the mysql command line. This solved my problems immediately. I did the same for the reviews and It works fine now! It might help some of you :)
  5. I did not read al the new replies but when you just take my installation post a while ago and download the files of the contribution, you should be able to make a proper installation though.
  6. Take a look at the english and dutch version of the file create_account.php in /includes/languaes/XXXXX/create_account.php You will see that the dutch version is missing some values, so add: define('EMAIL_SUBJECT', 'Welkom bij ' . STORE_NAME); define('EMAIL_GREET_MR', 'Geachte heer %s,' . "\n\n"); define('EMAIL_GREET_MS', 'Geachte mevrouw %s,' . "\n\n"); define('EMAIL_GREET_NONE', 'Geachte heer/mevrouw %s' . "\n\n"); define('EMAIL_WELCOME', 'Vertaal de rest zelf maar even, heb je een persoonlijke groet.We welcome you to <b>' . STORE_NAME . '</b>.' . "\n\n"); define('EMAIL_TEXT', 'You can now take part in the <b>various services</b> we have to offer you. Some of these services include:' . "\n\n" . '<li><b>Permanent Cart</b> - Any products added to your online cart remain there until you remove them, or check them out.' . "\n" . '<li><b>Address Book</b> - We can now deliver your products to another address other than yours! This is perfect to send birthday gifts direct to the birthday-person themselves.' . "\n" . '<li><b>Order History</b> - View your history of purchases that you have made with us.' . "\n" . '<li><b>Products Reviews</b> - Share your opinions on products with our other customers.' . "\n\n"); define('EMAIL_CONTACT', 'For help with any of our online services, please email the store-owner: ' . STORE_OWNER_EMAIL_ADDRESS . '.' . "\n\n"); define('EMAIL_WARNING', '<b>Note:</b> This email address was given to us by one of our customers. If you did not signup to be a member, please send an email to ' . STORE_OWNER_EMAIL_ADDRESS . '.' . "\n"); After this it must work fine. Succes.
  7. Okay, perfect. Since I didn't like copying from the .PDF-document I've put it in a text-document. I might as well share it with you guys. I don;t know how to put it in an contribution and i think Chris is the person to do this, so here it is: ################################################################################ ############################ ################################################################################ ############################ ### Margin Report v2.56 ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?### ### ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?### ### Official Support Thread http://www.oscommerce.com/forums/index.php?showtopic=99144 ? ? ? ? ? ? ? ? ? ? ? ### ### ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?### ### If you find this contribution useful and would like to make a donation ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ### ### so that I can continue to build contributions for the community such as this one and Family Products.### ### Thanks and I hope you find this contribution useful. ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ### ### ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?### ### -Chris (a.k.a. blueline) P.S. ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?### ### ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?### ### If you find this contribution useful I?d like to hear about it. ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?### ### ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?### ### You can email me at [email protected] and let me know what you think. Thanks again. ? ? ? ? ? ? ? ? ? ### ### ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?### ### Margin Report v2.56 ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?### ### ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?### ### Installation Instructions ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?### ### ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?### ### Files included: ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?### ### ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?### ### /catalog/admin/margin_report.php ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ### ### /catalog/admin/margin_report2.php ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?### ### /catalog/admin/languages/english/margin_report.php ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ### ### /catalog/admin/languages/english/images/buttons/button_export.gif ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?### ### /catalog/admin/languages/turkish/margin_report.php ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ### ### /catalog/admin/languages/turkish/images/buttons/button_export.gif ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?### ### ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?### ### Margin Report v2.56.sql ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?### ### ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?### ### Files to Edit: ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ### ### ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?### ### /catalog/admin/categories.php ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?### ### /catalog/admin/includes/languages/english/categories.php ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ### ### /catalog/admin/includes/languages/english.php ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?### ### /catalog/admin/includes/boxes/reports.php ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?### ### /catalog/admin/includes/filenames.php ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?### ### /catalog/includes/classes/order.php ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?### ### /catalog/includes/classes/shopping_cart.php ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?### ### /catalog/checkout_process.php ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?### ### ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?### ################################################################################ ############################ ################################################################################ ############################ Installation Instructions /catalog/admin/categories.php Find: ? ? ? ? ?<tr bgcolor="#ebebff"> ? ? ? ? ? ?<td class="main"><?php echo TEXT_PRODUCTS_PRICE_NET; ?></td> ? ? ? ? ? ?<td class="main"><?php echo tep_draw_separator('pixel_trans.gif', '24', '15') . ' ' . tep_draw_input_field('products_price', $pInfo->products_price, 'onKeyUp="updateGross()"'); ?></td> ? ? ? ? ?</tr> Replace With: ? <tr bgcolor="#ebebff"> ? ? <td class="main"><?php echo TEXT_PRODUCTS_PRICE_COST; ?></td> ? ? <td class="main"><?php echo tep_draw_separator('pixel_trans.gif', '24', '15') . ' ' . tep_draw_input_field('products_cost', $pInfo->products_cost, ''); ?></td> ? </tr> ? <tr bgcolor="#ebebff"> ? ? <td class="main"><?php echo TEXT_PRODUCTS_PRICE_NET; ?></td> ? ? <td class="main"><?php echo tep_draw_separator('pixel_trans.gif', '24', '15') . ' ' . tep_draw_input_field('products_price', $pInfo->products_price, 'onKeyUp="updateGross()"'); ?></td> ? </tr> Find: ? ?if (isset($HTTP_GET_VARS['search'])) { ? ? ?$products_query = tep_db_query("select p.products_id, pd.products_name, p.products_quantity, p.products_image, p.products_price, p.products_date_added, p.products_last_modified, p.products_date_available, p.products_status, p2c.categories_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' and p.products_id = p2c.products_id and pd.products_name like '%" . tep_db_input($search) . "%' order by pd.products_name"); ? ?} else { ? ? ?$products_query = tep_db_query("select p.products_id, pd.products_name, p.products_quantity, p.products_image, p.products_price, p.products_date_added, p.products_last_modified, p.products_date_available, p.products_status from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' and p.products_id = p2c.products_id and p2c.categories_id = '" . (int)$current_category_id . "' order by pd.products_name"); ? ?} Replace With: ? ?if (isset($HTTP_GET_VARS['search'])) { ? ? ?$products_query = tep_db_query("select p.products_id, pd.products_name, p.products_quantity, p.products_image, p.products_price, p.products_cost, p.products_date_added, p.products_last_modified, p.products_date_available, p.products_status, p2c.categories_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' and p.products_id = p2c.products_id and pd.products_name like '%" . tep_db_input($search) . "%' order by pd.products_name"); ? ?} else { ? ? ? ? $products_query = tep_db_query("select p.products_id, pd.products_name, p.products_quantity, p.products_image, p.products_price, p.products_cost, p.products_date_added, p.products_last_modified, p.products_date_available, p.products_status from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' and p.products_id = p2c.products_id and p2c.categories_id = '" . (int)$current_category_id . "' order by pd.products_name"); ? ?} ? ? Find: ? ? ? ? ? ? ? ? ? ? ? 'products_price' => '', Replace With: ? ? ? ? ? ? ? ? ? ? ? 'products_price' => '', ? ? ? ? ? ? ? ? ? ? ? 'products_cost' => '', Find: ? ? ? ? ? ?$contents[] = array('text' => '<br>' . TEXT_PRODUCTS_PRICE_INFO . ' ' . $currencies->format($pInfo->products_price) . '<br>' . TEXT_PRODUCTS_QUANTITY_INFO . ' ' . $pInfo->products_quantity); Replace With: ? ? ? ? ? ?$contents[] = array('text' => '<br>' . TEXT_PRODUCTS_COST_INFO . ' ' . $currencies->format($pInfo->products_cost) . '<br>' . TEXT_PRODUCTS_PRICE_INFO . ' ' . $currencies->format($pInfo->products_price) . '<br><br>' . TEXT_PRODUCTS_PROFIT_INFO . ' ' . $currencies->format($pInfo->products_price-$pInfo->products_cost) . '<br><br>' . TEXT_PRODUCTS_QUANTITY_INFO . ' ' . $pInfo->products_quantity); ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? Find: ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?'products_price' => tep_db_prepare_input($HTTP_POST_VARS['products_price']), Replace With: ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?'products_price' => tep_db_prepare_input($HTTP_POST_VARS['products_price']), ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?'products_cost' => tep_db_prepare_input($HTTP_POST_VARS['products_cost']), Find: ? ? ? ? ? ?} elseif ($HTTP_POST_VARS['copy_as'] == 'duplicate') { ? ? ? ? ? ?$product_query = tep_db_query("select products_quantity, products_model, products_image, products_price, products_date_available, products_weight, products_tax_class_id, manufacturers_id from " . TABLE_PRODUCTS . " where products_id = '" . (int)$products_id . "'"); ? ? ? ? ? ?$product = tep_db_fetch_array($product_query); ? ? ? ? ? ?tep_db_query("insert into " . TABLE_PRODUCTS . " (products_quantity, products_model,products_image, products_price, products_date_added, products_date_available, products_weight, products_status, products_tax_class_id, manufacturers_id) values ('" . tep_db_input($product['products_quantity']) . "', '" . tep_db_input($product['products_model']) . "', '" . tep_db_input($product['products_image']) . "', '" . tep_db_input($product['products_price']) . "', ?now(), '" . tep_db_input($product['products_date_available']) . "', '" . tep_db_input($product['products_weight']) . "', '0', '" . (int)$product['products_tax_class_id'] . "', '" . (int)$product['manufacturers_id'] . "')"); ? ? ? ? ? ?$dup_products_id = tep_db_insert_id(); ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? Replace With: ? ? } elseif ($HTTP_POST_VARS['copy_as'] == 'duplicate') { ? ? $product_query = tep_db_query("select products_quantity, products_model, products_image, products_price, products_cost, products_date_available, products_weight, products_tax_class_id, manufacturers_id from " . TABLE_PRODUCTS . " where products_id = '" . (int)$products_id . "'"); ? ? $product = tep_db_fetch_array($product_query); ? ? ? ? tep_db_query("insert into " . TABLE_PRODUCTS . " (products_quantity, products_model,products_image, products_price, products_cost, products_date_added, products_date_available, products_weight, products_status, products_tax_class_id, manufacturers_id) values ('" . tep_db_input($product['products_quantity']) . "', '" . tep_db_input($product['products_model']) . "', '" . tep_db_input($product['products_image']) . "', '" . tep_db_input($product['products_price']) . "', '" . tep_db_input($product['products_cost']) . "', now(), '" . tep_db_input($product['products_date_available']) . "', '" . tep_db_input($product['products_weight']) . "', '0', '" . (int)$product['products_tax_class_id'] . "', '" . (int)$product['manufacturers_id'] . "')"); ? ? $dup_products_id = tep_db_insert_id(); Find: ? ?if (isset($HTTP_GET_VARS['pID']) && empty($HTTP_POST_VARS)) { ? ? ?$product_query = tep_db_query("select pd.products_name, pd.products_description, pd.products_url, p.products_id, p.products_quantity, p.products_model, p.products_image, p.products_price, p.products_weight, p.products_date_added, p.products_last_modified, date_format(p.products_date_available, '%Y-%m-%d') as products_date_available, p.products_status, p.products_tax_class_id, p.manufacturers_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = '" . (int)$HTTP_GET_VARS['pID'] . "' and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "'"); ? ? ?$product = tep_db_fetch_array($product_query); Replace With: ? ?if (isset($HTTP_GET_VARS['pID']) && empty($HTTP_POST_VARS)) { ? ? ?$product_query = tep_db_query("select pd.products_name, pd.products_description, pd.products_url, p.products_id, p.products_quantity, p.products_model, p.products_image, p.products_price, p.products_cost, p.products_weight, p.products_date_added, p.products_last_modified, date_format(p.products_date_available, '%Y-%m-%d') as products_date_available, p.products_status, p.products_tax_class_id, p.manufacturers_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = '" . (int)$HTTP_GET_VARS['pID'] . "' and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "'"); ? ? ?$product = tep_db_fetch_array($product_query); /catalog/admin/includes/languages/english/categories.php Add: ?define('TEXT_PRODUCTS_COST_INFO', 'Cost: '); ?define('TEXT_PRODUCTS_PROFIT_INFO', 'Profit:'); ?define('TEXT_PRODUCTS_PRICE_COST', 'Products Price (Cost):'); Also add these lines to other languages you are using. ? /catalog/admin/includes/languages/english.php Find: ?define('BOX_REPORTS_ORDERS_TOTAL', 'Customer Orders-Total'); ? Replace With: ?define('BOX_REPORTS_MARGIN_REPORT', 'Margin Report'); ?define('BOX_REPORTS_ORDERS_TOTAL', 'Customer Orders-Total'); ? ? ?Also replace these lines to other languages you are using. /catalog/admin/includes/boxes/reports.php Find: ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? '<a href="' . tep_href_link(FILENAME_STATS_CUSTOMERS, '', 'NONSSL') . '" class="menuBoxContentLink">' . BOX_REPORTS_ORDERS_TOTAL . '</a>'); Replace With: ? ? ? '<a href="' . tep_href_link(FILENAME_MARGIN_REPORT, '', 'NONSSL') . '" class="menuBoxContentLink">' . BOX_REPORTS_MARGIN_REPORT . '</a><br>' . ? ? ? '<a href="' . tep_href_link(FILENAME_STATS_CUSTOMERS, '', 'NONSSL') . '" class="menuBoxContentLink">' . BOX_REPORTS_ORDERS_TOTAL . '</a>'); /catalog/admin/includes/filenames.php Add: ?define('FILENAME_MARGIN_REPORT', 'margin_report.php'); ?define('FILENAME_MARGIN_REPORT2', 'margin_report2.php'); ? /catalog/includes/classes/order.php Find: ? ? ?$orders_products_query = tep_db_query("select orders_products_id, products_id, products_name, products_model, products_price, products_tax, products_quantity, final_price from " . TABLE_ORDERS_PRODUCTS . " where orders_id = '" . (int)$order_id . "'"); ? ? ?while ($orders_products = tep_db_fetch_array($orders_products_query)) { ? ? ? ?$this->products[$index] = array('qty' => $orders_products['products_quantity'], ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 'id' => $orders_products['products_id'], ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?'name' => $orders_products['products_name'], ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?'model' => $orders_products['products_model'], ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?'tax' => $orders_products['products_tax'], ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?'price' => $orders_products['products_price'], ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?'final_price' => $orders_products['final_price']); Replace With: ? ? ?$orders_products_query = tep_db_query("select orders_products_id, products_id, products_name, products_model, products_price, products_tax, products_quantity, final_price from " . TABLE_ORDERS_PRODUCTS . " where orders_id = '" . (int)$order_id . "'"); ? ? ?while ($orders_products = tep_db_fetch_array($orders_products_query)) { ? ? ? ?$this->products[$index] = array('qty' => $orders_products['products_quantity'], ? ? ? ? ? ? ? ? ? 'id' => $orders_products['products_id'], ? ? ? ? ? ? ? ? ? 'name' => $orders_products['products_name'], ? ? ? ? ? ? ? ? ? 'model' => $orders_products['products_model'], ? ? ? ? ? ? ? ? ? 'tax' => $orders_products['products_tax'], ? ? ? ? ? ? ? ? ? 'price' => $orders_products['products_price'], ? ? ? ? ? ? ? ? ? 'cost' => $orders_products['products_cost'], ? ? ? ? ? ? ? ? ? 'final_price' => $orders_products['final_price'], Find: ? ? ? ?$this->products[$index] = array('qty' => $products[$i]['quantity'], ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?'name' => $products[$i]['name'], ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?'model' => $products[$i]['model'], ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?'tax' => tep_get_tax_rate($products[$i]['tax_class_id'], $tax_address['entry_country_id'], $tax_address['entry_zone_id']), ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?'tax_description' => tep_get_tax_description($products[$i]['tax_class_id'], $tax_address['entry_country_id'], $tax_address['entry_zone_id']), ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?'price' => $products[$i]['price'], ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?'final_price' => $products[$i]['price'] + $cart->attributes_price($products[$i]['id']), ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?'weight' => $products[$i]['weight'], ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?'id' => $products[$i]['id']); Replace With: $this->products[$index] = array('qty' => $products[$i]['quantity'], ? ? 'name' => $products[$i]['name'], ? ? 'model' => $products[$i]['model'], ? ? 'tax' => tep_get_tax_rate($products[$i]['tax_class_id'], $tax_address['entry_country_id'], $tax_address['entry_zone_id']), ? ? 'tax_description' => tep_get_tax_description($products[$i]['tax_class_id'], $tax_address['entry_country_id'], $tax_address['entry_zone_id']), ? ? 'price' => $products[$i]['price'], ? ? 'cost' => $products[$i]['cost'], ? ? 'final_price' => $products[$i]['price'] + $cart->attributes_price($products[$i]['id']), ? ? 'weight' => $products[$i]['weight'], ? ? 'id' => $products[$i]['id']); /catalog/includes/classes/shopping_cart.php Find: // products price ? ? ? ?$product_query = tep_db_query("select products_id, products_price, products_tax_class_id, products_weight from " . TABLE_PRODUCTS . " where products_id = '" . (int)$products_id . "'"); ? ? ? ?if ($product = tep_db_fetch_array($product_query)) { ? ? ? ? ?$prid = $product['products_id']; ? ? ? ? ?$products_tax = tep_get_tax_rate($product['products_tax_class_id']); ? ? ? ? ?$products_price = $product['products_price']; ? ? ? ? ?$products_weight = $product['products_weight']; Replace With: // products price $product_query = tep_db_query("select products_id, products_price, products_tax_class_id, products_weight from " . TABLE_PRODUCTS . " where products_id = '" . (int)$products_id . "'"); if ($product = tep_db_fetch_array($product_query)) { ? $prid = $product['products_id']; ? $products_tax = tep_get_tax_rate($product['products_tax_class_id']); ? $products_price = $product['products_price']; ? $products_cost = $product['products_cost']; ? $products_weight = $product['products_weight']; ? Find: ? ? ?while (list($products_id, ) = each($this->contents)) { ? ? ? ?$products_query = tep_db_query("select p.products_id, pd.products_name, p.products_model, p.products_image, p.products_price, p.products_weight, p.products_tax_class_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = '" . (int)$products_id . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'"); ? Replace With: ? ? ?while (list($products_id, ) = each($this->contents)) { ? ? ? $products_query = tep_db_query("select p.products_id, pd.products_name, p.products_model, p.products_image, p.products_price, p.products_cost, p.products_weight, p.products_tax_class_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = '" . (int)$products_id . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'"); ? ? ? ? ? ? ? ? Find: ? ? ? ? ?$products_array[] = array('id' => $products_id, ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?'name' => $products['products_name'], ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?'model' => $products['products_model'], ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?'image' => $products['products_image'], ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?'price' => $products_price, ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?'quantity' => $this->contents[$products_id]['qty'], Replace With: ? $products_array[] = array('id' => $products_id, ? ? ? ? ?'name' => $products['products_name'], ? ? ? ? ?'model' => $products['products_model'], ? ? ? ? ?'image' => $products['products_image'], ? ? ? ? ?'price' => $products_price, ? ? ? ? ?'cost' => $products['products_cost'], ? ? ? ? ?'quantity' => $this->contents[$products_id]['qty'], /catalog/checkout_process.php Find: ? ?$sql_data_array = array('orders_id' => $insert_id, ? ? ? ? ? ? ? ? ? ? ? ? ? ?'products_id' => tep_get_prid($order->products[$i]['id']), ? ? ? ? ? ? ? ? ? ? ? ? ? ?'products_model' => $order->products[$i]['model'], ? ? ? ? ? ? ? ? ? ? ? ? ? ?'products_name' => $order->products[$i]['name'], ? ? ? ? ? ? ? ? ? ? ? ? ? ?'products_price' => $order->products[$i]['price'], ? ? ? ? ? ? ? ? ? ? ? ? ? ?'final_price' => $order->products[$i]['final_price'], ? ? ? ? ? ? ? ? ? ? ? ? ? ?'products_tax' => $order->products[$i]['tax'], ? ? ? ? ? ? ? ? ? ? ? ? ? ?'products_quantity' => $order->products[$i]['qty']); Replace With: ? ?$sql_data_array = array('orders_id' => $insert_id, ? ? ? ? ? 'products_id' => tep_get_prid($order->products[$i]['id']), ? ? ? ? ? 'products_model' => $order->products[$i]['model'], ? ? ? ? ? 'products_name' => $order->products[$i]['name'], ? ? ? ? ? 'products_price' => $order->products[$i]['price'], ? ? ? ? ? 'products_cost' => $order->products[$i]['cost'], ? ? ? ? ? 'final_price' => $order->products[$i]['final_price'], ? ? ? ? ? 'products_tax' => $order->products[$i]['tax'], ? ? ? ? ? 'products_quantity' => $order->products[$i]['qty']); ? ? ? ? ? ? Save and close all files mySQL Instructions: Run mySQL Command by copying the code below OR using the included .sql file: # Margin Report v2.56 SQL File ALTER TABLE `products` ADD `products_cost` DECIMAL( 15, 4 ) DEFAULT '0.0000' NOT NULL AFTER `products_price`; ALTER TABLE `orders_products` ADD `products_cost` DECIMAL( 15, 4 ) DEFAULT '0.0000' NOT NULL AFTER `products_price`; Done! I can also mail it you blueline if needed. Hope you enjoy the instructions. Sorry for screwing up the screen :o
  8. I tried a clean installation with this contribution and it works perfect now. I think I've fould a little bug/issue in the Installation file. It is about the file /admin/categories.php On page 3 the install instruction says: Find: 'products_price' => '', Replace With: 'products_price' => '', 'products_cost' => '', And on page 4 it says: Find: if ($action == 'new_product') { $parameters = array('products_name' => '', products_description' => '', 'products_url' => '', 'products_id' => '', 'products_quantity' => '', 'products_model' => '', 'products_image' => '', 'products_price' => '', Replace With: if ($action == 'new_product') { $parameters = array('products_name' => '', 'products_description' => '', 'products_url' => '', 'products_id' => '', 'products_quantity' => '', 'products_model' => '', 'products_image' => '', 'products_price' => '', 'products_cost' => '', This is both abouth the same array, so one of these comments could be left out I think? Am I right or do I mis something here?
  9. Ha, I never noticed these contributions have the same developer. It's great to know that they don't bite eachother. I'll try another install and hope it will work. Thx
  10. Great Contribution, but I seem to have some problems. I have installed the Family Products contribution on my shop. It seems that these contributions are not compatible with each other, they both require modifications in /admin/categories.php At this moment I can run the reports of margin_report.php fine but I'm unable to edit my categories. When I want to edit my catalog true the admin panel I simply see the admin menu and no categories to edit. Has anyone seen this before? Perhaps I should install Margin Report before the Family products contribution? Keep on the good work Chris, this is the best add-on i've seen in a while! Tip: get rid of the .pfd-document, it misses the line-breaks. I think a text file is better. (No offense offcourse :D )
×
×
  • Create New...