Jump to content
zonetown

[Contribution] QTpro - Quantity Tracking Professional

Recommended Posts

There is no code to post. Either you have setup a color with a blank name that is showing up in your dropdown or you have tweaked _draw_stocked_attributes in one of the pad_... plugins to make it generate an extra entry at the beginning of the dropdown.

 

Ralph - please look at the follwoing contributoion:

 

----------------------------------------------------------------------------------------------------------------------

This contribution will make the remove checkbox in the shopping cart automatically update and remove the item when customer clicks the checkbox (no need for them to click "update")

 

1 ) Add this between the <head></head> tags in shopping_cart.php (around line 25)

 

--------------------------------------

<script type="text/javascript" language="JavaScript"><!--

function DoSubmission() {

document.cart_quantity.submit();

}

//--></script>

----------------------------------------

 

2 ) Search for:

 

----------------------------------------

'text' => tep_draw_checkbox_field('cart_delete[]', $products[$i]['id']));

 

----------------------------------------

 

Change to:

 

----------------------------------------

 

'text' => tep_draw_checkbox_field('cart_delete[]', $products[$i]['id'], ' ', 'onClick="DoSubmission();"'));

----------------------------------------

 

3 ) in file includes/functions/html_output.php search for: (around line 189)

 

----------------------------------------

 

if ( ($checked == true) || ( isset($GLOBALS[$name]) && is_string($GLOBALS[$name]) && ( ($GLOBALS[$name] == 'on') || (isset($value) && (stripslashes($GLOBALS[$name]) == $value)) ) ) ) {

$selection .= ' CHECKED';

------------------------------------------

 

Change to:

-----------------------------------------

 

if ( ($checked == true) || ( isset($GLOBALS[$name]) && is_string($GLOBALS[$name]) && ( ($GLOBALS[$name] == 'on') || (isset($value) && (stripslashes($GLOBALS[$name]) == $value)) ) ) ) {

$selection .= '';

-----------------------------------------------------------------------------------------------------------------------

 

i basically wanted to get the shopping cart page to update with a removal as soon as the checkbox was ticked - this then caused the problem where the QTPro default selection was removed as a result too.

 

i cannot find a solution to have my cake and eat it, and believe me i have tried..... so i have put the shopping cart 'back to normal' and am keeping the QTPro as it should have been

 

maybe any future releases or updates can have a little note about the conflict, just to let otehrs know as i am sure there will be a few out there who will make the same mistake

 

Thanks


Upon receiving fixes and advice, too many people don't bother to post updates informing the forum of how it went. Until of course they need help again on other issues and they come running back!

 

Why receive the information you require in good faith for free, only to then have the attitude to ignore the people who gave it to you?

 

There's no harm in saying, 'Thanks, it worked'. On the contrary, it creates a better atmosphere.

 

CHOOCH

Share this post


Link to post
Share on other sites
Ralph - please look at the follwoing contributoion:

 

----------------------------------------------------------------------------------------------------------------------

This contribution will make the remove checkbox in the shopping cart automatically update and remove the item when customer clicks the checkbox (no need for them to click "update")

 

....snip....

 

3 ) in file includes/functions/html_output.php search for: (around line 189)

 

----------------------------------------

 

if ( ($checked == true) || ( isset($GLOBALS[$name]) && is_string($GLOBALS[$name]) && ( ($GLOBALS[$name] == 'on') || (isset($value) && (stripslashes($GLOBALS[$name]) == $value)) ) ) ) {

$selection .= ' CHECKED';

------------------------------------------

 

Change to:

-----------------------------------------

 

if ( ($checked == true) || ( isset($GLOBALS[$name]) && is_string($GLOBALS[$name]) && ( ($GLOBALS[$name] == 'on') || (isset($value) && (stripslashes($GLOBALS[$name]) == $value)) ) ) ) {

$selection .= '';

-----------------------------------------------------------------------------------------------------------------------

 

....snip....

 

maybe any future releases or updates can have a little note about the conflict, just to let otehrs know as i am sure there will be a few out there who will make the same mistake

 

Thanks

 

If you look at this change to html_output.php it makes it so that it can never draw a selected radio button or checked check box. And since its a function used everywhere its guaranteed to break lots of things besides QT Pro. This is very bad and there seems to be no good reason for it. I think the author didn't know how to pass a false value to tep_draw_checkbox_field and in trying to work around it for the delete checkboxes in the cart broke all checkbox and radioset selections.

 

Try this:

 

'text' => tep_draw_checkbox_field('cart_delete[]', $products[$i]['id'], false, 'onClick="DoSubmission();"'));

instead of the code the author provided and don't make the changes to html_output.php and I think it will work just fine and not break QT Pro and every other radioset and checkbox in osCommerce.

Share this post


Link to post
Share on other sites
Try this:

 

'text' => tep_draw_checkbox_field('cart_delete[]', $products[$i]['id'], false, 'onClick="DoSubmission();"'));

instead of the code the author provided and don't make the changes to html_output.php and I think it will work just fine and not break QT Pro and every other radioset and checkbox in osCommerce.

Thanks again Ralph....

 

that update cart checkbox isn't that important but helps the site a bit so it was desirable to have in there. this was the little piece of script that without me realising un-selected the radio-set (thus giving me a headache trying to find the solution)

 

i see what you mean about it being a bad piece of code as all checkboxes will be unchecked (even auto newsletter select etc)

 

thanks for sorting that out :-)

 

