Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[Contribution] QTpro - Quantity Tracking Professional


zonetown

Recommended Posts

Thanks for the reply.

You guessed correctly - I am changing the stock from the stock.php page via a link from stats_low_stock_attrib.php.

I have quite a recent version of QTPro, 4.51, but I still get this problem. Therefore I doubt that upgrading will help me. I don't suppose you know how to fix this bug ...or can direct me to a page that has a fix?

 

Nick

 

In addition to the above I think I should clarify exactly what the problem is.

When i adjust the stock level to 0 from the stock.php page the attribute no longer shows up in stats_low_stock_attrib.php.

 

However, if the stock level is reduced to 0 naturally (i.e. as the result of a product sale), the attribute remains present in stats_low_stock_attrib.php with a correctly adjusted stock level of 0.

 

...so it is only when i manually adjust the stock level of an attribute that it ceases to be present in stats_low_stock_attrib.php

 

.....hmmmmmmm

Link to comment
Share on other sites

How can I change where the options are displayed on the product information page?

 

Thanks

 

You just have to play around with html and css to position it the way you want it, thats what i did.

Trial and error.

 

But i also have a question.

For some reason when i use sequenced dropdowns, i do not get the "First select xxx" "Next select xxx" in the drop downs.

Also it shows the selection that are not in stock, but when i add them to cart it says they are out of stock. I don't want people to add things to cart just to find out they are not available.

 

Any ideas?

Link to comment
Share on other sites

  • 2 weeks later...

I posted this on the WPP forum, but am posting here as well. Has anyone figured out how to get the attribute's stock to reduce when a purchase is made with Paypal? I am using Dynamoeffects' Website Payments Pro contribution and it does not utilize the Auto-Return or IPN options in Paypal.

Link to comment
Share on other sites

in the install i have to change a few file that are drifrent then mine i am useing the MNK Edition of osc one if the files is the catalog/admin/includes/boxes/reports.php

this is what my file looks like

 

<?php

/*

$Id: reports.php 1739 2007-12-20 00:52:16Z hpdl $

 

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright © 2002 osCommerce

 

Released under the GNU General Public License

*/

?>

<!-- reports //-->

<tr>

<td>

<?php

$heading = array();

$contents = array();

 

$heading[] = array('text' => BOX_HEADING_REPORTS,

'link' => tep_href_link(FILENAME_STATS_PRODUCTS_VIEWED, 'selected_box=reports'));

 

if ($selected_box == 'reports') {

$contents[] = array('text' => tep_admin_files_boxes(FILENAME_STATS_PRODUCTS_VIEWED, BOX_REPORTS_PRODUCTS_VIEWED) .

tep_admin_files_boxes(FILENAME_STATS_PRODUCTS_PURCHASED, BOX_REPORTS_PRODUCTS_PURCHASED).

tep_admin_files_boxes(FILENAME_STATS_CUSTOMERS, BOX_REPORTS_ORDERS_TOTAL ).

tep_admin_files_boxes(FILENAME_STATS_SALES, BOX_REPORTS_SALES ));

}

 

$box = new box;

echo $box->menuBox($heading, $contents);

?>

</td>

</tr>

<!-- reports_eof //-->

 

this what the install file looks like

 

<?php

/*

$Id: reports.php 1739 2007-12-20 00:52:16Z hpdl $

 

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright © 2002 osCommerce

 

Released under the GNU General Public License

*/

?>

<!-- reports //-->

<tr>

<td>

<?php

$heading = array();

$contents = array();

 

$heading[] = array('text' => BOX_HEADING_REPORTS,

'link' => tep_href_link(FILENAME_STATS_PRODUCTS_VIEWED, 'selected_box=reports'));

 

