Author Topic: Listing Grid %ID% Replacement  (Read 4402 times)

Offline dhigz

  • Newbie
  • *
  • Posts: 27
  • Karma: +8/-0
    • View Profile
    • My AbanteCart Site:
Listing Grid %ID% Replacement
« 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
Don Higbee

Offline abolabo

  • core-developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 1781
  • Karma: +247/-11
  • web for all, all for web!
    • View Profile
    • AbanteCart
Re: Listing Grid %ID% Replacement
« Reply #1 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.
“No one is useless in this world who lightens the burdens of another.”
― Charles Dickens

Offline dhigz

  • Newbie
  • *
  • Posts: 27
  • Karma: +8/-0
    • View Profile
    • My AbanteCart Site:
Re: Listing Grid %ID% Replacement
« Reply #2 on: July 30, 2015, 06:32:24 PM »
Found my problem. Thanks..
Don Higbee

 

Powered by SMFPacks Social Login Mod