BTW - this is (once again) a truly brilliant mod, I am designing all my test sites with QTPro added and will be going live within 2 weeks on one of the oscommerce project I am working on - it may not have been impossible to launch without QTPro but very close to it, so I am very grateful for you in supplying this contribution and heading the forum, continually helping out even when some of our questions and requests may sound basic and trivial to you.

 

JUST FOR THE RECORD TO ALL THOSE WHO READ THIS FORUM: sometime back I wanted to make a donation to Ralph, as a thank you gesture for helping out with my QTPro questions - and he declined, instead asking me to donate to the Red Cross relief efforts in New Orleans for the damage caused by Hurricane Rita. He's a top man

 

Cheers Ralph!

Edited by chooch

Upon receiving fixes and advice, too many people don't bother to post updates informing the forum of how it went. Until of course they need help again on other issues and they come running back!

 

Why receive the information you require in good faith for free, only to then have the attitude to ignore the people who gave it to you?

 

There's no harm in saying, 'Thanks, it worked'. On the contrary, it creates a better atmosphere.

 

CHOOCH

Share this post


Link to post
Share on other sites

I installed this contribution (Ralph Days version QT Pro Version 4.0)

Yet there is no option to enter a quantity for product attributes in the admin. I thought that this is what it was supposed to do? For example, I sell something in different colors, we have 2 red, 3 blue, etc. there is no option for me to enter the qty in the attributes. Also, I thought there was supposed to be links on the left of the admin family called "low stock report" etc, but there are no links, even though i copied the php files over . Help! thanks!

Share this post


Link to post
Share on other sites

Ok i figured it out, its on the actual product page, under "stock" button. BUT if i add stock to an attribute, and hit "add" it takes me to some google page! whats that about? when i hit "add" it goes to http://catalogs.google.com/

and doesnt update anything?? thats weird, why is this happening?

Share this post


Link to post
Share on other sites

I've been trying to get help on my issue in the Quantity Tracking Professional and I think I'm halfway toward solution. I've been trying to integrate QT Pro 4.2 along with Paypal Shopping Cart IPN 3.1.5 into my shop but alone they are incompatible, where Paypal orders don't update attribute stock quantities. Have a look at the posts by me and ralphday between #793 and #801:

 

Aug 20 2005, 08:19 PM Post #793

Aug 23 2005, 09:53 PM Post #801

 

I've been able to get Paypal IPN to subtract the attributes' stock quantities, but I cannot get it to restock them correctly when I delete an order. This may or may not be related to a problem where in the orders_products table of the database, products_stock_attributes is being set to NULL on Paypal orders when it shouldn't be... orders made with Cheques have values that look like '1-4'.

 

Any ideas of how this could be fixed?

Share this post


Link to post
Share on other sites

Hey everybody....

 

i have a couple questions about this qtpro contribution....

 

