Latest News: (loading..)

113 posts in this topic

QTPro BS 5.0

I'm working on a new version based on QTpro for osc 2.3 version 4.6.1 plus newer updates and fixes.

Planned Changes:

  • coding updates for latest 2.3.4 BS EDGE Community version with hardcoded filenames, database table names, paths and superglobals
  • content modules for product info, shopping cart
  • hooked modifications or separate functions where possible to avoid core file changes (stock checks etc in checkout pages)
  • final product prices shown in option/attribute combinations on product info page also for more than one option/combinations
  • general code clean up
  • language constants/definitions for all texts for full multilanguage support

To do list:

  1. update qtprodoctor.php
    hardcoded stuff, superglobals
    language constants/definitions
  2. update stats_low_stock_attrib.php
    hardcoded stuff, superglobals
    language constants/definitions
  3. update stock.php
    hardcoded stuff, superglobals
    language constants/definitions
  4. replace mods in admin/boxes/tools.php by separate file
  5. replace mods in admin/boxes/reports.php by separate file
  6. avoid mods in admin/includes/functions/general.php
    load function file in modules
    replace core function mods by own functions?
  7. modularize product info options
  8. modularize product info stock table
  9. versions for Modular Product Page by kymation
  10. alternative product listing module for modularized shopping cart
  11. order class extension to avoid mods in core order class
  12. replace all mods in checkout files by hooks?
  13. check compatibility with ajax attribute manager
  14. add support for attribute sort order
  15. update instructions

 

It would be great if there appear testers for the mods.

Who has the old version already installed:

- replace the admin files

- upload and install the product info content modules and (IMPORTANT!) uncomment the complete options/attributes section in product_info.php

 

For new installations:

- instructions are not updated yet

follow the old instructions except

A.: don't modify  admin/includes/boxes/tools.php and reports.php, upload the nwe files instead

B.: upload and install the product info content modules and (IMPORTANT!) uncomment the complete options/attributes section in product_info.php instead to apply the mods

 

 

 

Most important for now are the changes in the product info option modules to show final prices according to the option selection even if there are muliple option combinations (single drop down and single radios)

 

GitHub repository

 

Thanks and best regards

Rainer

Edited by raiwa
1 person likes this

Share this post


Link to post
Share on other sites

Oohps, forgot for the test update the most important:

- replace all pad class files

:)

Share this post


Link to post
Share on other sites

@@raiwa i put a new compress folder on github whit spanish traslation, i dont know make a folder in github.

Regards

Share this post


Link to post
Share on other sites

@@raiwa

will be testing on a new test install in uniserver, using the latest version of edge...

Edited by altoid
1 person likes this

Share this post


Link to post
Share on other sites

@@raiwa Thank you
I have already qtpro 4.6 installed on oscommerce 2.3 edge ..
Is this addon requires the product info content module? or will work without it? I installed it Modular Product Page and it was hard to me to got it sorted, I mean about the content modules (image,price,product name...etc ) layout..

Joe

Share this post


Link to post
Share on other sites

@@raiwa Treating this as a new install on an up to day Edge test shop, the instructions code needs looked at closely and updated where hard coding, etc may be needed. Do you want me to send what I find that needs updated?

Share this post


Link to post
Share on other sites

Hello Steve @@altoid,

 

I didn't touch for now anything in the instructions and thought to leave this for the end when all new modules and modifications are done.

The instructions will need to be complete rewritten.

For now it would be just important to check the new modules and pad classes in product info.

Thanks

Rainer

Edited by raiwa

Share this post


Link to post
Share on other sites

Helo @@joe122joe,

 

This is a new development and in beta phase. It is supposed to be used in the 2.3.4 EDGE unmodified product info.

If you wish to test you'll need to adapt to your modularized product info.

If it's kymations modular produc tinfo you may wait until the apropiate modified module is done.

 

Please see the To Do list, only what is touched is already done.

 

rgds

Rainer

