Contributions
QTpro v1.0 - Quantity Tracking Professional
Quantity Tracking Professional Module now allows you to keep track of stock of products and options.
You have one product, but different sizes and colors and need a solution to set quantity for this. QTpro fixes this.
Just define it.
Expand All / Collapse All
RC2a PayPal Standard integration for QTPro v4.51b.
Only the /catalog/includes/modules/payment/paypal_standard.php file is included in this archive.
Version 4.51b
Authors: "Olof Larsson".
Bug reporters: "escri2".
New in this version:
* Small fix: More detailed path to qtpro_functions.php in general.php
Some stores have a high product turnover rates with lots of products disabled.
QT Pro doesn't account for this issue and can be a nuisance when checking stock for active products.
To fix this simply change
$prod_query = tep_db_query("SELECT products_id FROM " . TABLE_PRODUCTS);
To:
$prod_query = tep_db_query("SELECT products_id FROM " . TABLE_PRODUCTS . " where products_status = '1'");
in admin/includes/functions/qtpro_functions.php
And in
admin/stats_low_stock_attrib.php
add products_status = '1' somewhere after the sql where clause on line 101.
I'm still new to the code so there might be other files that need this change.
In admin/includes/functions/general.php set
//++++ QT Pro: Begin Changed code
require('qtpro_functions.php');
//++++ QT Pro: End Changed code
by
//++++ QT Pro: Begin Changed code
require(DIR_WS_FUNCTIONS . 'qtpro_functions.php');
//++++ QT Pro: End Changed code
on line 1597 aprox
New in this version:
Bugfix: The "stock table" and "Actual Price Pull Downs" in products_description.php will now handle specials correct. Previously the special price was not considered and the original price was used instead.
minor update - whole package
minor updates.
just correckted some form-elements.
New in this version:
* The QTPro Doctor will now inform you about any sick products when entering the admin panel.
Had a problem with negative stock not showing in the low stock report. Adjusted the admin/ stats_low_stock_attrib.php from version 4.3a.
Not a full package.
This adds a quantity box on your product information page, it's a lot more convenient to be able to input your quantities before it goes in to your cart rather than having to change quantities then update your quantities on the shopping cart page.
This is a very simple mod.
Not a PHP expert, but the following line in admin/stock.php didn't work for me:
Line 163:
<td><form action="<? echo $PHP_SELF;?>" method=get>
Had to change to:
<td><form action="<?php echo $PHP_SELF;?>" method=get>
New in this version:
A tool called "QTPro Doctor" that will warn you when the products_stock table in the database is messed up and provides automatic fixes. This tool works good as it is but there is room for many improvements.
A new library of easy to use functions with the goal to make integration with other contributions easier. However this project is only in the start up phase.
When a product is deleted from the store, it's entries in the products_stock table will be deleted to.
The quantity input box in the "edit a product page" will now be replaced with a link to the QTPro stock manager (stock.php) if the product has entries in the products_stock table.
A tip when updating / installing:
http://www.sourcegear.com/diffmerge/
Regards, Olof
This is a full package and includes a bugfix were taxes were not displayed right in the stock table in the products information page.
To uppdate:
Replace your current qtpro_stock_table.php file
With the new qtpro_stock_table.php in this package.
(a bugfix for previous release)
--------------------------------------
This contribution is for MS2.2 [rc2]/[rc2a]
It includes bugfixes...
* Fullfilled Andyy's work to make the contribution rc2 compatible.
* The low stock report will now display products with a quantity < 0
... usabillity and cleaning...
* The config.sql now first deletes the database entries before adding them.
* Better descriptions in the configuration menu.
* A new manual in HTML + CSS format with new screenshots.
* You can now decide from the admin panel if the attribute prices should be displayed as usually (with perifex and the difference in price) or as the calculated final price for the product (this will only work if you use one attribute option per product in your store).
* In stock.php there are now links back to all the different categories in which the product exists.
* Added Swedish language files.
... and a new feature ...
* A table with information on whats on stock will be displayed to the customer in the products information page.
This feature can be turned on and off from the admin panel.
Tip: Make yourself familliar with the program Beyond Compare!!!
Please, do this! It will make your life easier ;)
Good luck with installing and enjoy an new version of QTPro!
Best Whishes,
Olof Larsson
This contribution is for MS2.2 [rc2]/[rc2a]
It includes bugfixes...
* Fullfilled Andyy's work to make the contribution rc2 compatible.
* The low stock report will now display products with a quantity < 0
... usabillity and cleaning...
* The config.sql now first deletes the database entries before adding them.
* Better descriptions in the configuration menu.
* A new manual in HTML + CSS format with new screenshots.
* You can now decide from the admin panel if the attribute prices should be displayed as usually (with perifex and the difference in price) or as the calculated final price for the product (this will only work if you use one attribute option per product in your store).
* In stock.php there are now links back to all the different categories in which the product exists.
* Added Swedish language files.
... and a new feature ...
* A table with information on whats on stock will be displayed to the customer in the products information page.
This feature can be turned on and off from the admin panel.
Tip: Make yourself familliar with the program Beyond Compare!!!
Please, do this! It will make your life easier ;)
Good luck with installing and enjoy an new version of QTPro!
Best Whishes,
Olof Larsson
Full contribution
Thanks to Olof Larsson for spotting a block of code I missed out from admin>functions>general.php
function tep_remove_order($order_id, $restock = false) {
if ($restock == 'on') {
//++++ QT Pro: Begin Changed code
$order_query = tep_db_query("select products_id, products_quantity, products_stock_attributes from " . TABLE_ORDERS_PRODUCTS . " where orders_id = '" . (int)$order_id . "'");
while ($order = tep_db_fetch_array($order_query)) {
$product_stock_adjust = 0;
if (tep_not_null($order['products_stock_attributes'])) {
if ($order['products_stock_attributes'] != '$$DOWNLOAD$$') {
$attributes_stock_query = tep_db_query("SELECT products_stock_quantity
FROM " . TABLE_PRODUCTS_STOCK . "
WHERE products_stock_attributes = '" . $order['products_stock_attributes'] . "'
AND products_id = '" . (int)$order['products_id'] . "'");
if (tep_db_num_rows($attributes_stock_query) > 0) {
$attributes_stock_values = tep_db_fetch_array($attributes_stock_query);
tep_db_query("UPDATE " . TABLE_PRODUCTS_STOCK . "
SET products_stock_quantity = products_stock_quantity + '" . (int)$order['products_quantity'] . "'
WHERE products_stock_attributes = '" . $order['products_stock_attributes'] . "'
AND products_id = '" . (int)$order['products_id'] . "'");
$product_stock_adjust = min($order['products_quantity'], $order['products_quantity']+$attributes_stock_values['products_stock_quantity']);
} else {
tep_db_query("INSERT into " . TABLE_PRODUCTS_STOCK . "
(products_id, products_stock_attributes, products_stock_quantity)
VALUES ('" . (int)$order['products_id'] . "', '" . $order['products_stock_attributes'] . "', '" . (int)$order['products_quantity'] . "')");
$product_stock_adjust = $order['products_quantity'];
}
}
} else {
$product_stock_adjust = $order['products_quantity'];
}
tep_db_query("UPDATE " . TABLE_PRODUCTS . "
SET products_quantity = products_quantity + " . $product_stock_adjust . ", products_ordered = products_ordered - " . (int)$order['products_quantity'] . "
WHERE products_id = '" . (int)$order['products_id'] . "'");
//++++ QT Pro: End Changed Code
}
}
tep_db_query("delete from " . TABLE_ORDERS . " where orders_id = '" . (int)$order_id . "'");
tep_db_query("delete from " . TABLE_ORDERS_PRODUCTS . " where orders_id = '" . (int)$order_id . "'");
tep_db_query("delete from " . TABLE_ORDERS_PRODUCTS_ATTRIBUTES . " where orders_id = '" . (int)$order_id . "'");
tep_db_query("delete from " . TABLE_ORDERS_STATUS_HISTORY . " where orders_id = '" . (int)$order_id . "'");
tep_db_query("delete from " . TABLE_ORDERS_TOTAL . " where orders_id = '" . (int)$order_id . "'");
}
I have updated qtpro to work with osC2.2rc2a
If you are adding this contribution above the version:
QT Pro V4.2 Ralph Day 15 Apr 2005
Be Warned!! - read the forum FIRST
http://forums.oscommerce.com/index.php?showtopic=31484&st=1580
I seen this problem after reading this topic, because I did not run over the complet site. After testing it with the shopping cart .I saw my fault.Sorry.
This is the complet contri with Application_top.php
Complet, without a small bug
A small thing in amin/includes/boxes/reports.php.
changes
'<a href="' . tep_href_link(FILENAME_STATS_LOW_STOCK, '', 'NONSSL') . '" class="menuBoxContentLink">' . BOX_REPORTS_STOCK_LEVEL . '</a>');
to
'<a href="' . tep_href_link(FILENAME_STOCK, '', 'NONSSL') . '" class="menuBoxContentLink">' . BOX_REPORTS_STOCK_LEVEL . '</a>');
here is a other thing if you want to changes it. The prices without ( )
Changes in catalog/include/classes/pad_base.php line:
$products_options_array[sizeof($products_options_array)-1]['text'] .= ' ('
. $currencies->display_price( $show_price, tep_get_tax_rate($this->products_tax_class_id)) .') '; // note $this variable //HW: THIS WAS BROKEN - tax class ID was being used as the tax rate.. so a fixed 8 percent in my case.
to
$products_options_array[sizeof($products_options_array)-1]['text'] .= ' '
. $currencies->display_price( $show_price, tep_get_tax_rate($this->products_tax_class_id)) .' '; // note $this variable //HW: THIS WAS BROKEN - tax class ID was being used as the tax rate.. so a fixed 8 percent in my case.
or
$products_options_array[sizeof($products_options_array)-1]['text'] .= ' '
. $currencies->display_price( $show_price, tep_get_tax_rate($this->products_tax_class_id)) .' '; // note $this variable //HW: THIS WAS BROKEN - tax class ID was being used as the tax rate.. so a fixed 8 percent in my case.
This complete installation contains the QT Pro v4.3 (with the admin fix). This installation works for osc v2.2 rc1. I was successful in getting this to work by doing a complete new install of osc v2.2rc1. Tested the new osc install, now with real prices for attribute without prefix.
Hi All,
This is bug fixing in admin area (Version 4.3).
catalog->admin->stock.php
Line no. 152 / Find :
<td class="pageHeading"><?php echo PRODUCTS_STOCK.": $product_name" . '<td align="right"><a href="' . tep_href_link(FILENAME_CATEGORIES, '&pID=' . $product_id . '&action=new_product') . '">' . tep_image_button('button_edit.gif', IMAGE_EDIT) . '</a></td><br><br>'; ?></td>
Replace with:
<td class="pageHeading"><?php echo PRODUCTS_STOCK . ': ' . $product_name . '<td align="right"><a href="' . tep_href_link(FILENAME_CATEGORIES, 'pID=' . $VARS['product_id'] . '&action=new_product') . '">' . tep_image_button('button_edit.gif', IMAGE_EDIT) . '</a></td><br><br>'; ?></td>
This is not complete package
All the best.
Regards
Ravindra Singh
Email: ravindra@kpr.in
This complete installation contains the QT Pro v4.3 (with the admin fix). This installation works for osc v2.2 rc1. I was successful in getting this to work by doing a complete new install of osc v2.2rc1. Tested the new osc install, followed by installing QT Pro as specified in the Manual.htm page included in the zip file.
This version has been setup on a clean install of ms2.2, by clean i mean that the install is in the "catalog" directory taken right out of the zip.
i found three bugs in the original package for this, minor as they are this FULL PACKAGE addresses these issues, I have added a bugfix.txt to the package please use it as i have set it out and maybe we can keep a track through the actual files of fixes and updates. This is VERY easy to install, you should be able to install this on a clean install with no bother what so ever.
Wrong:
9. find:
'products_quantity' => $order->products[$i]['qty'],
and replace with:
'products_stock_attributes' => $products_stock_attributes);
//++++ QT Pro: End Changed Code
*********************finished Catalog/checkout_process.php*********************
new and CORRECT:
9. find:
'products_quantity' => $order->products[$i]['qty'],;
and add replace with:
'products_quantity' => $order->products[$i]['qty'],
'products_stock_attributes' => $products_stock_attributes);
//++++ QT Pro: End Changed Code
best regards
Craxx;)
PS: didilio bitte stell das nächste mal nicht eine so FEHLERHAFTE Beschreibung hier rein.
1. FEHLER
43. find:
falsch <td colspan="2" class="pageHeading"> <?php echo HEADING_TITLE_OPT; ?> </td
43. find:
richtig <td colspan="2" class="pageHeading"> <?php echo HEADING_TITLE_OPT; ?> </td>
2. FEHLER
26. find: FALSCH !!!
// Return a product's name
// TABLES: products
function tep_get_products_name($product_id, $language = '') {
global $languages_id;
if (empty($language)) $language = $languages_id;
$product_query = tep_db_query("select products_name from " . TABLE_PRODUCTS_DESCRIPTION . " where products_id = '" . (int)$product_id . "' and language_id = '" . (int)$language . "'");
$product = tep_db_fetch_array($product_query);
return $product['products_name'];
26. find: RICHTIG !!!
// Return a product's stock
// TABLES: products
function tep_get_products_stock($products_id) {
$products_id = tep_get_prid($products_id);
$stock_query = tep_db_query("select products_quantity from " . TABLE_PRODUCTS . " where products_id = '" . (int)$products_id . "'");
$stock_values = tep_db_fetch_array($stock_query);
return $stock_values['products_quantity'];
basiert von frischer oscommerce-2.2ms2-060817 installation hab ich jetzt eine installaationsanleitung für dieses constribt erstellt. nNachdem bei mir am testrechner alles einwandfrei funktioniert und bis dato keine Installationsanleitung zu finden war machte ich deshalb diese Anleitung. Somit kann man bei bereits installiierten erweiterungen diesen constrib leichter einbauen
Same as below, but with a correct INSTAL-file. Please use this download instead.
Correct link to the forum is:
http://forums.oscommerce.com/index.php?showtopic=31484&st=1260&p=997927&#entry997927
This is add-on for QTpro that let you have attributes/product options in the product list page.
The customer can add products directly from the product list page, even if you have attributes set to the selected item.
This is version 1.0 and is a beta release, download it, test it, improve it and do report all improvements
Posts for this contrib can be found below this post in the QTpro thread:
http://forums.oscommerce.com/index.php?s=&showtopic=31484&view=findpost&p=996748
This add-on/contrib contains 3 files and you need QTpro installed to make this work.
Version 4.3 is a restyling of the Low Stock Report. It is based on version 4.25 from ATeschner and BehrendsTech.
Restyled stock report to show all products stock.
Fixed display of attribute price to automatically format it.
Added an edit button to conviently edit a product from the stock update page.
Stock report now shows the model of the product.
Stock report highlights products with low stock.
This is a full package
I don't know why no one has done this but the menu, footer and style sheet were missing from the report and it looked ghetto along with u had to use the back button. So i modified it really quick so it would. I also changed some styling cuz it had this huge font for the product name then everything else was tiny.
-Added left admin menu
-Added footer
-Changed stylin
-Cleaned up some of the code
Just copy over old report file in catalog/admin/ and ur good to go.
Updated: Forgot something in Stock.php
-------------------------------------------------
Simple little change...
Updated the link for "Back to Products Category" at the bottom of the Products Stock page. Previously, using this link would return you back to the begining of the categories.php page (root catalog)... I thought it better if this link return you to the previous category level you were at prior to clicking the stock button.
IE: CatagoryLvl1lvl2lvl3 - Clicking link would return you to Lvl1, now, clicking the link will return you to lvl3 or whatever lvl the product was located when you clicked the stock button...
Included: Just a text file with the required changes - NOT A FULL PACKAGE
-------------------------------------------------
[code]
catalogadmincategories.php
Search For:
tep_href_link("stock.php", 'product_id=' . $pInfo->products_id) . '">'
Change To:
tep_href_link("stock.php", 'cPath=' . $cPath . '&product_id=' . $pInfo->products_id) . '">'
catalogadminstock.php
<a href="' . tep_href_link(FILENAME_CATEGORIES, '', 'NONSSL') . '" class="menuBoxContentLink">Back to Products Category</a>
Change To:
<a href="' . tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $VARS['cPath'], 'NONSSL') . '" class="menuBoxContentLink">Back to Products Category</a>
Search For:
echo "<td class=dataTableHeadingRow><input type=text name=quantity size=4 value="" . $db_quantity . ""><input type=hidden name=product_id value="" . $VARS['product_id'] . "">
Change To:
echo "<td class=dataTableHeadingRow><input type=text name=quantity size=4 value="" . $db_quantity . ""><input type=hidden name=cPath value="" . $VARS['cPath'] . ""><input type=hidden name=product_id value="" . $VARS['product_id'] . "">
[/code]
Simple little change...
Updated the link for "Back to Products Category" at the bottom of the Products Stock page. Previously, using this link would return you back to the begining of the categories.php page (root catalog)... I thought it better if this link return you to the previous category level you were at prior to clicking the stock button.
IE: CatagoryLvl1lvl2lvl3 - Clicking link would return you to Lvl1, now, clicking the link will return you to lvl3 or whatever lvl the product was located when you clicked the stock button...
Included: Just a text file with the required changes - NOT A FULL PACKAGE
-------------------------------------------------
catalogadmincategories.php
Search For:
tep_href_link("stock.php", 'product_id=' . $pInfo->products_id) . '">'
Change To:
tep_href_link("stock.php", 'cPath=' . $cPath . '&product_id=' . $pInfo->products_id) . '">'
catalogadminstock.php
<a href="' . tep_href_link(FILENAME_CATEGORIES, '', 'NONSSL') . '" class="menuBoxContentLink">Back to Products Category</a>
Change To:
<a href="' . tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $VARS['cPath'], 'NONSSL') . '" class="menuBoxContentLink">Back to Products Category</a>
-------------------------------------------------
The tax calculations in chooch 's extra classes were broken - the tax_class_id was being used as teh tax rate (8 for me) instead of the real rate (in my case GST @ 10%) which was so close it was maddening trying to work out what was going on! The two files are a replacement for the previous versions.
This zip contains two versions of the catalog/includes/classes/pad_base.php file.
Version One will show a price next to the attributes of all attributes and Version Two will show a price next to the attribute or attributes if it is different from the default price (i.e. more or less)
Hope you find it useful
Regards
Chooch
There is a small bug where if there is no product image, the right column gets bumped down to the left below the table. This had been addressed in the forum by judebert
http://forums.oscommerce.com/index.php?showtopic=31484&st=780&p=668771&#entry668771
but I thought it should be fixed in the package.
No other changes have been made.
This is a full package including the last two additions.
This very small modification IS NOT REQUIRED, however it fixes a problem for none track stock where no attribute data is stored in orders_products table products_stock_attributes column.
For most this will not be an issue but if you try to do anything fancy with stock after the order has been placed you will quickly find you need this information.
HTH
Si.
This very small modification fixes a problem where the link to "Low Stock Report" is missing in the left column of the admin page.
Version 4.2 is a bug fix release of QT Pro.
Changes from version 4.1 to version 4.2:
Fix problem with delete and restock orders with downloadaed products
Version 4.1 is a minor bug fix and enhancement release of QT Pro.
Changes from version 4.0 to version 4.1:
Fix stock screen to work with older releases of PHP
Fix errors on product page when all attribute combinations are out of stock
Fix invalid pass by reference error on product page in some versions of PHP
Fix to prevent product image from sliding left up against the description on the product page
Fix to allow download to be set to true
Warning: Due to time constraints I haven't tested this as thoroughly as I'd like. But the fixes that are in this release have been applied to several sites (except for allowing download set to true) and have been consolidated in this release. Allowing download set to true is new code and required changes to checkout_process.php where stock is decremented. I'm pretty confident its fine but caveat emptor.
Support is available on this thread in the forums:
http://forums.oscommerce.com/index.php?showtopic=31484&view=getnewpost
Sorry uploaded the wrong version. Still works the same but didn't have the credits in the code as well as the original code.
This is essentially Don Mitchinson's attribute sorting fix integrated with the QT Pro installation. i have provided the only file that needs changed and even documented in the code exactly what was changed and the original code.
If you are not familiar with the original:
I always ran into the problem that attributes that modified price were not in a logical order (which would be by price). This fixes it.
First - sorts by price
Second - if price is same (or 0), it sorts based on the order that the option was entered.
BACKUP AND TEST!!!
This is only the French translation of this great contribution, no credit.
I thought that it might be useful for some to have this in French.
I integrated the QTPro 4 on top of a BTS 1.4 install.
This requires modifications to each BTS template you are using, so i have included a converted copy of the base template 'fallback'. I have only included in the modified files, so it should be easy to transfer this code to any other template.
Here it is again. Hope my satellite connection doesn't mangle it again.
Hi
It was just a screenshot picture who was corrupted...
I've just removed it and now, archive works...
Have fun... ;o)
Full package
The zip file is damaged and encounters a problem when unzipping. Please repost qtpro 4.0
Here's what's in the new version:
New plugin architecture for product attribute display
Four plugins for product attribute display, most with additional options:
- Multiple dropdowns with out of stock messaging and cart add prevention,
- Sequenced dropdowns showing the customer attribute selections one at a time so that only an in stock combination can be selected
- single dropdown with attribute combinations instead of separate attribute dropdowns
- single radioset - same as single dropdown but a radioset
One of these plugins will likely give you a solution to the out of stock attribute combination problem that you will like.
The "special" flag for product options has been renamed to "Track Stock" to better reflect its use.
On product information page, attributes that stock is tracked for are displayed before attributes that stock is not tracked for.
Delete order with restock now restocks product attributes (for orders created with Version 4 installed only)
Attribute stock will now go negative if oversold to be consistent with how osCommerce handles product stock
stock.php now compatible with register_globals off (if you are applying this to a register globals off version of osCommerce)
attribute stock check added to checkout_confirmation
Low stock attribute report fixes:
-Language file for English added so titles display
-Multiple attributes per product now work
-Non-stock attributes are ignored
-Product hyperlinks now work
Cleanup of products_stock table
Moved admin folder under catalog folder to match base osCommerce folder structure
A real manual
I needed to view the model, so I came up with this little hack. I hope this is something others would also like to have available.
Existing users:
Two New Files
You should be able to overwrite your original files, but BACK UP first.
**no other changes made
QTPRO 3.1_2 Added missing language file
English: stats_low_stock_attrib.php
no other changes made
----------------------------------
Thanks for a great contribution!!!
These are the quick install files for QTPRO 3.1
I have included the original files as well ... in case.
Update to QTPro 2.3 to fix problems with multiple attributes, "special" attributes. and misc. fixes.
Bugs fixed:
- Stock check for multiple attributes incorrectly reporting in/out of stockand stock decrement not working
- Stock check when no products_stock row incorrectly reporting products stock instead of 0
- Stock check when all attributes are "special" incorrectly reporting out of stock
- SQL error in stock admin when last attribute combination deleted
- Columns and input fields on stock admin page not sorted the same
- Stock admin page accepts garbage quantity input and deletes products_stock row
Note: Diffs to 2.3 were added as 3.0 rather than something like 2.3 diffs. This really ought to be 2.4 but to avoid confusion I have added this as 3.1 as it has fixes that apply to "3.0" as well. If someone chooses to add a diffs package please name it as 2.4diffs or something to avoid the impression it contains functional changes.
ITNetwork Designs
IceTheNet.com
Contribution: QTPRO 3.0
I had to make a manual installer for this contribution
I needed it in a highly modified site.
This is still the same as 2.3 version I have just extracted the
data and put it in a text file. I left the files that wouldn't override
other files and put a quick fix in the sql file to avoid an error.
I have it working on my store so I know this works. I think this may
make this a more versatile contribution for the community. I have also repacked the 2.3 version so it will put the files in the proper spots.
Fixed zip file directory structure problem.
Removed references to 'products_attributes_quantity'. This is not used in QTPRO.
This product_info only works with one attribute. I am working on this.
Updated product_info.php to show out of stock without using temporary tables.
Added inventory report that shows attribute quantities.
Support is available on this thread.
http://forums.oscommerce.com/index.php?showtopic=31484&view=findpost&p=99039
This update enables product_info.php to show only those products-attributes which are on stock.
This version should work with MySQL4. Since MySQL 4 does not support subselects it's solved with temporary tables.
This update allows qtpro to work with MS2 but attributes are not filtered for stock availability in product info page.
Quantity Tracking Professional Module now allows you to keep track of stock of products and options.
You have one product, but different sizes and colors and need a solution to set quantity for this. QTpro fixes this.
Just define it.
Note: Contributions are used at own risk.