Whenever I attempt to visit the Addons > Modules > Cartthrob > Products page after installing CT, I receive the following PHP errors: (http://cl.ly/image/2H0t162L2A2c).

A PHP Error was encountered
Severity: Notice
Message: Undefined variable: channel_dd
Filename: views/product_channels.php
Line Number: 206


A PHP Error was encountered
Severity: Warning
Message: Invalid argument supplied for foreach()
Filename: helpers/form_helper.php
Line Number: 324

This only happens when the default product channel doesn't exist. After creating the default channel I'm able to assign a new, custom product channel and delete the default.

I'm running EE 2.8.1 and CT 2.5.

Is this a known bug in Cartthrob, and is there a way to assign a product channel without first creating the default products channel?

  • Jon, do you have any other existing channels? It seems that you would need at least one for this page to display correctly. You could create a temporary/dummy channel and proceed as you were, then remove it later.
    – SyA
    Jul 28, 2014 at 18:20
  • @SyA Nope, I intentionally didn't create the sample products channel because I didn't want/need to. It seems odd to require dummy content.
    – Jon Horton
    Jul 29, 2014 at 19:13

1 Answer 1


So I know this question was posted a while back, but I arrived at it when I had the same problem and thought I would share my solution.

In exp_cartthrob_settings table in the database, find the rows with the key 'product_channels' and 'product_channel_fields', duplicate these rows and change the site_id and key values to match the site and channel field IDs.

This was useful for me when I was setting up my MSM second site. Also, I had created the new Products channel first in the MSM site so that I could get the channel field IDs.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.