first off, i am not the one that installed any of the qtpro contributions.... so how can i find out what version of the qtpro has been installed (this way i can talk more intelligently about the problem i am having)

 

Second,

 

when an order is placed.... for some reason when an order is placed the order quantity is not being subtracted from the onhand inventory stock.

 

I checked in the Stock Configuration, and Check stock level, Subtract stock, and Allow Checkout are all set to true.

 

do you have any suggestions of what it could be?

 

please help ASAP.....

 

Best Regards,

 

Mark

Share this post


Link to post
Share on other sites
I've been trying to get help on my issue in the Quantity Tracking Professional and I think I'm halfway toward solution. I've been trying to integrate QT Pro 4.2 along with Paypal Shopping Cart IPN 3.1.5 into my shop but alone they are incompatible, where Paypal orders don't update attribute stock quantities. Have a look at the posts by me and ralphday between #793 and #801:

 

Aug 20 2005, 08:19 PM Post #793

Aug 23 2005, 09:53 PM Post #801

 

I've been able to get Paypal IPN to subtract the attributes' stock quantities, but I cannot get it to restock them correctly when I delete an order. This may or may not be related to a problem where in the orders_products table of the database, products_stock_attributes is being set to NULL on Paypal orders when it shouldn't be... orders made with Cheques have values that look like '1-4'.

 

Any ideas of how this could be fixed?

 

helpneeder, I am having the same problems, can't get the attribute quantity to decrease as items are purchased however the total quantity does decrease.

 

I've read the dialog you noted above and unfortunately at this point it is beyond my meager coding kills, heck i have a hard enough time just cutting and pasting the code. Hopefully a somewhat laymans solution to this will be made available soon. I am going to try to take another look at the discussion and see if i can follow it, but this is driving me nuts.

Share this post


Link to post
Share on other sites
helpneeder, I am having the same problems, can't get the attribute quantity to decrease as items are purchased however the total quantity does decrease.

 

I've read the dialog you noted above and unfortunately at this point it is beyond my meager coding kills, heck i have a hard enough time just cutting and pasting the code. Hopefully a somewhat laymans solution to this will be made available soon. I am going to try to take another look at the discussion and see if i can follow it, but this is driving me nuts.

i am hoping that we get an answer to this problem.... it is really hard keeping track of everything without the help of this.

Share this post


Link to post
Share on other sites

I am about to install QT Pro 4.2 in my store.

 

Question:

 

Is it ok to install the new_install.sql script on an already working store (with lots of stock already in store)?

Or is that only for a COMPLETELY new store?

 

Grateful for help! :thumbsup:


Information overload!

Share this post


Link to post
Share on other sites
I am about to install QT Pro 4.2 in my store.

 

Question:

 

Is it ok to install the new_install.sql script on an already working store (with lots of stock already in store)?

Or is that only for a COMPLETELY new store?

 

Grateful for help! :thumbsup:

new_install.sql is for an existing store without a previous version of QT Pro installed whether or not it already has products loaded. I highly recommend installing it in a test instance of your store first.

Share this post


Link to post
Share on other sites

I found an earlier post here regarding how to merge the code for QTPro 4.2 and Wishlist 2.3 in application_top.php

 

I'm using QTPro 4.2 and a newer Wishlist (3.5d) and I'm not sure how to merge the code. Has anyone managed to do that? Help is very much appreciated.

Share this post


Link to post
Share on other sites

Chaps hope someone can help....I have previously installed this all went fine and using this for another site things just haven't gone right for some reason. All the SQL installed OK and the files installed but when I go to Catalog Options and try to enter something in there and Inset this I get the following error:-

 

1054 - Unknown column 'products_options_track_stock' in 'field list'

 

insert into products_options (products_options_id, products_options_name, language_id,products_options_track_stock) values ('6', 'yep', '1', '1')

 

 

I have tried this on a completely new installation but still get the same error and a new SQL database.

 

When I go to catalog and catagories/products and select STOCK I get the following error:-

 

1054 - Unknown column 'products_options.products_options_track_stock' in 'where clause'

 

select products_name,products_options_name as _option,products_attributes.options_id as _option_id,products_options_values_name as _value,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=25 and products_attributes.options_id=products_options.products_options_id and products_attributes.options_values_id=products_options_values.products_options_v

