If this is your first visit, check our documentation. To post, register or login.
Forums / Community Contributed Add-Ons / Contribution-Writing Guidelines / Trouble with custom product handler

Trouble with custom product handler

Started by retched on 18 Dec 2012, 4:56 PM · Views: 2,466

Results 1 to 4 of 4
18 Dec 2012, 4:56 PM
#1
retched avatar

retched

Totally Zenned

Join Date:
Jun 2007
Location:
Bronx, New York, United States
Posts:
949
Plugin Contributions:
3

Post #1 by retched

Currently I made a product handler to handle a different type of product from the basic product type.

I managed to get the "EasyPopulate" mod to work with it by creating a different version and changing a bunch of lines in the code.

I managed to get the update_product.php to work with it as well when updating.

But my problem is that when I add a new product and then visit the product page on the front end. I can see the product listed (it shows the product title and price information), I just get a blank page. Furthermore, when I just go in and update the same product (not changing anything), it then shows the correct information.

Can anyone assist me or tell me where I can get started in debunking this.

18 Dec 2012, 5:39 PM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,512
Plugin Contributions:
176

Post #2 by drbyte

retched:

But my problem is that when I add a new product and then visit the product page on the front end. I can see the product listed (it shows the product title and price information), I just get a blank page. Furthermore, when I just go in and update the same product (not changing anything), it then shows the correct information.
You didn't say whether that "when I add a new product" is by manual entry or via Easy Populate.
If it's by EasyPopulate then it would seem that your customized import isn't taking into account all the things that are done when you do it by hand. You'll need to sort out those differences.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

18 Dec 2012, 5:44 PM
#3
retched avatar

retched

Totally Zenned

Join Date:
Jun 2007
Location:
Bronx, New York, United States
Posts:
949
Plugin Contributions:
3

Post #3 by retched

DrByte:

You didn't say whether that "when I add a new product" is by manual entry or via Easy Populate.
If it's by EasyPopulate then it would seem that your customized import isn't taking into account all the things that are done when you do it by hand. You'll need to sort out those differences.

That's the odd thing DyByte. I can add products using easyPopulate just fine and all the product details show. It's when I use the "normal" product add that I get blanks until I update (that is, go back to the product listing and choose edit) it. The funny thing is that I can go to the database and see the product added just not sure why nothing is being pulled from the DB.

18 Dec 2012, 5:56 PM
#4
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,512
Plugin Contributions:
176

Post #4 by drbyte

Perhaps your collect_info and preview and update scripts aren't properly considering both entry points: new and existing. You'll note that the top of those files contains some defaults for "new" and an SQL query for "edit"/existing. If your code doesn't take into consideration both methods, that could explain your symptoms.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.