Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Recommended Posts

7 hours ago, lucsangel said:

THEY probably have operational sites and are in panic mode and we need to find solutions for the most appreciated add-ons like this one.

1. There is no server/hosting right now which would suddenly switch on their own to PHP7.2 and which would not offer at least PHP7.1.

2. You still didn't explain how you get a warning message to display on the checkout_process.php page.

3. If you are so interested in finding a solution, why don't you give the information I requested twice so I can try to recreate this error:

On 11/2/2018 at 2:37 PM, raiwa said:

I can't recreate this error.

Can you please post your stock configuration settings and all info about the product and options/attributes for which this error appears. 

4. Yes I'm offended if someone tries to make pressure on getting help arguing that " Had to shut it down as the errors showed publicly so I can not get back in. "

and then says that it is a develop/test store.

Edited by raiwa
Link to comment
Share on other sites

Rainer I have for years promoted your add-ons as I feel they are excellent and recommend them to everyone. And yes there are hosters out there who are apparently trying to get onto PHP 7.2 as fast as possible (why on earth I do not know why, just noted that some going to the cloud now are forcing as if the cloud needs it), stating that as of Dec. 2018 they will be charging for support if not accepting the change ! One of my hosters does give till dec. 2019 before charging but as I have diversified hosting to test for those people that I help on the most popular hosters I find the problems they have myself with brutal surprises. And yes I have folks in "panic" mode as you call it because time is too short to find and switch hosters in such a short delay. I know I can count on certain "Ambassadors" and others when there is a problem as they are the ones who wrote the code. SInce I had always had little problems with this add-on I slipped it into the new test for FROZEN BS4 on my public site sure not to have a problem on PHP7.1 as I am trying to promote the excellent responsive work that everyone has done on it.

I was not putting "pressure" on you... I only made one post without begging you to find an answer ! You are offended and I am too. I pulled the site temporarily as I have to help the others I assist for free as this does not bring me a dime but takes a hell of a lot of time.

So I will not bother you any longer. Once I help the others, hoping they won't ask for this add-on, I will be slipping the new test site on to another hoster and in the meantime just work with those on the FROZEN version BS3.

Bobbee

Link to comment
Share on other sites

@lucsangel Bobbee,

I still wasn't able to reproduce the error, but please give this a try and let me know if it fixes the error:

in: includes/hooks/shop/checkout_process/qtpro_hooks.php change line 29 to:

      $check_stock = array();

 

Link to comment
Share on other sites

Update uploaded with the above fix:

https://apps.oscommerce.com/e317m&qtpro-bs

Changes versus QTpro 5.6.3 BS

- fixed warning error in includes/hooks/shop/checkout_process/qtpro_hooks.php. Thanks to @lucsangel for the report

Link to comment
Share on other sites

Raiwa, I'm not sure if this is a bug or not.  It may only have been behaving like this on my site but thought I'd feed back to you.

I'm on OSCommerce v2.3.4.1 CE  and installed QTPro 2.3.4.1. CE

When I have products with attributes attached, all behaves well with the QTPro add on -   the admin/stock.php page.  I can add stock, I can delete all stock and start again.  All fine.

However, on my site I have some products that don't have attributes attached and I just rely on the table = products,  products_quantity field for the products quantity.    
When I add stock to one of these products I don't expect it to create an entry in products_stock also.     Which is does with the current add on - as the button defaults to Add not Update when stock is 0.

The problem being, the Add button automatically creates an entry corresponding to the products id in table products_stock.    So what's the problem with that?   Well on products WITHOUT attributes, it causes the QTPro doctor to complain that this is a 'sick' product.  

I got round it in the end, and changed your code - about line 220  (($db_quantity)? BUTTON_UPDATE : BUTTON_ADD )

to

($flag? BUTTON_ADD : BUTTON_UPDATE )

