Post by iplocker » Thu Dec 31, 2020 7:38 am

Hello.
Can I ask please if index tag in ocmod's are working ?
I see the documentation : https://github.com/opencart/opencart/wi ... ion-System and I see it does .

But I have wrote a ocmod and I m struggling where I have made a mistake because the index=5 is not working and it changes all the referring code in the file.
I am attaching the ocmod extension which is Add Model at Related Products at Admin

Thanks

Attachments

Last edited by iplocker on Thu Dec 31, 2020 4:04 pm, edited 1 time in total.

Active Member

Posts

Joined
Sun May 26, 2013 6:39 pm


Post by sw!tch » Thu Dec 31, 2020 9:22 am

You would want to use index from the search tag.

Also if I recall index count starts at zero. So, unless you already accounted for that it would probably be 4 instead of 5.

ex:

Code: Select all

<search index="4">
If this is something you plan on putting on the marketplace, you may want consider OC's event system and familiarize yourself with that.
-

Full Stack Web Developer :: Send a PM for Custom Work.
Backup and learn how to recover before you make any changes!


Active Member

Posts

Joined
Sat Apr 28, 2012 2:32 pm
Location - USA

Post by straightlight » Thu Dec 31, 2020 10:09 am

The extension title is wrong, however. It's not the SKU being modified in there, it's rather the model.

The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.


Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by straightlight » Thu Dec 31, 2020 10:27 am

What is the actual issue?

The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.


Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by iplocker » Thu Dec 31, 2020 4:03 pm

Hello.

Thanks for the replies.
The issue was that I didnt count the 0 place !!!! Gosh spent so much time for this !
I am not going to put it in the market and sorry for the wrong title in the extension ,yes its calling the model not the sku .

Best Wishes !

Active Member

Posts

Joined
Sun May 26, 2013 6:39 pm

Who is online

Users browsing this forum: dsclifos, paulfeakins and 38 guests