alues_id and products_description.language_id=1 and products_options_values.language_id=1 and products_options.products_options_track_stock=1 and products_options.language_id=1 order by products_attributes.options_id, products_attributes.options_values_id

 

 

All my SQL is Cool and the fields are installed OK so really stumped, is this an access thingor code issue?

 

Really need some help..

 

Rgs

 

Jed

Share this post


Link to post
Share on other sites
Chaps hope someone can help....I have previously installed this all went fine and using this for another site things just haven't gone right for some reason. All the SQL installed OK and the files installed but when I go to Catalog Options and try to enter something in there and Inset this I get the following error:-

 

1054 - Unknown column 'products_options_track_stock' in 'field list'

 

insert into products_options (products_options_id, products_options_name, language_id,products_options_track_stock) values ('6', 'yep', '1', '1')

I have tried this on a completely new installation but still get the same error and a new SQL database.

 

When I go to catalog and catagories/products and select STOCK I get the following error:-

 

1054 - Unknown column 'products_options.products_options_track_stock' in 'where clause'

 

select products_name,products_options_name as _option,products_attributes.options_id as _option_id,products_options_values_name as _value,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=25 and products_attributes.options_id=products_options.products_options_id and products_attributes.options_values_id=products_options_values.products_options_v

alues_id and products_description.language_id=1 and products_options_values.language_id=1 and products_options.products_options_track_stock=1 and products_options.language_id=1 order by products_attributes.options_id, products_attributes.options_values_id

All my SQL is Cool and the fields are installed OK so really stumped, is this an access thingor code issue?

 

Really need some help..

 

Rgs

 

Jed

 

If you have verified that column 'products_options_track_stock' exists in the products_options table, then your osC store must be using a different database than you ran the SQL against.

Share this post


Link to post
Share on other sites

Hi I installed QT Pro and everything looks fine. I selected the sequenced plugin. This works fine for the t shirts i have with different colors and sizes..

 

I have other products on my site and which need, either radio set or multiple drop downs.

 

IS it possible to have more than one plugin for the site. I mean some products like tshirts show sequenced and other products show radio set or both sequenced and radio set.

Is this possible or only 1 plugin can be used sitewide .

 

Thanks a lot for your help

Edited by amanbedi

Share this post


Link to post
Share on other sites
Hi I installed QT Pro and everything looks fine. I selected the sequenced plugin. This works fine for the t shirts i have with different colors and sizes..

 

I have other products on my site and which need, either radio set or multiple drop downs.

 

IS it possible to have more than one plugin for the site. I mean some products like tshirts show sequenced and other products show radio set or both sequenced and radio set.

Is this possible or only 1 plugin can be used sitewide .

 

Thanks a lot for your help

 

Sorry, only one plugin sitewide. Its an enhancement I thought would we be good - override the plugin at the category or product level. But I don't think I'll get the time to do it. You could probably hack your product.php to look at the category and call the plugin you want for that category pretty easily. A mix of plugins within a single product would be a fair chunk of work.

Share this post


Link to post
Share on other sites

Thanks ,

 

Any head start would be good. Where should i start with. I will give it a try to hack for different categories.. I think that will solve my purpose.

 

Or

 

Having Product Attributes - Option Type Feature contrib installed with QT pro would be great . Do you think it is possible to do that , to have both installed and working fine.

 

Any suggestions would be great.

 

Thanks

 

Thanks ,

 

Any head start would be good. Where should i start with. I will give it a try to hack for different categories.. I think that will solve my purpose.

 

Or

 

Having Product Attributes - Option Type Feature contrib installed with QT pro would be great . Do you think it is possible to do that , to have both installed and working fine.

 

Any suggestions would be great.

 

Thanks

 

Thanks ,

 

Any head start would be good. Where should i start with. I will give it a try to hack for different categories.. I think that will solve my purpose.

 

Or

 

Having Product Attributes - Option Type Feature contrib installed with QT pro would be great . Do you think it is possible to do that , to have both installed and working fine.

 

Any suggestions would be great.

 

Thanks

 

Thanks ,

 

Any head start would be good. Where should i start with. I will give it a try to hack for different categories.. I think that will solve my purpose.

 