going back to the original way, from an older QTPro contribution.  I tweaked in a couple of other places, but this seems to work.    I don't know if I'm causing myself other problems here, hopefully not, but now I can take a product without attributes down to 0 stock again, then add stock back to it - now the button is Update not Add!!  and no 'sick product' messages in QTPro doctor and no forced entry into table products_stock.   

If you have a better solution, please let me know.  Otherwise this is just feedback on problems encountered. 

 

Link to comment
Share on other sites

Hello @Rosyweb,

This is strange. I get just the opposite results.

With "$db_quantity" I get the correct "Update" button shown for products without attribute.

With "$flag" I get the "Add" button.

This is the expected behaviour.

$db_quantity is set to the products quantity if the product has no attributes or attributes track stock is not set. Otherwise it's false.

$flag is just opposite, it's set to "1" if the product has attributes which are set to track.

So I would say there is something wrong wwith your installation.

I can set the stock to 0 and back to a quantity and do not get wrong sick products messages. All with the original code ($db_quantity)

 

Edited by raiwa
Link to comment
Share on other sites

On 11/4/2018 at 6:16 PM, raiwa said:

- fixed warning error in includes/hooks/shop/checkout_process/qtpro_hooks.php. Thanks to @lucsangel for the report

Hello @raiwa
The fix not applied to  2.3.4.1 CE Frozen file yet
Br
Omar

Edited by Omar_one

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

Link to comment
Share on other sites

22 hours ago, Omar_one said:

Hello @raiwa
The fix not applied to  2.3.4.1 CE Frozen file yet
Br
Omar

Thank you @Omar_one. New package with the fix has been uploaded.

Link to comment
Share on other sites

19 hours ago, raiwa said:

Thank you @Omar_one. New package with the fix has been uploaded.

In the update I see two different file paths for Frozen vs Edge

Frozen\catalog\includes\hooks\shop\checkout_process
EDGE\catalog\includes\hooks\shop\qtpro

I am not a professional webmaster or PHP coder by background or training but I will try to help as best I can.

I remember what it was like when I first started with osC. It can be overwhelming.

However, I strongly recommend considering hiring a professional for extensive site modifications, site cleaning, etc.

There are several good pros here on osCommerce. Look around, you'll figure out who they are.

Link to comment
Share on other sites

Thats correct. As Frozen auto registers hooks using the filename, it needed to be adapted.

Link to comment
Share on other sites

27 minutes ago, raiwa said:

Thats correct. As Frozen auto registers hooks using the filename, it needed to be adapted.

OK..thanks.  I stick with Frozen for a while.

I am not a professional webmaster or PHP coder by background or training but I will try to help as best I can.

I remember what it was like when I first started with osC. It can be overwhelming.

However, I strongly recommend considering hiring a professional for extensive site modifications, site cleaning, etc.

There are several good pros here on osCommerce. Look around, you'll figure out who they are.

Link to comment
Share on other sites

  • 3 weeks later...

This may be a silly question but I cannot find an answer myself...

Imagine you have shirts on sale. You have color (2) and size (2) as options.

You sell these products only:

  • Size: small, Color: red
  • Size: small, Color: blue
  • Size: large, Color: blue

You don't sell this option:

  • Size: large, Color: red

If you build a product with those stock options the unwanted fourth product option will be added with no stock, even if you have track stock set up for both attributes of the product. Is it correct or I'm missing something?

Also, is there a way to sell only the three options marked only without the fourth one if stock check is set to false?

Edited by piernas
Link to comment
Share on other sites

Hola Juanma,

6 hours ago, piernas said:

If you build a product with those stock options the unwanted fourth product option will be added with no stock, even if you have track stock set up for both attributes of the product. Is it correct or I'm missing something?

In the product info QTPRO Options module: Show Out of Stock Attributes => False

6 hours ago, piernas said:

Also, is there a way to sell only the three options marked only without the fourth one if stock check is set to false?

Not sure what you mean here:

1. admin => configuration => stock => Check stock level

or

2. admin => products attributes => Product Options  => Track Stock

