Jump to content

how to change the php code to work on product page?


chongshengdz

Recommended Posts

Would you be willing to have the browser bring it in either as an iframe, or as an ajax request?

An iframe will need to have a header issued by CubeCart be removed ("SAMEORIGIN"), and the page being requested undoubtedly is a complete web document, well suited to be in an iframe.

An ajax request may need to be processed to crop away all that is not in the <body> tags.

The product's description is databased and is a value of the product's details array. Once you have the description in the array held in memory, you can add more to it, or replace a {PLACEHOLDER} with $content.

CubeCart also has hooks that can be used to modify details like this without making changes to the code.

I think a hook is the best way to go, but be sure that your hosting provider has set PHP's ' allow_url_fopen ' to enabled.

You might also think to use PHP's 'file_get_contents'.

There is also CubeCart's Request class which is specifically built to get stuff from off-site.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...