Or

 

Having Product Attributes - Option Type Feature contrib installed with QT pro would be great . Do you think it is possible to do that , to have both installed and working fine.

 

Any suggestions would be great.

 

Thanks

Share this post


Link to post
Share on other sites

Thanks ,

 

Any head start would be good. Where should i start with. I will give it a try to hack for different categories.. I think that will solve my purpose.

 

Or

 

Having Product Attributes - Option Type Feature contrib installed with QT pro would be great . Do you think it is possible to do that , to have both installed and working fine.

 

Any suggestions would be great.

 

Thanks

 

Sorry ,

 

the site froze and now my msg is posted multiple times.

Share this post


Link to post
Share on other sites
Thanks ,

 

Any head start would be good. Where should i start with. I will give it a try to hack for different categories.. I think that will solve my purpose.

 

Or

 

Having Product Attributes - Option Type Feature contrib installed with QT pro would be great . Do you think it is possible to do that , to have both installed and working fine.

 

Any suggestions would be great.

 

Thanks

 

Sorry ,

 

the site froze and now my msg is posted multiple times.

 

Merging QT Pro with Option isn't straightforward. Different control types take different Javascript to do stock checking for one thing. What if a text box is spedified for an option that stock is tracked for? In other words, there are some design issues to be thought out before the merge can happen.

 

As for hacking product_info, the plugin is called with this code in product_jnfo.php:

	  require(DIR_WS_CLASSES . 'pad_' . PRODINFO_ATTRIBUTE_PLUGIN . '.php');
  $class = 'pad_' . PRODINFO_ATTRIBUTE_PLUGIN;
  $pad = new $class($products_id);
  echo $pad->draw();

 

PRODINFO_ATTRIBUTE_PLUGIN comes from the configuration you do in the admin site. You can change the above to something like this:

	  if (whatever you want) {
	$plugin = "some plugin";
  } else {
	$plugin = PRODINFO_ATTRIBUTE_PLUGIN;
  }
  require(DIR_WS_CLASSES . 'pad_' . $plugin . '.php');
  $class = 'pad_' . $plugin;
  $pad = new $class($products_id);
  echo $pad->draw();

It looks like category isn't already available in product_info.php so you'd have to run a query to get the categories a product is in. Or maybe easier SELECT * FROM TABLE_PRODUCTS_TO_CATEGORIES WHERE products_id=xxx AND categories_id in (cat1,cat2,...) and test if any rows are returned.

Share this post


Link to post
Share on other sites

I?ve just installed QT Pro and it is great!

 

My only problem (so far) is that the sort order on the attributes is a little weird.

I am selling clothes on the site so I am using S, M, L, XL and so on.

 

On some products the dropdown is correct (S,M,L,XL default S).

On other products it?s (XL, L, M, S default XL) or some other weird order.

 

Is that something that can be corrected?


Information overload!

Share this post


Link to post
Share on other sites
I?ve just installed QT Pro and it is great!

 

My only problem (so far) is that the sort order on the attributes is a little weird.

I am selling clothes on the site so I am using S, M, L, XL and so on.

 

On some products the dropdown is correct (S,M,L,XL default S).

On other products it?s (XL, L, M, S default XL) or some other weird order.

 

Is that something that can be corrected?

This is a base osCommerce problem. There is another contribution for attribute sorting. It can be merged with QT Pro though it gets a little tricky, particularly in products_attributes.php because it was built on a pre-MS2 final version of osCommerce.

Share this post


Link to post
Share on other sites

Ok, sounds difficult, I guess I will have to live with that

until some programming genious adds a QT Pro contrib

with a sort order fix included. Anyone...? :-" :)


Information overload!

Share this post


Link to post
Share on other sites

I have found a way to make QTPro 4.2 work with Product Attributes Sort Order v1.0 by Forrest Miller. The fix was made by Nicholas Rivera.

 

In includes/classes/pad_base.php on line 318 change;

 

$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)$this->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 . "'");

 

to

 

$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)$this->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 . "' order by pa.attribute_sort");

Edited by Fredrik.r

Share this post


Link to post
Share on other sites