Share this post


Link to post
Share on other sites

@@raiwa

Still working on this on the Edge test shop.  As noted the instructions are out of date, so what I'm doing is changing them going along to better match Edge coding. Then I'm modifying files based on my instruction updates. This is the only way I see to do this for now.

I have the instruction changes in a branch.  I haven't yet pushed the changes, I'll do that if/when I get this done without screwing it up.

Share this post


Link to post
Share on other sites

@@raiwa

Some questions re this step:

B.: upload and install the product info content modules and (IMPORTANT!) uncomment the complete options/attributes section in product_info.php instead to apply the mods

 

Modules installed and appear to be OK.

 

Not sure where to uncomment the complete options/attribute section?

 

I had to remove a curly bracket after updating product_info otherwise there was an error.

See here: https://github.com/skleiner/Responsive-osCommerce/commit/e6f5202f8b44cd6b85431bc30d95ec7c65af0ad9

 

Also, around line 156, does that file path need modified?

  if(PRODINFO_ATTRIBUTE_DISPLAY_STOCK_LIST == 'True'): require("includes/modules/qtpro_stock_table.php"); endif;

Share this post


Link to post
Share on other sites

Hello Steve @@altoid,

 

You do not need to apply the QT Pro modifications from the old instructions to product_info.php.

Just comment out all the options/attributes section like this:

<div itemprop="description">
  <?php echo stripslashes($product_info['products_description']); ?>
</div>

<?php
/*
    $products_attributes_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id='" . (int)$_GET['products_id'] . "' and patrib.options_id = popt.products_options_id and popt.language_id = '" . (int)$languages_id . "'");
    $products_attributes = tep_db_fetch_array($products_attributes_query);
    if ($products_attributes['total'] > 0) {
?>

    <h4><?php echo TEXT_PRODUCT_OPTIONS; ?></h4>

    <p>
<?php
      $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)$_GET['products_id'] . "' and patrib.options_id = popt.products_options_id and popt.language_id = '" . (int)$languages_id . "' order by popt.products_options_name");
      while ($products_options_name = tep_db_fetch_array($products_options_name_query)) {
        $products_options_array = array();
        $products_options_query = tep_db_query("select pov.products_options_values_id, pov.products_options_values_name, pa.options_values_price, pa.price_prefix from " . TABLE_PRODUCTS_ATTRIBUTES . " pa, " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov where pa.products_id = '" . (int)$_GET['products_id'] . "' and pa.options_id = '" . (int)$products_options_name['products_options_id'] . "' and pa.options_values_id = pov.products_options_values_id and pov.language_id = '" . (int)$languages_id . "'");
        while ($products_options = tep_db_fetch_array($products_options_query)) {
          $products_options_array[] = array('id' => $products_options['products_options_values_id'], 'text' => $products_options['products_options_values_name']);
          if ($products_options['options_values_price'] != '0') {
            $products_options_array[sizeof($products_options_array)-1]['text'] .= ' (' . $products_options['price_prefix'] . $currencies->display_price($products_options['options_values_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) .') ';
          }
        }

        if (is_string($_GET['products_id']) && isset($cart->contents[$_GET['products_id']]['attributes'][$products_options_name['products_options_id']])) {
          $selected_attribute = $cart->contents[$_GET['products_id']]['attributes'][$products_options_name['products_options_id']];
        } else {
          $selected_attribute = false;
        }
?>
      <strong><?php echo $products_options_name['products_options_name'] . ':'; ?></strong><br /><?php echo tep_draw_pull_down_menu('id[' . $products_options_name['products_options_id'] . ']', $products_options_array, $selected_attribute, 'style="width: 200px;"'); ?><br />
<?php
      }
?>
    </p>

<?php
    }
*/
?>

    <div class="clearfix"></div>

All the coding in this part is done now in the module. That's why I said the instructions should be updated once all is done, a lot of the old instructions will be obsolete and removed.

 

