Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Paypal Payment module


Recommended Posts

Hello, I searched this thread for some answers but no dice.

During the paypal confirmation when I click return to merchant I receive this error

 

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

 

insert into orders_products (orders_id, products_id, products_model, products_name, products_price, final_price, products_tax, products_quantity, products_stock_attributes) values ('12', '32', '', 'Team Robotics', '15.0000', '15', '0', '1', '2-17')

 

[TEP STOP]

 

In my website payment preference I have auto return set to on and return url set to

 

http://www.mysite.com/catalog/checkout_success.php

 

Any ideas?

Link to comment
Share on other sites

It's saying there is a missing field in the database named "products_stock_attributes." That is not a standard field so you probably added a contribution and forgot to upload the database changes.

 

Jack

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

Hi Guys I am a newbie so forgive me

 

I added the Qt Pro 4.3 contribution and found where the error is coming from in checkout_process.php

 

//**si** 14-11-05 fix missing att list

asort($products_stock_attributes_array, SORT_NUMERIC);

$products_stock_attributes = implode(",", $products_stock_attributes_array);

//**si** 14-11-05 end

 

} else {

asort($products_stock_attributes_array, SORT_NUMERIC);

$products_stock_attributes = implode(",", $products_stock_attributes_array);

$attributes_stock_query = tep_db_query("select products_stock_quantity from " . TABLE_PRODUCTS_STOCK . " where products_stock_attributes = '$products_stock_attributes' AND products_id = '" . tep_get_prid($order->products[$i]['id']) . "'");

if (tep_db_num_rows($attributes_stock_query) > 0) {

$attributes_stock_values = tep_db_fetch_array($attributes_stock_query);

$attributes_stock_left = $attributes_stock_values['products_stock_quantity'] - $order->products[$i]['qty'];

tep_db_query("update " . TABLE_PRODUCTS_STOCK . " set products_stock_quantity = '" . $attributes_stock_left . "' where products_stock_attributes = '$products_stock_attributes' AND products_id = '" . tep_get_prid($order->products[$i]['id']) . "'");

$actual_stock_bought = ($attributes_stock_left < 1) ? $attributes_stock_values['products_stock_quantity'] : $order->products[$i]['qty'];

} else {

$attributes_stock_left = 0 - $order->products[$i]['qty'];

tep_db_query("insert into " . TABLE_PRODUCTS_STOCK . " (products_id, products_stock_attributes, products_stock_quantity) values ('" . tep_get_prid($order->products[$i]['id']) . "', '" . $products_stock_attributes . "', '" . $attributes_stock_left . "')");

$actual_stock_bought = 0;

}

}

}

 

where and how do I insert the product_stock_attributes database, if that is the problem.

Link to comment
Share on other sites

The database is a separate item from your files. Check the instructions for the contribution and it should say something like "upload the database file." You have to do that using a program that allows access to the database, usually phpmyadmin, which your host probably offers.

 

Jack

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

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