Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Recommended Posts

@raiwa, I have installed your app Ajax Attribute Manager BS, I can sort the colors in COLOR and the sizes in SIZES, but I don't know how to show in product_info the COLOR dropdown up the SIZE dropdown, seems to something was missing

Edited by PiLLaO
Link to comment
Share on other sites

@PiLLaO,

In Admin/attributeManager/classes/attributeManagerConfig.class.php

         $this->add('AM_USE_SORT_ORDER' , true);

Then open/reload a product page in admin, this will add the database columns.

Then the arrows beside the options should be used to move them up down and control like this the sort order.

I checked and found that it only works for the attribute values, but not for the options itself. So for now you can edit the sort order directly in the database:

Table " products_options", column " products_options_sort_order "

Make sure you have set " Use Option/Attribute Sort Order " to "true"

 

I'll have also a look on this.

 

Link to comment
Share on other sites

2 minutes ago, raiwa said:

@PiLLaO,

In Admin/attributeManager/classes/attributeManagerConfig.class.php

         $this->add('AM_USE_SORT_ORDER' , true);

Then open/reload a product page in admin, this will add the database columns.

Then the arrows beside the options should be used to move them up down and control like this the sort order.

I checked and found that it only works for the attribute values, but not for the options itself. So for now you can edit the sort order directly in the database:

Table " products_options", column " products_options_sort_order "

Make sure you have set " Use Option/Attribute Sort Order " to "true"

 

I'll have also a look on this.

 

All configurations are ok, no need to configure or install.

This column have all values in zero, I change it directly.

Thank you so much :)

Link to comment
Share on other sites

On 25/11/2017 at 2:55 PM, PiLLaO said:

Hello,

Modified file admin/products_attributes.php file 78:


tep_db_query("insert into " . TABLE_PRODUCTS_ATTRIBUTES . " values (null, '" . (int)$products_id . "', '" . (int)$options_id . "', '" . (int)$values_id . "', '" . (float)tep_db_input($value_price) . "', '" . tep_db_input($price_prefix) . "')");

Must be:


tep_db_query("insert into " . TABLE_PRODUCTS_ATTRIBUTES . " (products_id, options_id, options_values_id, options_values_price, price_prefix) values ('" . (int)$products_id . "', '" . (int)$options_id . "', '" . (int)$values_id . "', '" . (float)tep_db_input($value_price) . "', '" . tep_db_input($price_prefix) . "')");

 

Hello Gustavo @PiLLaO,

This is not QTPro related. This happens when you have additional columns added to the products_attributes table, most probably by the Ajax Attribute Manager installation for sort_order or others .

If you set the configuration of Ajax attribute manager to use sort order, you need to add the sort order add-on modifications to admin/product_attributes.php in order to use it there. Otherwise you can only use the Ajax attribute manager to add options/attributes to products.

 

rgds

Rainer

Link to comment
Share on other sites

On 25/11/2017 at 5:32 PM, PiLLaO said:

Fixed with this:


// options images added by @raiwa
    $q=tep_db_query($sql="select products_name, products_options_name as _option, products_attributes.options_id as _option_id, products_options_values_name as _value, " . ((AM_USE_IMAGE == true) ? 'option_image as _image, ' : '') . "products_attributes.options_values_id as _value_id from ".
                  "products_description, products_attributes, products_options, products_options_values where ".
                  "products_attributes.products_id = products_description.products_id and ".
                  "products_attributes.products_id = '" . $products_id . "' and ".
                  "products_attributes.options_id = products_options.products_options_id and ".
                  "products_attributes.options_values_id = products_options_values.products_options_values_id and ".
                  "products_description.language_id = " . (int)$languages_id . " and ".
                  "products_options_values.language_id = " . (int)$languages_id . " and products_options.products_options_track_stock = 1 and ".
                  "products_options.language_id = " . (int)$languages_id . " order by products_attributes.options_id, products_attributes.options_values_id");

Hello Gustavo @PiLLaO,

This fix is already included in the latest version 2.9.1 from August 2017 following your report and suggestion.

"la edad no perdona :biggrin:"

Thanks anyway Rainer

 

Edited by raiwa
Link to comment
Share on other sites

1 hour ago, raiwa said:

Hello Gustavo @PiLLaO,

This is not QTPro related. This happens when you have additional columns added to the products_attributes table, most probably by the Ajax Attribute Manager installation for sort_order or others .

If you set the configuration of Ajax attribute manager to use sort order, you need to add the sort order add-on modifications to admin/product_attributes.php in order to use it there. Otherwise you can only use the Ajax attribute manager to add options/attributes to products.

 

