douhoujun9304 2013-09-16 23:51
浏览 26
已采纳

我可以使用Magento管理员为现有的原始php商店供电

I have a previously made raw php store that uses a very simple database of products to power the site. There is no cart in this store. Basically I want to be able to use the magento admin but not it's standard theme structure with modules and such.

My old store consisted of a few files. EX.

index.php

catalog.php?category=Batteries

content.php?title=About Us

So for example... in catalog.php I want to use my same old html code but use raw php to loop through all the products in the catalog I created with the magento admin.

I just want to use my custom php pages from start to finish but use magento in between like so:

So this would be catalog.php:

<html>
...
all my other stuff I already made like the header
<?php
// then something like this
foreach ($magento_products as $product) {
    echo $product->name . '<br />';
}
?>
the all the other stuff I've already made like the footer
...
</html>

SO IS this is possible with magento? and if so, where do I put my raw php files at so they can access magento's database? If not, what is the next best way of doing this without having to create an entire magento theme.

  • 写回答

1条回答 默认 最新

  • dongpo2340 2013-09-17 12:34
    关注

    Probably that would be possible, but

    • essentially you are using the same methods from magento (so no performance gain)
    • to keep the same amount of features, you would be required to have a lot of php pages

    Long story short, the easier way would be to make some magento templates and apply your custom design.

    Edit: I assumed here the easiest way for you to use magento's data in another script which is to include the magento files and use the underlying models. Taking the data directly out of the database would be even worse in terms of time and complexity.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 2024-五一综合模拟赛
  • ¥15 下图接收小电路,谁知道原理
  • ¥15 装 pytorch 的时候出了好多问题,遇到这种情况怎么处理?
  • ¥20 IOS游览器某宝手机网页版自动立即购买JavaScript脚本
  • ¥15 手机接入宽带网线,如何释放宽带全部速度
  • ¥30 关于#r语言#的问题:如何对R语言中mfgarch包中构建的garch-midas模型进行样本内长期波动率预测和样本外长期波动率预测
  • ¥15 ETLCloud 处理json多层级问题
  • ¥15 matlab中使用gurobi时报错
  • ¥15 这个主板怎么能扩出一两个sata口
  • ¥15 不是,这到底错哪儿了😭