if ($selected_box == 'reports') {

$contents[] = array('text' => '<a href="' . tep_href_link(FILENAME_STATS_PRODUCTS_VIEWED, '', 'NONSSL') . '" class="menuBoxContentLink">' . BOX_REPORTS_PRODUCTS_VIEWED . '</a><br>' .

'<a href="' . tep_href_link(FILENAME_STATS_PRODUCTS_PURCHASED, '', 'NONSSL') . '" class="menuBoxContentLink">' . BOX_REPORTS_PRODUCTS_PURCHASED . '</a><br>' .

//++++ QT Pro: Begin Changed code

'<a href="' . tep_href_link(FILENAME_STATS_CUSTOMERS, '', 'NONSSL') . '" class="menuBoxContentLink">' . BOX_REPORTS_ORDERS_TOTAL . '</a><br>' .

'<a href="' . tep_href_link(FILENAME_STATS_LOW_STOCK_ATTRIB, '', 'NONSSL') . '" class="menuBoxContentLink">' . BOX_REPORTS_STATS_LOW_STOCK_ATTRIB . '</a>');

//++++ QT Pro: End Changed Code

}

 

$box = new box;

echo $box->menuBox($heading, $contents);

?>

</td>

</tr>

<!-- reports_eof //-->

 

 

How do i convert this to my format their are other file where this is just // outed so it is not read as code. their are a few mode i cant install because of this

thanks Jeff

Link to comment
Share on other sites

Just installed the latest QTpro and everything is working perfectly! I was wondering if there was a way to integrate a "sort attribute's order/clone attributes for products" in the admin/productinfo. I've tried using other contributions for this and got them to work on their own but can't seem to get anything working simultaneously with QTpro.

 

Thanks in advanced!

Link to comment
Share on other sites

Dears,

Now we use QTpro.

We have size as an attribute. The sizes should always be listed in the following order S, M, L, XL, XXL. But Currently that order appears arbitrary.

 

Would you please help to advise asap?

 

I try to change Product Info Attribute Display Plugin setting from admin, but the size order is not difference.

 

We need display size drop-down on product_info.php;

S

M

L

XL

XXL

 

Thanks & Best Regards,

Sunrise

 

I'm looking and trying to solve this problem to, have you found a way to do it ?

 

Please let me know.

If somebody else knows how to solve this, as you can see there are more looking for this.

 

Thanks in advance,

 

Rob

Link to comment
Share on other sites

  • 3 weeks later...

Hi,

 

I have installed QTPro and it works really well. What I would like to do is to add the image of the product to the stats_low_stock_attrib.php within an extra column alongside the product name. Could somebody please help?

 

Thanks in advance.

Link to comment
Share on other sites

Hello, the problem I have has been posted several times in this topic but never answered.

After installing this great contri I get the "Available Options" double. So, probably the original OScommerce options menu and the QTPro menu.

See picture.Opties%202.jpg

 

I've been searching for days and tried a lot changes in the product_info.php but I can't get it right. Also used Beyond compare to see the differences between my original file and the altered QTPro file but I don't know what to change.

 

Is there anybody who can set me in the right direction.

Link to comment
Share on other sites

  • 1 month later...

Hi

 

I am new to Oscommerce and have installed QTPro on a new install of oscommerce and also added Attribute Sort, both work great. However I would like to have an option which appears forst in the list which says "Select ..." to inform the customer to select the size. I have done this but the two problem I have is that if I don't add stock to this option it shows "out of stock" beside it, which may put the customer off (I find customers can be easily confused) or if I do put in an arbitrary stock level say "1000" then "out of stock" is removed but it is listed below in the available stock, which its not really stock.

 

Does anyone know a way around this. as I do not want to remove it as customers may not select a size and I could be faced with a lot of returns because it will default to the fist size on the list which is "small". I like the little list of what sizes are available below the Drop down list. But I do not want "out os stock" written beside the "Select ..." option, but I do need "Out of stock" to display on options which really are out of stock.

 

Here is a link so you can see what I mean

 

http://littlebuttons.co.nz/osctest/product...?products_id=29

 

Thank for any help you can offer.

Link to comment
Share on other sites

Hi Guys,

 

I'm new here and to OsCommerce.

 

I've installed this for a client and all is good especially with QtPro, but one thing I don't know how to do is how do I manually adjust the quantity after adding it initially? Say I make a mistake? There is no option to update or delete the stock completely, there is only an option to add.

 

Maybe I'm missing something? Any help would be great!

