开发者

Pass php object to different script in magento

I have a php script that's called in by xml to show on the product page as a tab.

I need to be able to to retrieve the attributes of the 开发者_StackOverflowcurrent product shown in the script as well. for example:

<?php echo $_product->getSKU() ?>

Does any one have any idea how to pass the object, or retrieve the current products ID/attributes?

Thanks so much


you can use json_encode($object) to output to JSON and json_decode($text) to put it back as an object later. There are other way, depending what you wanna do. Be more specific?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