I have all the updates for the shopping cart and checkout pages almost finished. Just need some more testing.

I'll try to upload that part in the next couple of days. Maybe It would be a good idea to fork your complete repository and apply all changes there.

 

Thanks

rgds

Rainer

Share this post


Link to post
Share on other sites

@@raiwa

OK, I think I have the product_info.php correct now. You'll have to bear with me, I'm 95% shop owner and 5% coder so sometimes I don't quite grasp right off exactly what's going on with the whys and wherefores of code application.

 

I have a couple forks going on this. One fork applying qtpro to edge.

https://github.com/skleiner/Responsive-osCommerce/commits/QTPro

 

Then another fork of your repo.

 

I've been updating the manual for my purposes while going along with the updates.  I just pushed changes to date here:

https://github.com/skleiner/qtpro-5.0-BS/commit/c626c12eba52445113d9ef04aebe0cef19e97f83

Share this post


Link to post
Share on other sites

OK

It's working on uniserver

Available Options and Currently on Stock table showing in listing.

 

Able to modify option tracking and quantity in admin.

 

Adding tracked product to cart works.

 

Trying to add more option quantity in the cart than actually are on stock generated warning message.

1 person likes this

Share this post


Link to post
Share on other sites

@@raiwa Hi Rainer, I'm going to start testing this shortly.

 

Scott

1 person likes this

Share this post


Link to post
Share on other sites

@@greasemonkey, @@altoid,

 

I have all updates for the store side on the point. Just trying to fix a small bug for attribute stock adjust on checkout.

 

 

rgds

Rainer

1 person likes this

Share this post


Link to post
Share on other sites

Beta 02

 

To do list:

  1. update qtprodoctor.php
    hardcoded stuff, superglobals
    language constants/definitions
  2. update stats_low_stock_attrib.php
    hardcoded stuff, superglobals
    language constants/definitions
  3. update stock.php
    hardcoded stuff, superglobals
    language constants/definitions
  4. replace mods in admin/boxes/tools.php by separate file
  5. replace mods in admin/boxes/reports.php by separate file
  6. avoid mods in admin/includes/functions/general.php
    load function file in modules
    replace core function mods by own functions?
  7. modularize product info options
  8. modularize product info stock table
  9. versions for Modular Product Page by kymation
  10. alternative product listing module for modularized shopping cart
  11. order class extension to avoid mods in core order class
  12. replace all mods in checkout files by hooks?
  13. check compatibility with ajax attribute manager
  14. add support for attribute sort order
  15. update instructions

 

Beta 02 installation

Who has the old version already installed:

  • replace the admin files

  • upload and install the product info content modules and (IMPORTANT!) uncomment the complete options/attributes section in product_info.php

  • upload all other files included in the "new files" directory
  • replace all pad class files
  • undo all modifications of the old version in:

    • includes/classes/orders.php
    • includes/functions/general.php
    • checkout_payment.php
    • checkout_confirmation.php
    • checkout_process.php

    use the files included in: "Modified files for 2.3.4 BS" or compare and apply the changes. (hook registry and hook calls)

    • keep the modifications in includes/application_top.php
    • keep the modifications in shopping_cart.php or use the included content module "product listing qtpro" instead of "product listing" for the modularized shopping cart. If you do not have the latest EDGE version with hooks support: Use the included application_top.php and copy: legacy/includes/classes/hooks.php

For new installations:

  • instructions are not updated yet

follow the old instructions except

A.: don't modify admin/includes/boxes/tools.php and reports.php, upload the new files instead

B.: upload and install the product info content modules and (IMPORTANT!) uncomment the complete options/attributes section in product_info.php instead to apply the mods

C.: apply only the modification to: - includes/application_top.php - shopping_cart.php if not modularized or use the included content module "product listing qtpro" instead of "product listing" for the modularized shopping cart.