I'm trying to get QTPro 4.2 to work with the latest Wishlist, 3.5d. When adding a product to the Wishlist the attributes are not carried over.

 

I have been told that the problem lies in application_top.php. I will need to merge the code that QTPro and Wishlist are using. This is a very critical part of the store and if someone who knows how to do but does not have time I'm willing to pay for this to work. I have a deadline on monday. Thanks.

 

Below is my part of application_top.php that I need help with;

 

// Shopping cart actions
// wishlist data
if(!tep_session_is_registered('wishList')) {
tep_session_register('wishList');
$wishList = new wishlist;
}

//Wishlist actions (must be before shopping cart actions)
if(isset($HTTP_POST_VARS['wishlist_x'])) {
if(isset($HTTP_POST_VARS['products_id'])) {
if(isset($HTTP_POST_VARS['id'])) {
$attributes_id = $HTTP_POST_VARS['id'];
tep_session_register('attributes_id');
}
$wishlist_id = $HTTP_POST_VARS['products_id'];
tep_session_register('wishlist_id');
}
tep_redirect(tep_href_link(FILENAME_WISHLIST));
}
if (isset($HTTP_GET_VARS['action'])) {
// redirect the customer to a friendly cookie-must-be-enabled page if cookies are disabled
if ($session_started == false) {
tep_redirect(tep_href_link(FILENAME_COOKIE_USAGE));
}

if (DISPLAY_CART == 'true') {
$goto = FILENAME_SHOPPING_CART;
$parameters = array('action', 'cPath', 'products_id', 'pid');
} else {
$goto = basename($PHP_SELF);
if ($HTTP_GET_VARS['action'] == 'buy_now') {
$parameters = array('action', 'pid', 'products_id');
} else {
$parameters = array('action', 'pid');
}
}
switch ($HTTP_GET_VARS['action']) {
// customer wants to update the product quantity in their shopping cart
case 'update_product' : for ($i=0, $n=sizeof($HTTP_POST_VARS['products_id']); $i<$n; $i++) {
if (in_array($HTTP_POST_VARS['products_id'][$i], (is_array($HTTP_POST_VARS['cart_delete']) ? $HTTP_POST_VARS['cart_delete'] : array()))) {
$cart->remove($HTTP_POST_VARS['products_id'][$i]);
} else {
if (PHP_VERSION < 4) {
// if PHP3, make correction for lack of multidimensional array.
reset($HTTP_POST_VARS);
while (list($key, $value) = each($HTTP_POST_VARS)) {
if (is_array($value)) {
while (list($key2, $value2) = each($value)) {
if (ereg ("(.*)\]\[(.*)", $key2, $var)) {
$id2[$var[1]][$var[2]] = $value2;
}
}
}
}
$attributes = ($id2[$HTTP_POST_VARS['products_id'][$i]]) ? $id2[$HTTP_POST_VARS['products_id'][$i]] : '';
} else {
$attributes = ($HTTP_POST_VARS['id'][$HTTP_POST_VARS['products_id'][$i]]) ? $HTTP_POST_VARS['id'][$HTTP_POST_VARS['products_id'][$i]] : '';
}
$cart->add_cart($HTTP_POST_VARS['products_id'][$i], $HTTP_POST_VARS['cart_quantity'][$i], $attributes, false);
}
}
tep_redirect(tep_href_link($goto, tep_get_all_get_params($parameters)));
break;
// customer adds a product from the products page
case 'add_product' : if (isset($HTTP_POST_VARS['products_id']) && is_numeric($HTTP_POST_VARS['products_id']) && ($HTTP_POST_VARS['products_id']==(int)$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;
// performed by the 'buy now' button in product listings and review page

Share this post


Link to post
Share on other sites

Okay, Here is my site : www.jagged-jewelry.ca

 

I have a few problems :

 

A) Id like the Attribues sorted in an other order (Diameter/Length > Ball Size)

 

B) Even though they are instock, not all the attribuets show.

 

C) I have two sets of Attribute Drop downs on the product_info page. Iv followed the code along, but have no luck finding where I get rid of the old set.

 

Please help!


++++++++++++++++++++

Im just a guy, Nothing more

++++++++++++++++++++

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

×