Strange Issue

5 posts by 2 authors in: Forums > CMS Builder
Last Post: March 21, 2012   (RSS)

By KCMedia - March 20, 2012

Hi

I have been working on this site to build cmsb into it but now i have come to building a small part of cmsb into the shop system to display some ad bars down each side of the site and i am having issues, the coding that has been done by someone for the store is all over the place and i cant get cmsb to work inside the existing code.

I have attached the php file for the store and there is a includes file with the layout for the ads on one of the lines but when every i run the page i get errors.
http://www.kidsbazaar.com.au/Shop/store/ is the link to the shop where the errors can be seen and i have attached the code for both the includes file and the layout file for the store.

Some help with this would be good i am stumped on this.
Thanks



Craig

KC Media Solutions

www.kcmedia.biz
Attachments:

ads-inc-shop.php 2K

layout-inc.php 10K

Re: [kcmedia] Strange Issue

By (Deleted User) - March 20, 2012

Hi Craig,

After a quick look I can see that you've defined a function which you later call inside a foreach loop that depends on the array $categories_result.

I haven't been able to determine where you create the array $categories_result but, ignoring that, the error message Undefined Index: subCategories.... indicates that the key 'subCategories' is not set in the array so when you try to assign a value from that undefined key, you get the error.

If you want to suppress this error message, you can simply add '@' in front of the reference:
$categories_result = @$item["subCategories"];

but this would mean that $categories_result (within the scope of the function) would not be set, causing the later references to it to also throw up errors.

I'll have a more detailed look and let you know what I can determine, but in the meantime it might be worth sending over the ftp and account details via the 2nd level support request.

Thanks,

Tom

Re: [Tom P] Strange Issue

By KCMedia - March 20, 2012

Hi Tom

like i said the shop was written by someone other than us and all we want to do is include the ads on the page but we cant because of the errors being produced on the page.

the only code we have included is the code at the top of the page and the includes file just inside the body of the html tag.
Thanks



Craig

KC Media Solutions

www.kcmedia.biz

Re: [kcmedia] Strange Issue

By (Deleted User) - March 21, 2012

Hi Craig,

I've not been able to make any headway on this from the two files you've sent over so could you submit a second level request https://www.interactivetools.com/support/email_support_form.php so I can see how everything interacts otherwise?

Thanks,

Tom