use the files included in: "Modified files for 2.3.4 BS" or compare and apply the changes. (hook registry and hook calls)

  • checkout_payment.php
  • checkout_confirmation.php
  • checkout_process.php

    If you do not have the latest EDGE version with hooks support: Use the included application_top.php and copy: legacy/includes/classes/hooks.php

 

Steve @@altoid I'll try to fork and update via pull request your repository, so it should be easier for all to test. Give me a couple of days.

 

Scott @@greasemonkey, if you wish to give it a try now, please go ahead.

 

 

 

 

What should be tested:

Complete checkout with different product combinations and stock settings.

Redirects from checkout pages if cno stock and checkout not allowed

Downloadable products

Check stock quantities updates when an order is done.

...................whatever you can imagine.

 

There are heavy changes for all the checkout, so hardcore tests required o:) :- :thumbsup:

 

Thanks and best regards

Rainer

2 people like this

Share this post


Link to post
Share on other sites

@@raiwa I'll try and get to this this weekend.... I hadn't installed the first beta yet (other than dropping the new files in... so good timing).

Share this post


Link to post
Share on other sites

@@raiwa

I installed beta 2 and notwithstanding any mistakes, here's what I see:

 

- WARNING_SICK_PRODUCTS in /admin/qtprodoctor.php  Did I miss a language define somewhere?

 

- Just an FYI, but in php 7 for various files I am seeing this type error:

Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP

php 5.6 is OK

 

- in configuration, admin/configuration.php?gID=888001 for QT pro, it seems at least some of the settings are not used now and this is done now in the module setting instead?

 

- for and item I have one of the option values set to zero.  Example, Memory 4 mb =2, 8 mb=0 and 16 mb 06.  In the content module I have this setting:

Show Out of Stock Attributes
False

 

Yet in the product display, the 8 MB still shows.  How is that supposed to show?

 

Then over in the stock report, 8 MB is not showing at all for that product, where as 4 and 16 are.  I was thinking perhaps it would be better to show at zero than not showing at all..

 

That's it for now.

Edited by altoid
1 person likes this

Share this post


Link to post
Share on other sites

Hello Steve @@altoid,
 

- WARNING_SICK_PRODUCTS in /admin/qtprodoctor.php  Did I miss a language define somewhere?

 
Yes this is not documented, please add for now these definitions to admin/includes/languages/english.php:

// QTPro Begin
define('WARNING_SICK_PRODUCTS', 'Sick products in the database:');
define('WARNING_PRODUCT_ID', 'Product with ID ');
define('WARNING_PRODUCT_DATABASE_ENTRY_SUMMARY', 'The database entries for this products stock is messy and the summary stock calculation is wrong. Please take a look at this ');
define('WARNING_PRODUCTS_STOCK', 'products stock');
define('WARNING_PRODUCT_SUMMARY_STOCK', 'The summary stock calculation is wrong. Please take a look at this ');
define('WARNING_PRODUCT_DATABASE_ENTRY', 'The database entries for this products stock is messy. Please take a look at this ');
define('WARNING_PRODUCT_OK', 'This product is all ok.');

It will be solved in another way later.
 

- Just an FYI, but in php 7 for various files I am seeing this type error:
Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP
php 5.6 is OK

2.3.4 BS is not prepared for php7, the errors should be produced by core files/modules. As far as I know I prepared the add-on files/modules for php7.
Anyway it does the trick for now to run under php5.6.
 

- in configuration, admin/configuration.php?gID=888001 for QT pro, it seems at least some of the settings are not used now and this is done now in the module setting instead?

All configuration entries are now in the product info module, the old ones in admin/configuration have no effect. They are installed running the old sql query for now, but the next step is to integrate all database installation/update queries into the product info module.
 

- for and item I have one of the option values set to zero. Example, Memory 4 mb =2, 8 mb=0 and 16 mb 06. In the content module I have this setting:
Show Out of Stock Attributes
False

Yet in the product display, the 8 MB still shows. How is that supposed to show?