1 has no influence, 2 if set to false, it is not possible to hide because there is no combination (stock) control applied. The individual option "red" is available, so it will show.

Mientras tanto, has podido comprobar una vez más los errores en ajax attributes manager??

Saludos cordiales
Rainer

Link to comment
Share on other sites

  • 5 months later...

When I go to admin/qtprodoctor.php I get the following message:
"In the database we currently have 3 trash rows"

There is no further information, and I have fixed all the products that had a faulty stock.

I looked into the code for admin/includes/functions/qtpro_functions.php and find the functions for the Trash-Tools (around line 460).
But I couldn't figure out what the functions qtpro_stock_row_is_trash() and qtpro_number_of_trash_stock_rows() actually checks.

I did a quick query in phpmyadmin to find for duplicats in the table PRODUCT_STOCKS:
 

SELECT
    products_id, products_stock_attributes, COUNT(*)
FROM
    products_stock 
GROUP BY
    products_id, products_stock_attributes
HAVING 
    COUNT(*) > 1

But the results was zero.

So what and where does the functions qtpro_stock_row_is_trash() and qtpro_number_of_trash_stock_rows() checks?
 

Link to comment
Share on other sites

Hello Fredrik @redrum,

First of all to say that I didn't write the contribution from the beginning. I only updated and adapted it to the BS Community edition and higher PHP versions.

I didn't digg into these functions until now, but tried to follow up how it works.

If you check the mentioned functions, you'll see that they use "qtpro_product_exists". Which checks if the product whos id is stored in the stock table still exists.

If you delete a product and don't remove the options/attributes of the product, the stock entry still is in the stock table even the asociated product has been removed. This produces that error message.

When I find some time I'll research further how to avoid it.

Best regards
Rainer

Link to comment
Share on other sites

Thank you so much for your quick and informative reply, @raiwa
Yes that makes sense, I had my suspicions about something like that when I continued to look at it after my post.

If I want to find the lost product IDs I guess I should write some kind of query to locate them. But for now I will keep it as it is. It shouldn't do any harm and my time is limited right now.
Thanks again :)
 

Link to comment
Share on other sites

  • 3 months later...

Hello Rainer,

Sorry to bother you but I have a problem with QTPRO on Phoenix 1.0.14 running on php 7.2 not showing the option dropdown. Works great on FROZEN but does not show on Phoenix whereas the stock attribute dropdown does work when I uninstall the QTPRO (v. BS 5.6.4). There are no warnings in the logs so is it something in the formating in the pad classes? That I would not know how to change. When you have time could you test it and let me know?

Thanks in advance,

Barbie

Link to comment
Share on other sites

Hello @artfulweb

It needs to be updated for Phoenix. Please be patient. It's on my to do list

Link to comment
Share on other sites

  • 2 weeks later...

We are building a new site right now with Phoenix and we'll need to use this add-on. Although it may not be ready I"m wondering if the database structure will remain the same as previous versions of OSC? Or is it too soon to tell?

I can do a lot of database work in the meantime if so.

Thank you @raiwa and all!

 

Edited by NodsDorf
Link to comment
Share on other sites

Hello Don @NodsDorf,

Database structure should stay identical, but I'm not sure if QTPRo will be updated soon. There is a mayor update for Phoenix announced which probably includes a different/updated options/attributes system including stock control. SO it may not make sense anymore to use QTPro.

I have for now other Addons in front which for sure need the update. Sorry!

Edited by raiwa
Link to comment
Share on other sites

Hi Rainer,

I am sure there must be others like me who use QTPro not just for the stock handling but also for the fact that we can use options as images in multiple dropdowns, something that the Options as Images add-on can not do itself. It worked great on Frozen BS3 but for the life of me I can not get the attribute drop downs to show on Phoenix 1.0.2.2! The admin works great, it is just the drop downs on the store front that do not. As I do not think they are going to add this capability to the options it would be great to have a solution before scrapping the images (just text does not help the customer when there are sometimes 50+ colors in addition to regular text options like size. What do you think?

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...