rgds

Rainer

This error are in the files to replace, before replace the file I haven't this error.

If you see the columns, are the original columns, and the fix is take from original file.

Best Regards :)

Link to comment
Share on other sites

@PiLLaO,

Maybe I miss something, but this line:

        tep_db_query("insert into " . TABLE_PRODUCTS_ATTRIBUTES . " values (null, '" . (int)$products_id . "', '" . (int)$options_id . "', '" . (int)$values_id . "', '" . (float)tep_db_input($value_price) . "', '" . tep_db_input($price_prefix) . "')");

is identical in the original 2.3.4 BS core file (latest EDGE form 30 of August 2017) and in the provided modified file of the QTPro package.

If you have your fix in your original file it's because you modified it.

In a standard installation without options images or sort order columns added to the options table, it works for me without error.

Link to comment
Share on other sites

  • 3 weeks later...

Hi Rainer @raiwa

I find en DDBB that the stock in attribute are store in "products_stock" table instead of "products_attributes" table with price and weight.

Don't be more easy that stock will store in "products_attributes" too?

maybe this addon worked always just like that?

 

By the way, I'm looking how to set products stock in QTPro for all products like "quick update products stock" (https://apps.oscommerce.com/OcMRh&quickly-update-product-stock) where you can choose categories or manufacturer and adjust stock.

Is possible in QTPro? I don't find it.

Thanks in advance.

Gustavo

Link to comment
Share on other sites

1 hour ago, PiLLaO said:

I find en DDBB that the stock in attribute are store in "products_stock" table instead of "products_attributes" table with price and weight.

Don't be more easy that stock will store in "products_attributes" too?

maybe this addon worked always just like that?

Hola Gustavo @PiLLaO,

The qtpro stock is stored in a separate table, because the stock is stored for option/attribute combinations. There may be more than one row in prodcusts_attributes affected so it must be stored in a separate table.

1 hour ago, PiLLaO said:

By the way, I'm looking how to set products stock in QTPro for all products like "quick update products stock" (https://apps.oscommerce.com/OcMRh&quickly-update-product-stock) where you can choose categories or manufacturer and adjust stock.

Is possible in QTPro? I don't find it.

This dosn't exist yet in qtpro, it would be a point to take in consideration for future versions.

Thank you and kind regards

Rainer

Link to comment
Share on other sites

I see a problem, when I create an option in a product, don't create this attribute option stock in DDBB.