I'll have a look at this, it's supposed it should not show there.
 

Then over in the stock report, 8 MB is not showing at all for that product, where as 4 and 16 are. I was thinking perhaps it would be better to show at zero than not showing at all..

Yes, the display seems to be a bit buggy, sometimes 0 stocked attributes show, sometimes they do not show. I'll have a look at this.
Anyway if you add a quantity>0 it shows.

Thanks and kind regards
Rainer

Share this post


Link to post
Share on other sites
- for and item I have one of the option values set to zero.  Example, Memory 4 mb =2, 8 mb=0 and 16 mb 06.  In the content module I have this setting:

Show Out of Stock Attributes

False

 

Yet in the product display, the 8 MB still shows.  How is that supposed to show?

I had a look and I believe you have 8mb in stock for one of the other options, Value or Premium if we speak about "Matrox G200 MMS".

If you set stock for both 8mb combinations to zero, it will not show in "base", "multiple_dropdowns" and "sequenced_dropdowns".

 

If you use "single_drop_down" or "single_radioset", the unavailable combination will not show.

 

rgds

Rainer

Share this post


Link to post
Share on other sites

@@raiwa Just to confirm... these are no longer required then....

# Insert configuration group for Product Information page
DELETE FROM configuration_group WHERE configuration_group_id=888001;
INSERT INTO configuration_group (configuration_group_id, configuration_group_title, configuration_group_description, sort_order, visible) VALUES (888001, 'Prod Info (QTPro)', 'Configuration options for the Product Information page. This configuration menu is acctually the menu for the contribution QTPro.', 8, 1);

# Insert configuration keys for Product Information Page
DELETE FROM configuration WHERE configuration_key='PRODINFO_ATTRIBUTE_PLUGIN';
INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added, use_function, set_function) VALUES ('Product Info Attribute Display Plugin', 'PRODINFO_ATTRIBUTE_PLUGIN', 'multiple_dropdowns', 'The plugin used for displaying attributes on the product information page.', 888001, 1, now(), NULL, 'tep_cfg_pull_down_class_files(\'pad_\',');

DELETE FROM configuration WHERE configuration_key='PRODINFO_ATTRIBUTE_SHOW_OUT_OF_STOCK';
INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added, use_function, set_function) VALUES ('Show Out of Stock Attributes', 'PRODINFO_ATTRIBUTE_SHOW_OUT_OF_STOCK', 'True', '<b>If True:</b> Attributes that are out of stock will be displayed.<br /><br /><b>If False:</b> Attributes that are out of stock will <b><em>not</em></b> be displayed.</b><br /><br /><b>Default is True.</b>', 888001, 10, now(), NULL, 'tep_cfg_select_option(array(\'True\', \'False\'),');

DELETE FROM configuration WHERE configuration_key='PRODINFO_ATTRIBUTE_MARK_OUT_OF_STOCK';
INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added, use_function, set_function) VALUES ('Mark Out of Stock Attributes', 'PRODINFO_ATTRIBUTE_MARK_OUT_OF_STOCK', 'Right', 'Controls how out of stock attributes are marked as out of stock.', 888001, 20, now(), NULL, 'tep_cfg_select_option(array(\'None\', \'Right\', \'Left\'),');

DELETE FROM configuration WHERE configuration_key='PRODINFO_ATTRIBUTE_OUT_OF_STOCK_MSGLINE';
INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added, use_function, set_function) VALUES ('Display Out of Stock Message Line', 'PRODINFO_ATTRIBUTE_OUT_OF_STOCK_MSGLINE', 'True', '<b>If True:</b> If an out of stock attribute combination is selected by the customer, a message line informing on this will displayed.', 888001, 30, now(), NULL, 'tep_cfg_select_option(array(\'True\', \'False\'),');

