last day (15 days later) » 

7:59 AM
hi
Thanks a lot for helping me again
 
i got something like above
please be here, lunch break now, i will come at 2:30, sorry for that....
 
thanks a lot
 
 
1 hour later…
9:07 AM
hi @AshishJagnani
can you please check one more time that link is opening or not there......
 
its blocked here
it will not work in my system
 
oh, thats okay sir......
this is the result i got in mozilla firebug - output
am i seeing in correct location or where exactly i need to see in mozilla to check output
 
now add my latest code and check the products in dropdown
 
sure , i will check
 
going for lunch
 
9:12 AM
oh, okay......
i will wait......
now i can able to select "order number" from dropdown , but i cant able to select "product ids".....
 
9:32 AM
means there is no product in dropdown.....right ?
check the html in firebug, is there any product option ?
 
product ids are available.....
i got as above image
before "product ids" were displaying......
 
I think no product ids are there
 
okay just a min, i will try to echo prodict ids.....
 
I changed the product ids in the code and try to lod those product ids which we have to remove, but there is no product ids. It means there is some issue in select duplicate product id query
 
okay please check above image
when i tried this query
select * from sales_flat_order where designer_id like '%4%';
select * from sales_flat_order where designer_id like '%5%';
select * from sales_flat_order where designer_id like '%8%';
select * from sales_flat_order where designer_id like '%9%';
i can see result as in above image
 
9:46 AM
leave that
 
as we are fetching product id from magento db..... i checked in magento db
okay
 
Now try my updated answer and let me know the result
 
sure
pls check above image
now product ids are displaying
but along with product ids, its displaying someother code at bottom.....
may be this code is reason for that
$sqlq1="select dproduct_id from order_details where designer_id='".$id."' and designerorder_id='".$orderData->getIncrementId()."'";
 
yes thats fine
 
9:54 AM
select this query and run in db and check the result
 
select the query from firebug
 
let me check, i am from chrome family......
 
select dproduct_id from order_details where designer_id='8' and designerorder_id='100000136'
 
9:57 AM
run this in DB and check the result
 
ichecked in php db
i got above result
we have only 2 rows in php db now - order_details table
 
yes thats the issue
when you are checking the already product id saved in this it will return blank result
thats why you are not able to filter the product ids
you have to change this query according to your requirment
 
okay , i got little bit what actualy you are telling..... just a min......
now i am going to save that order id and product id and check..... designer_id='8' and designerorder_id='100000136'
 
yes please check that
 
i tried now values are not saving in php db once i submit the form.....
okay , can you please help me what query i need to use
 
10:03 AM
wait
 
ok now take my latest code
 
there is no issue in this code, we have to check your data which is getting submittion
 
okay i updated your code, now everything is looking as before, but only thing is to hide other designer product ids.....
 
10:05 AM
provide me that code link where have insert query
 
sorry which code you want, those 4 fiedls code ?
 
thats i think in file "update_paidstatus.php"
 
sure
please check above link
 
let me check all code
 
thanks a lot......
 