So, If don't exist in DDBB I can't update stock :(

The products attributes needs attention of oscommerce people, It is very obsolete :( :( :( 

Regards :)

Gustavo

Link to comment
Share on other sites

Hola Gustavo @PiLLaO,

Did you flag the new option for stock control (  Track Stock? ) in products_attributes.php?

Link to comment
Share on other sites

7 hours ago, PiLLaO said:

By the way, I'm looking how to set products stock in QTPro for all products like "quick update products stock" (https://apps.oscommerce.com/OcMRh&quickly-update-product-stock) where you can choose categories or manufacturer and adjust stock.

Is possible in QTPro? I don't find it.

Thanks in advance.

Gustavo

@PiLLaO @raiwa  I think the best things for that to modified  stats_low_stock_attrib.php from QTPro add the Categories and Manufacturers menus(filter) and editing some code there and  using jQuery Ajax for Inline Editing in that file ,

Br
Omar

Get the latest Responsive osCommerce CE (community edition) here .

Link to comment
Share on other sites

On 15/12/2017 at 6:06 PM, raiwa said:

Hola Gustavo @PiLLaO,

Did you flag the new option for stock control (  Track Stock? ) in products_attributes.php?

Hi Rainer @raiwa

I think that I find "the problem"

When you add an option... you must to set the stock for this option or is automatic?

Thanks!

Gustavo

Edited by PiLLaO
Link to comment
Share on other sites

Link to comment
Share on other sites

  • 1 month later...

Hi I was looking for some help in regards to setting up multiple options for 1 item in my shop.

I have recently installed v2.3.4 BS [EDGE] along with QT Pro v2.3.4 and this is all setup correctly. The problem I have is that I am looking to setup the following attributes for 1 product but getting a bit confused when setting this up, hence I thought I would ask for some help.

image.png.cdf9987cade3be1ed59dcb00ff000289.png

I have setup the product attributes (prod_attr.jpg attached) with the options, option values and the attributes. I have also setup the product stock page (prod_stock.jpg attached). The confusing thing on this page is that I have 2 boxes for Quantity, but I have added a high total for the default quantity as this is business cards the item doesnt really go out of stock, its down to as and when this is ordered.

The last page (prod_page.jpg) shows the product page, but for some reason the drop down shows duplicate values and for the options [1000], [Single Sided] it doesnt show the correct price.

Would really appreciate if if somebody could advise on where I am going wrong and how i can fix this.

Thanks in advance.

prod_attr.jpg

prod_page.jpg

prod_stock.jpg

Link to comment
Share on other sites

Hi @raiwa ,

sadly i have noticed, that qtpro doctor is slowing down admin/categories.php heavily. We have 256  products with tracked stock, which often means over 25 combinations per product, I guess this produces big load on mysql as admin/qtprodoctor.php is also very slow.

It got really very much faster after commenting out 

//Create the product investigation for this product that are used in this page.

and the following lines out of categories.php

Best regards

Christoph

Link to comment
Share on other sites

Hello Christoph,

Thanks for the advice. I didn't touch that part of qtpro for the update to BS, so it is still the old coding from previous versions there.

Knowing that, maybe it would be good to add a switchable configuration setting or an option to check only if needed. I'll have a look on this for the next update.

rgds

Rainer

Link to comment
Share on other sites

2 hours ago, aftabn10 said:

Hi I was looking for some help in regards to setting up multiple options for 1 item in my shop.

I have recently installed v2.3.4 BS [EDGE] along with QT Pro v2.3.4 and this is all setup correctly. The problem I have is that I am looking to setup the following attributes for 1 product but getting a bit confused when setting this up, hence I thought I would ask for some help.

image.png.cdf9987cade3be1ed59dcb00ff000289.png

I have setup the product attributes (prod_attr.jpg attached) with the options, option values and the attributes. I have also setup the product stock page (prod_stock.jpg attached). The confusing thing on this page is that I have 2 boxes for Quantity, but I have added a high total for the default quantity as this is business cards the item doesnt really go out of stock, its down to as and when this is ordered.

The last page (prod_page.jpg) shows the product page, but for some reason the drop down shows duplicate values and for the options [1000], [Single Sided] it doesnt show the correct price.

 

Actual price (not attribute price difference) is not suppoeted for single drop down. Please see the following note:

Use Actual Price Pull Downs
NOTE: If you have more than one option per product, this can only be used with a satisfying result with single_dropdown or single_radioset.
If True: Option prices will displayed as a final product price.
Default is false.
 

rgds

Rainer

Link to comment
Share on other sites

  • 1 month later...

Hello,

What's the function of save "products_stock_attributes" in "orders_products"?

I can not find the use, but I think it will be there for something

EDITED: the reason is "tep_remove_order"

Best regards :)

Edited by PiLLaO
Link to comment
Share on other sites

  • 3 months later...

I'm having a problem with shopping_cart.php after installation. Cart is throwing this error:

Fatal error:  Uncaught Error: Call to undefined function check_stock_qtpro() in E:\___\qtpro\includes\modules\content\shopping_cart\cm_sc_product_listing_qtpro.php:91
Stack trace:
#0 E:\___\qtpro\includes\classes\osc_template.php(146): cm_sc_product_listing_qtpro->execute()
#1 E:\___\qtpro\shopping_cart.php(16): oscTemplate->getContent('shopping_cart')
#2 {main}
  thrown in E:\___\qtpro\includes\modules\content\shopping_cart\cm_sc_product_listing_qtpro.php on line 91

The content module is looking for the function and can't find it.

            $stock_check = check_stock_qtpro($products[$i]['id'], $products[$i]['quantity'], $products[$i]['attributes']); 

As far as I can find that function is defined twice, once in includes\hooks\shop\qtpro\qtpro_hooks.php and another time in includes\classes\pad_base.php

If I'm not wrong none of them can be accessed from shopping_cart.php.

Someone has modular shopping cart working with qtpro?

Link to comment
Share on other sites

New version 5.6 for 2.3.4.1. CE Frozen uploaded:

QTpro BS 5.6.

Compatibility:

OsC 2.3.4.1. CE Frozen

PHP: 5.6 - 7.2

Changes versus QTpro 5.5r1 BS

- Updated for 2.3.4.1. CE Frozen

- Updated template naming and auto inclusion in content modules

- cleaned code and fixed undefined errors in stats_low_stock_attrib.php

- updated included modified core files to CE Frozen

- included modified action class "add_product.php"

- updated hook for auto register naming convention

- tested with PHP 7.2

Version 5.5r2 for 2.3.4.(1.) EDGE included

Changes versus QTpro 5.5r1 BS

- fixed missing function error in shopping cart module

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...