Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

QTPro Contribution question


Guest

Recommended Posts

Thanks Lynda,

Actually I posted the code in another thread for allowing the (non-special) products to remain live in the shop when out of stock even though you are subtracting the stock. QTPro does this by default if you set 'check stock' to 'True' (or was it 'Yes') in admin.

 

As for the products with multiple attributes, the forums threads state that although QTPro can check the stock it cannot subtract it (as it does with single attributes). Also in the products_info.php that came with QTpro Notes you will notice that only one of the attribute headings shows up.

ibwo wrote on 1st Jul:

Anyway, to all that interested in attributes stock tracking. Qtpro doesn't work with multiple attributes. For e.g. A shirt with color and size options. It cant match the product_stock_attributes during checkout_process. But it can check the stock.

If you have code that fixes these things do tell.

Link to comment
Share on other sites

All I can say is that its working fine for me, even on products with multiple attributes. I don't know if its because of any of the other contributions that I'm using - my code is now fairly heavily modified, so its difficult to tell!

 

PLEASE NOTE THIS IS A LIVE STORE. DO NOT PLACE ORDERS UNLESS YOU REALLY WANT THE PRODUCTS!!!

 

As far as the attributes heading goes, I have that problem, but I can live with it. Don't know how you'd fix it, sorry. (TBH I haven't tried - too many other things to fix!)

 

Sorry I can't be more help than that.

Link to comment
Share on other sites

The other thing with multiple attributes that I had to work around is that products_quantity is set to zero by the admin module leading to the product although appearing, being labelled 'out of stock'. I have changed this to say 'items in stock listed below'.

 

Could you pm me a copy of your checkout_process.php if you are sure it is updating the stock for the product (impossible to tell from the catalog), pretty please.

Link to comment
Share on other sites

I can't any longer reproduce the 'out of stock' problem so let's move on to the good news!

If you are using multiple options in qtpro (eg. size, colour) and find that only one of the option headings displays in product info, I have a very simple fix to the product_info.php of qtpro. Just comment out this line like this:

// $titles = array();

The array is then created automatically and the code works (don't ask me why!)

Then for neatness add a few more spaces (nbsp;) in the line that prints the options titles so it looks like this:

      echo "     <b>".implode(" ,     ",$titles)."</b><br>";

Link to comment
Share on other sites

I have the last piece of the puzzle. :!:

The reason why the stock attributes were not updating when there were multiple attributes was that these lines in checkout_process had been commented out.

/* if ($products_attributes[$k]['special'] == 0) {

$products_stock_attributes_array[] = $products_attributes[$k]['option_id']."-".$products_attributes[$k]['value_id'];} */

Removing the comments and adding the } at the end of the line (which was missing in the file I had) alllows the attributes to be updated rather than just the overall stock.

Link to comment
Share on other sites

There's no official site any more, we are on our own! It is fairly easy to install on MS1 and has certainly made my life easier since I took the plunge. As for an MS2 version, you may have a long wait (unless you'd like to have a go at making one).

Link to comment
Share on other sites

  • 2 years later...

Does anyone know how to put a total stock available before the quantity input in shopping_cart.php with Qt pro?

Would be nice if someone don't have to guess how many products are in stock from a product with the given atributes.

Thanks

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