10:10 AM
below this code line
if(isset($_POST) && $_POST!="" && !empty($_POST)){ // checking if form submision is occured or not.
add this code
echo '<pre>';print_r($_POST);die;
and try to submit the data
and check the result
 
okay
result :
Array
(
[designer_id] => 4
[designerorder_id] => 100000139
[dproduct_ids] => 15517
[dueDate] => 01/16/2017
[dproduct_id] => 15517
[btn-signup] => Submit
)
 
have you selected multiple product id when submit
 
no only one
 
select more then one and submit
 
result :
Array
(
[designer_id] => 4
[designerorder_id] => 100000140
[dproduct_ids] => 152
[dueDate] => 01/16/2017
[dproduct_id] => 15517, 152
[btn-signup] => Submit
)
 
10:14 AM
ok
now remove my code from this file
also above this line : $sucessFlag=mysqli_query($conVar,$sqlQueryToUpdate);
 
use this : echo '<br>'.$sqlQueryToUpdatedie;die;
and check again with submission
 
Notice: Undefined index: PaidStatus in /var/www/html/sbdev2/php/site6/update_paidstatus.php on line 25

Notice: Undefined index: PaidStatus in /var/www/html/sbdev2/php/site6/update_paidstatus.php on line 25

Notice: Undefined index: commission in /var/www/html/sbdev2/php/site6/update_paidstatus.php on line 25

Notice: Undefined variable: sqlQueryToUpdatedie in /var/www/html/sbdev2/php/site6/update_paidstatus.php on line 26
i got above errors after i submit form
sorry i gave code in very wrong indent, here is code with very neat indention, please look at this : pasted.co/45924e75
 
there is a mistake in my code, use this instead : echo '<br>'.$sqlQueryToUpdate;die;
 
sure
result :
Notice: Undefined index: PaidStatus in /var/www/html/sbdev2/php/site6/update_paidstatus.php on line 24

Notice: Undefined index: PaidStatus in /var/www/html/sbdev2/php/site6/update_paidstatus.php on line 24

Notice: Undefined index: commission in /var/www/html/sbdev2/php/site6/update_paidstatus.php on line 24

INSERT INTO order_details ( designer_id,designerorder_id,dproduct_id,dpaid_status,delivery_status,due_date,commission) VALUES('5','100000138','15517','','','2017-01-17','')
 
10:25 AM
run this query in DB and check the result
is it working or not ?
 
#1136 - Column count doesn't match value count at row 1
 
finaly its a issue
let me solve this
 
we deleted commission column before as it is not required
may i readd commission column and check ?
 
10:31 AM
now check this in DB :: INSERT INTO order_details (dorder_id, designer_id,designerorder_id,dproduct_id,dpaid_status,delivery_status,due_date,commission)
VALUES(NULL,'5','100000138','15517','','','2017-01-17','')
is it working or not ?
 
#1054 - Unknown column 'commission' in 'field list'
may i remove commission and check ?
 
check this :
INSERT INTO order_details (dorder_id, designer_id,designerorder_id,dproduct_id,dpaid_status,delivery_status,due_date)
VALUES(NULL,'5','100000138','15517','','','2017-01-17')
 
i got above result
 
do change this file according to my new answer
 
10:37 AM
and check again
 
updated the code , but still when i select one designer , other designer's product ids are displaying
 
check the DB its updated or not with new data
order_details table
 
yes vlaues are updating in db once i submit the form
 
send me the screen shot of DB
 
sure
please check above image
 
10:42 AM
match the designer id and designerorder_id, is it correct.
Means it is same as you submitted
 
yes thats perfect.....
but this issue is there , means same i posted in question.....
 
in between, is there any chance that "edit 2" part i posted in question is reason for the issue ?
 
now we have to check our previous code of select query
in that file above the code : if(count($result)>1){
 
10:55 AM
use $result1 = $sqlq1;
and check
 
this query : select dproduct_id from order_details where designer_id='5' and designerorder_id='100000140'
 
and check the query
 
Showing rows 0 - 0 (1 total, Query took 0.0002 sec)
 
select the designer if 6 and order id like 000123
now check which query you are getting
 
okay , i will select designer if 6 and order id like 000123 now
 
11:00 AM
send me the form screen after select this
 
select dproduct_id from order_details where designer_id='6' and designerorder_id='100000123'
there is no option to select 100000123 order for designer 6
 
after selecting this which product ids are shhowing in form
 
there is no option to select 100000123 order for designer 6
 
because the order id containds only designer 6 products
 
11:02 AM
ok select 5
 
okay i will select 5
i selcted designer 5 : kidsdial3 , below is result
 
once you select any order id and submit that order id, it will show back in this form or not ?
I think there is some logic mistake
 
fine, i will tell clearly
 
let me clear the thing
 
assume customer order : order number 101 - product a , b in that order , belongs to designer 1
for this we select designer 1 and selected order 101 and select product a , b and submit form
again those product id a, b will not visible in form in site
this is perfect, we wanted same
now example 2
 
11:07 AM
ok
just product a and b will not show again. no matter which order will get selected......right ?
 
assume customer order : order number 102 - product c , d in that order , product c belongs to designer "sudeep" , product d belongs to designer "darshan"
for this "just product a and b will not show again. no matter which order will get selected......right ?" reply is = > if we select order "101" than only product "a& b" will not visible
suppose in order "105" - same products sold than, when we select "order 105" than Product "a & B" will show in form
once we submit form with "order 105 - product a & b" than again it will not visible once we select "order 105"
now example 2
assume customer order : order number 102 - product c , d in that order , product c belongs to designer "sudeep" , product d belongs to designer "darshan"
now when we select "order 102" from dropdown, it showing both "c & d" in dropdown
this is the issue
why this is issue is as we select " designer - darshn , order 102 & than it should display only product "d""
because only "product d" belong to darshn , but product c also visible
why "C" is visible when we select "darshan" is both products are in same order number, thats the reason
same issue happening when we select "Sudeep - order 102" = > both c, d will display, in "suddep case, it should display only "C"
thats all buddy,
please let me know if you need any clarification.....
 
but from where we get the relation of designer and product ?
 
yes i wil tell
We have lot of Designers in site (Seller/ Vendor). we assigned each product to one Designer with help of attribute Designer ID as below image under Catalog > Manage Products section
as like above image, in magento backend , we enered "suddep and darshan" designer ids for "product c & d"
thats all related to question part,i will give some additional info, why we are doing this is we are going to give commission for each designers and also we hhave to show product delivery status- delivered , returned , cancelled and all , so we are saving all order details per product wise in php custom database......
addditional info : if we dont save again in php database , we can not able to change status like "delivered , returned or cancelled" as like below image
 
11:25 AM
check my first answer code, and update according
 
sure
updated, now i cant able to select "order number" in dropdown
once i select designer
 
clear your order_details DB and check
 
checked after clearing order db ,still same issue
in foire bug
we can see error in firebug
if($_product->getDesignerId() = $id)
for above line
you can see error in above imaghe
 
change this
if($_product->getDesignerId() == $id)
if($_product->getDesignerId() == $id)
use ==
 
11:35 AM
?
 
in product id dropdown, i can see "array" instead of "product ids "
 
after my foreach loop
add this :: $result2=implode(',',$result2);
 
okay
Fatal error : [] opertaor not supported for strings in
$result2[] = $product;
foreach($result as $product)
{
$_product = Mage::getModel('catalog/product')->load($product);
if($_product->getDesignerId() == $id)
{
$result2[] = $product;
}
}
$result2=implode(',',$result2);
in above code lines 53 : $result2[] = $product;
 
$result2=array();
foreach($result as $product)
{
$_product = Mage::getModel('catalog/product')->load($product);
$_productDesignerId = $_product->getDesignerId();
if(trim($_productDesignerId) == trim($id))
{
$result2[] = trim($product);
}
}
$result2=implode(',',$result2);
use this code instead of my foreach
 
now nothing is displaying in product dropdown , but no error in firebug
sorry
no wait
my mistake
 
11:47 AM
hello
@BabyinMagento
 
12:03 PM
@abdul hi
@AshishJagnani buddy, looks like its working
yes, its working fine.....
i really thought i am not going to get slution for this :)
Thanks a lot for your precious time......
 
12:17 PM
hi, there was some 23 rows means product ids, i checked all, everything is fine but for strange is only for "100000137" order id , its not showing in form , any idea ?
 
you are not getting this order id in form dropdown......right ?
 
yes
only for that order id
but rest all is fine
 
check the designer_id of that order
is that assign properly
 
yes, that order contain 2 products , same products are in another order, but in that ordeer i can see in dropdown.....
 
for which designer is this order belongs
 
12:25 PM
4 & 5
"kidsdial2" and "kidsdial3"
 
It means when you select any of these you are not getting the order 100000137 in dropdown.......right ?
 
exactly right
 
select * from sales_flat_order where designer_id=4
check this in DB
Are you getting that order
 
MySQL returned an empty result set (i.e. zero rows). (Query took 0.0013 sec)
i magneto db
for every designer id i will get same result
because we saved as in above image
 
open sales_flat_order table and check this order : 100000137
 
12:35 PM
checking......
 
you are not getting product for this order, or just not getting this order ?
 
i am not getting order id only
in dropdown
 
then check this order id in sales_flat_order table and check which designer assigned in that
in DB
 
yes, checking
i dont know why , there is no value under designer id column for all orders in sales__flat_order table
but when i check with below query
select * from sales_flat_order where designer_id like '%4%';
select * from sales_flat_order where designer_id like '%5%';
select * from sales_flat_order where designer_id like '%8%';
select * from sales_flat_order where designer_id like '%9%';
than only i can see values under "designer_id"
okay, i will give bounty and accept your answer.....
i need more help from you, once we select "designer- order id and product id" and submit form, again when select designer id and order id , we can not able to see any products ids that are already selected and submited , as like this
once we selected and submit all product ids of that order, we dont want to display that order id in dropdown.....
 

  last day (15 days later) »