Site maintenance: Sun 15 Nov, from 12:00 UTC, about 4–6 hours. Details

This cutover relies on some testing that is still incomplete so may be cancelled at short notice

Forums / All Other Contributions/Addons / I want to add to stock via EP, not overwrite

I want to add to stock via EP, not overwrite

Started by sbbemn on 16 Aug 2012, 9:05 PM · Views: 600

Results 1 to 2 of 2
16 Aug 2012, 9:05 PM
#1
sbbemn avatar

sbbemn

Zen Follower

Join Date:
Jan 2010
Posts:
182
Plugin Contributions:
0

I want to add to stock via EP, not overwrite

Note: upgrading soon, I know

My plan is to upload stock received to admin via EP but ADD to current stock.

Three columns:

  1. v_products_id
  2. v_products_model
  3. v_products_quantity

At my line 1561 a query selects the current contents...
$sql = "SELECT
p.products_quantity as v_products_quantity,

I see in my line 1980 this...
$query = "UPDATE " . TABLE_PRODUCTS . " SET
products_quantity = '" . zen_db_input($v_products_quantity) . "' ,

In order to do this, is it simply '" . zen_db_input($v_products_quantity + p.products_quantity) . "'

16 Aug 2012, 10:19 PM
#2
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,897
Plugin Contributions:
21

Re: I want to add to stock via EP, not overwrite

If, by EP you mean easy populate, you should ask your question in that mod's support thread.

Need a hand with Zen Cart? Hire the team at myZenCartZone.com for upgrades, repairs, and custom plugins.
Zen Cart Certified hosting at myZenCartHost.com