AbanteCart Community

AbanteCart Development => Development Help Needed => Topic started by: dhigz on July 29, 2015, 02:27:24 AM

Title: Listing Grid %ID% Replacement
Post by: dhigz on July 29, 2015, 02:27:24 AM
I am working on a new extension which has large presence on the admin side. As such I have a few pages using the listing grid functions. I am on my last section and I am having a problem with the $ID% value in the edit link being properly replaced. Instead of the the record set row value each link and grid row value is a sequential number starting at 1 and increasing to the amount of records. On top of that, if I change the order of the records, I get the same result with the numbering starting at one and progressing...the original number does not stay with the sorted value.

I have built several sets of pages using the listing grid and this is the first one I have seen this problem. All are structured the with the same code structure just replaced values. All data flows correctly from query to responses to controller except for this problem.

The correct record values are being added to the array in the results loop on response->rows[$i]['id'] = [my id value]  line on the response page. But somehow the values are not making it to the jgrid script. I have done all sorts of testing and can not find the problem.

Any suggestion of what may be causing this problem or where I should be looking?

Thanks in advance
Title: Re: Listing Grid %ID% Replacement
Post by: abolabo on July 29, 2015, 05:08:53 AM
1. be sure that your response->rows[$i]['id'] = [my id value]  is unique.
2. you can look into admin/view/default/template/common/listing_grid.tpl line 310 to check conditions for replacement.
Title: Re: Listing Grid %ID% Replacement
Post by: dhigz on July 30, 2015, 06:32:24 PM
Found my problem. Thanks..