DELETE FROM configuration WHERE configuration_key='PRODINFO_ATTRIBUTE_NO_ADD_OUT_OF_STOCK';
INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added, use_function, set_function) VALUES ('Prevent Adding Out of Stock to Cart', 'PRODINFO_ATTRIBUTE_NO_ADD_OUT_OF_STOCK', 'True', '<b>If True:</b> Customer will not be able to ad a product with an out of stock attribute combination to the cart. A javascript form will be displayed.', 888001, 40, now(), NULL, 'tep_cfg_select_option(array(\'True\', \'False\'),');

DELETE FROM configuration WHERE configuration_key='PRODINFO_ATTRIBUTE_ACTUAL_PRICE_PULL_DOWN';
INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added, use_function, set_function) VALUES ('Use Actual Price Pull Downs', 'PRODINFO_ATTRIBUTE_ACTUAL_PRICE_PULL_DOWN', 'False', '<font color="red"><b>NOTE:</b></font> This can only be used with a satisfying result if you have only one option per product.<br /><br /><b>If True:</b> Option prices will displayed as a final product price.<br /><br /><b>Default is false.</b>', 888001, 40, now(), NULL, 'tep_cfg_select_option(array(\'True\', \'False\'),');

DELETE FROM configuration WHERE configuration_key='PRODINFO_ATTRIBUTE_DISPLAY_STOCK_LIST';
INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added, use_function, set_function) VALUES ('Display table with stock information', 'PRODINFO_ATTRIBUTE_DISPLAY_STOCK_LIST', 'True', '<b>If True:</b> A table with information on whats on stock will be displayed to the customer. If product doesn\'t have any attributes with tracked stock; the table won\'t be displayed.<br /><br /><b>Default is true.</b>', 888001, 50, now(), NULL, 'tep_cfg_select_option(array(\'True\', \'False\'),');

Share this post


Link to post
Share on other sites

@@raiwa ok here is short list from the install so far:

 

1) the English defines for the reports and tools admin boxes are missing...

 

2) Getting this on qtprodoctor.php

 Fatal error: Call to undefined function qtpro_normal_product_count() in /home/XXXXXXXXX/public_html/sandbox/admin/qtprodoctor.php on line 67

Should the function not be included/required somewhere????

  require('includes/functions/qtpro_functions.php');

Now just trying to figure out how to use it.... I will go through the manual and report back anything else...

Share this post


Link to post
Share on other sites

@@greasemonkey,

 

the mods in admin/includes/functions of the original instructions need to be applied. No way to avoid this.

 

for the database, please use the following update beta 03.

The database installation is included now in the product info module.

 

Beta 03

 

To do list:

  1. update qtprodoctor.php
    hardcoded stuff, superglobals
    language constants/definitions
  2. update stats_low_stock_attrib.php
    hardcoded stuff, superglobals
    language constants/definitions
  3. update stock.php
    hardcoded stuff, superglobals
    language constants/definitions
  4. replace mods in admin/boxes/tools.php by separate file
  5. replace mods in admin/boxes/reports.php by separate file
  6. avoid mods in admin/includes/functions/general.php => not possible
    load function file in modules=> not possible
    replace core function mods by own functions? => not possible
  7. modularize product info options
  8. modularize product info stock table
  9. versions for Modular Product Page by kymation
  10. alternative product listing module for modularized shopping cart
  11. order class extension to avoid mods in core order class
  12. replace all mods in checkout files by hooks?
  13. Integrate database changes in product info module
  14. Move stock checks in checkout_payment.php and checkout_confirmation.php to ht module
  15. check compatibility with ajax attribute manager
  16. add support for attribute sort order
  17. update instructions

 

 

 

Store side is now finished.

 

Please revert all changes in:

- checkout_payment.php

- checkout_confirmation.php

 

and install the new ht_qtpro_stock_check module instead.

 

thanks

Rainer

 

Share this post


Link to post
Share on other sites

1) the English defines for the reports and tools admin boxes are missing...

 

needs to be added for now to the main language file, I'll work on this now to move it to box language modules.

Thank you

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now