Link to comment
Share on other sites

Hi

 

I am new to Oscommerce and have installed QTPro on a new install of oscommerce and also added Attribute Sort, both work great. However I would like to have an option which appears forst in the list which says "Select ..." to inform the customer to select the size. I have done this but the two problem I have is that if I don't add stock to this option it shows "out of stock" beside it, which may put the customer off (I find customers can be easily confused) or if I do put in an arbitrary stock level say "1000" then "out of stock" is removed but it is listed below in the available stock, which its not really stock.

 

Does anyone know a way around this. as I do not want to remove it as customers may not select a size and I could be faced with a lot of returns because it will default to the fist size on the list which is "small". I like the little list of what sizes are available below the Drop down list. But I do not want "out os stock" written beside the "Select ..." option, but I do need "Out of stock" to display on options which really are out of stock.

 

Here is a link so you can see what I mean

 

http://littlebuttons.co.nz/osctest/product...?products_id=29

 

Thank for any help you can offer.

 

Ok, I have hacked /includes/functions/html_output.php

 

In Function tep_draw_pull_down_menu, before

 

   for ($i=0, $n=sizeof($values); $i<$n; $i++) {

 

I have added

 

	$field .= '<option value="select"';
$field .= '>Please Select ...</option>';

 

And this seems to solve the problem, though it is a hack so use at your own risk. I am not sure which other drop down menus this will affect, but I am sure having "Please Select" won't cause too many problems.

 

So the Function will now look like this.

 

// Output a form pull down menu
 function tep_draw_pull_down_menu($name, $values, $default = '', $parameters = '', $required = false) {
global $HTTP_GET_VARS, $HTTP_POST_VARS;

$field = '<select name="' . tep_output_string($name) . '"';

if (tep_not_null($parameters)) $field .= ' ' . $parameters;

$field .= '>';

if (empty($default) && ( (isset($HTTP_GET_VARS[$name]) && is_string($HTTP_GET_VARS[$name])) || (isset($HTTP_POST_VARS[$name]) && is_string($HTTP_POST_VARS[$name])) ) ) {
  if (isset($HTTP_GET_VARS[$name]) && is_string($HTTP_GET_VARS[$name])) {
	$default = stripslashes($HTTP_GET_VARS[$name]);
  } elseif (isset($HTTP_POST_VARS[$name]) && is_string($HTTP_POST_VARS[$name])) {
	$default = stripslashes($HTTP_POST_VARS[$name]);
  }
}
$field .= '<option value="select"';
$field .= '>Please Select ...</option>';
for ($i=0, $n=sizeof($values); $i<$n; $i++) {
  $field .= '<option value="' . tep_output_string($values[$i]['id']) . '"';
  if ($default == $values[$i]['id']) {
	$field .= ' SELECTED';
  }

  $field .= '>' . tep_output_string($values[$i]['text'], array('"' => '"', '\'' => ''', '<' => '<', '>' => '>')) . '</option>';
}
$field .= '</select>';

if ($required == true) $field .= TEXT_FIELD_REQUIRED;

return $field;
 }

Link to comment
Share on other sites

When i delete a category in the admin area of oscommerce on my QT Pro install i get the following error on a white screen:

 

1064 - You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1

 

DELETE FROM products_stock WHERE products_id =

 

[TEP STOP]

 

The category does get deleted, but it's a niggly annoying thing. Could it be because i'm using mysql 5?

 

Everything else works fine...

Link to comment
Share on other sites

When i delete a category in the admin area of oscommerce on my QT Pro install i get the following error on a white screen:

 

1064 - You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1

 

DELETE FROM products_stock WHERE products_id =

 

[TEP STOP]

 

The category does get deleted, but it's a niggly annoying thing. Could it be because i'm using mysql 5?

 

Everything else works fine...

 

I found this line of code in functions/qtpro_functions

 

//This function will delete all option stock entries from the product.
function qtpro_doctor_amputate_all_from_product($products_id){
tep_db_query("DELETE FROM " . TABLE_PRODUCTS_STOCK . " WHERE products_id =". $products_id);	
}

 

and replaced with:

 

//This function will delete all option stock entries from the product.
function qtpro_doctor_amputate_all_from_product($products_id){
tep_db_query("DELETE FROM " . TABLE_PRODUCTS_STOCK . " WHERE products_id =" . (int)$products_id);	
}

 

It didnt like the int - and i found this code by doing a find across my whole admin folder for the screwy line of code.

Link to comment
Share on other sites

I installed QTpro recently- the first contrib on a clean install of OSCommerce 2.2rc2a. I added a couple of other contribs- fckeditor and Canada Post module. Everything was working fine until two days ago.

 

I use the radioset display option. Now, when I enter a new product I get an error message on the product info page:

 

Warning: Invalid argument supplied for foreach() in /.../includes/classes/pad_base.php on line 380

 

Although I get this message, the product attribute choices are displayed, but as a dropdown menu. When I switch to multiple dropdowns, the product displays without the error message. All of my previously entered products still display without a problem with radioset menus.

 

I have just done a clean install and added QTpro on a test site, and get the same problem. I strongly doubt, therefore, that I've accidentally messed up the code on my live site.

 

Any help with this would be greatly appreciated, as I love this contrib and definitely want to be able to use it with the radioset plugin, which offers advantages over the others for this particular site.

Link to comment
Share on other sites

  • 4 weeks later...

This contribution is great, but there isn't any text for manual install. i gotta have to check every files with a prog (like mentionned in manual) to find and make my changes?

 

No one ever done a manual instruction text with code to find and to change like in most contribution u can find??

 

there is so many files changed, it will take so much time to do that..and most probably ill have some error or mistake somewhere.

Link to comment
Share on other sites

  • 2 weeks later...

Ok i got it working now...

 

But anyones has an idea of what is the echo command to call stock level?

 

Because i'm using another Contribution to draw my table of attribut in product_info and i would like to add the stock level here....not showing the default QT pro stock table...

 

i just need a td line like this one wich is calling attribut name

 

<td class="main" align="center"><?php echo [u]$products_options_name['products_options_name'][/u]; ?></td>

 

I just simply can't find the good eco command to call stock level (something like what is underlined on the code.

 

Is anyone able to help me out...i searched mostly in "qtpro_stock_table.php" and cannot figure out wich command is calling stock level.

 

None of the echo command i tried worked out

 

Thank you for your time!

Edited by Lgn.Magic
Link to comment
Share on other sites

This is a nice tool as many have said. Only one real problem/question.

 

Is there a way to make the stock per attribute (example: a size XL shirt) decrease when one of the products is ordered? If I have set the stock to 10 for Size XL for a particular shirt, is there a way for it to auto-decrement size XL's stock by 1 when someone orders 1 size XL of this shirt?

 

It does decrease the overall stock. I would very much like it to decrease the attribute's stock as well.

 

Thanks,

Colin

Edited by tuffcode
Link to comment
Share on other sites

I just try to fit this contributen for my needs an need some help.

 

Actual I´m displaying the Product Attributes in the shop as a list with a Quantity Boxes - some kind of add multiple products to cart at once.

 

I want the same for the QTpro contrib but now i´m stuck. I´m using the QT stock table display to get this to work. Inserting a model Number for each attribute combination wasnßt that difficult but trying to get quantity Boxes to bulk buy the attributes is a bit different :blush:

 

This is the code to add multiple attributes with quantity to cart in application_top:

 

	  case 'add_mult' : if (is_array($HTTP_POST_VARS['a'])){
					  reset($HTTP_POST_VARS['quantity']);
					reset($HTTP_POST_VARS['a']);
		 			$x=0;
					if (is_array($HTTP_POST_VARS['a'])){
					  foreach(($HTTP_POST_VARS['a']) as $key => $value){
							$c = array((int)$HTTP_POST_VARS['b'] => (int)$value);			
						  if (is_array($HTTP_POST_VARS['quantity'])){
							$qty = (int)$HTTP_POST_VARS['quantity'][$x];				   
							$cart->add_cart($HTTP_POST_VARS['products_id'], $cart->get_quantity(tep_get_uprid($HTTP_POST_VARS['products_id'], ($c)))+($qty),($c));
							$x++;
							}
						} 
					  }
					} else {
					  if (isset($HTTP_POST_VARS['products_id']) && is_numeric($HTTP_POST_VARS['products_id'])) {
						$cart->add_cart($HTTP_POST_VARS['products_id'], $cart->get_quantity(tep_get_uprid($HTTP_POST_VARS['products_id'], $HTTP_POST_VARS['id']))+1, $HTTP_POST_VARS['id']);
					  }
					}
					tep_redirect(tep_href_link($goto, tep_get_all_get_params($parameters)));
					break;

 

and in the product_info:

 

		  <?php echo $products_options['products_options_values_name'];
			echo tep_draw_hidden_field('a[]', $products_options['products_options_values_id']);
   			echo tep_draw_hidden_field('b',$products_options_name['products_options_id']); ?>

 

... but to get it work with QTpro i have to merge it with this:

 

	  case 'add_product' :	if (isset($HTTP_POST_VARS['products_id']) && is_numeric($HTTP_POST_VARS['products_id'])) {
//++++ QT Pro: Begin Changed code
							$attributes=array();
							if (isset($HTTP_POST_VARS['attrcomb']) && (preg_match("/^\d{1,10}-\d{1,10}(,\d{1,10}-\d{1,10})*$/",$HTTP_POST_VARS['attrcomb']))) {
							  $attrlist=explode(',',$HTTP_POST_VARS['attrcomb']);
							  foreach ($attrlist as $attr) {
								list($oid, $oval)=explode('-',$attr);
								if (is_numeric($oid) && $oid==(int)$oid && is_numeric($oval) && $oval==(int)$oval)
								  $attributes[$oid]=$oval;
							  }
							}
							if (isset($HTTP_POST_VARS['id']) && is_array($HTTP_POST_VARS['id'])) {
							  foreach ($HTTP_POST_VARS['id'] as $key=>$val) {
								if (is_numeric($key) && $key==(int)$key && is_numeric($val) && $val==(int)$val)
								  $attributes=$attributes + $HTTP_POST_VARS['id'];
							  }
							}
							$cart->add_cart($HTTP_POST_VARS['products_id'], $cart->get_quantity(tep_get_uprid($HTTP_POST_VARS['products_id'], $attributes))+1, $attributes);
//++++ QT Pro: End Changed Code
						  }
						  tep_redirect(tep_href_link($goto, tep_get_all_get_params($parameters)));
						  break;

 

Has onyone an idea how to merge these codes?

Link to comment
Share on other sites

        if ($VARS['quantity']=intval($VARS['quantity'])) {
         tep_db_query("update " . TABLE_PRODUCTS_STOCK . " set products_stock_quantity=" . (int)$VARS['quantity'] . " where products_stock_id=$stock_id");
       } else {
         tep_db_query("delete from " . TABLE_PRODUCTS_STOCK . " where products_stock_id=$stock_id");
       }

 

This is from stock.php.

 

The first line should have '==' and not just '='

 

The effect for me was to delete the record if the stock quantity was set to zero. I didn't want this, because of an offline 'merge' operation I carry out when updating my live site.

 

Making the change leaves a zero level record in products_stock.

 

Does anyone know if there are likely to be any side effects?

Link to comment
Share on other sites

Hi Olof,

 

Thank you for your wonderful contribution. I just update the QTPro v4.5 to v4.51b then I got the error in In administration> configuration> catalog: "Fatal error: Call to undefined function qtpro_doctor_investigate_product() in /home/camocamp/public_html/catalog3/admin/categories.php on line 15 "

 

In administration> configuration>Prod Info (QYPro)> Production Info Attribute Display Plugin/ multiple_dropdown/ edit. Fatal error: Call to undefined function tep_cfg_pull_down_class_files() in /home/camocamp/public_html/catalog3/admin/configuration.php(125) : eval()'d code on line 1

 

Please see attached photo: http://docs.google.com/Doc?id=ddx8dnwv_958cz3tc5db

How do I fix it. Many Thanks Pam

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