Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/90.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/django/19.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Html 如何移动';添加到购物车';,价格,以及';产品选项';在页首_Html_E Commerce_Cart - Fatal编程技术网

Html 如何移动';添加到购物车';,价格,以及';产品选项';在页首

Html 如何移动';添加到购物车';,价格,以及';产品选项';在页首,html,e-commerce,cart,Html,E Commerce,Cart,以下是我试图做的: 我想移动“添加到购物车”按钮,以及所有其他价格和变化选项,使其位于产品图像旁边,产品信息从定价信息下方开始 我认为这些是代码的相关部分,但我还是一个初学者,所以不能确定 <?php if((get_option('hide_addtocart_button') == 0) && (get_option('addtocart_or_buynow') !='1')) : ?> <?php

以下是我试图做的:

我想移动“添加到购物车”按钮,以及所有其他价格和变化选项,使其位于产品图像旁边,产品信息从定价信息下方开始

我认为这些是代码的相关部分,但我还是一个初学者,所以不能确定

<?php if((get_option('hide_addtocart_button') == 0) &&  (get_option('addtocart_or_buynow') !='1')) : ?>
                            <?php if(wpsc_product_has_stock()) : ?>
                                <div class="wpsc_buy_button_container">
                                        <?php if(wpsc_product_external_link(wpsc_the_product_id()) != '') : ?>
                                        <?php $action = wpsc_product_external_link( wpsc_the_product_id() ); ?>
                                        <input class="wpsc_buy_button" type="submit" value="<?php echo wpsc_product_external_link_text( wpsc_the_product_id(), __( 'Buy Now', 'wpsc' ) ); ?>" onclick="return gotoexternallink('<?php echo $action; ?>', '<?php echo wpsc_product_external_link_target( wpsc_the_product_id() ); ?>')">
                                        <?php else: ?>
                                    <input type="submit" value="<?php _e('Add To Cart', 'wpsc'); ?>" name="Buy" class="wpsc_buy_button" id="product_<?php echo wpsc_the_product_id(); ?>_submit_button"/>

以下是您希望的格式:

<div id="container">
    <div id="maincolumn" style="float:left">
        <div id="itempreview" style="float:left">
            <!-- HTML/PHP goes here -->
        </div>
        <div id="itemsidebar" style="float:right">
            <div id="addtocart">
                <!-- HTML/PHP goes here -->
            </div>
            <div id="itemdescription">
                <!-- HTML/PHP goes here -->
            </div>
        </div>
    </div>
    <div id="items" style="float:right">
        <!-- HTML/PHP goes here -->
    </div>
</div>


为了便于将来参考,您可以使用图像标签嵌入图像。您需要编辑页面的整个HTML,而不仅仅是相关的PHP代码。这需要的不仅仅是你提供的片段。感谢这位基督徒,我无法嵌入图像,因为我还没有10个声誉,我感谢你让人们看到它。如果有人愿意帮助我,我已经将wpsc-single_product.php的全部代码粘贴到了。谢谢很抱歉,我花了这么长时间才回复,但我不知道“样式”编码应该放在哪里,但是,使用我自己的div id和您的建议,我已经成功地做到了我想要的。你的帮助是无价的,谢谢!编辑:嗯,更正:我一直在Firefox中工作,刚刚注意到Chrome和IE中的问题仍未解决。产品选项拒绝从图像下方移动到图像右侧。这怎么可能!?有什么想法吗?@Reibusu我对Chrome不起作用有点困惑,因为它的HTML解析器类似于Firefox,但对于IE,我想这是因为它不会立即起作用。您可能需要尝试将样式信息“marginleft:auto”添加到“itemsdescription”div(要移到右侧的div)。我从来没有用过它来做任何事情,除了将一个div居中,所以它可能被证明是无效的,但值得一试。没有乐趣,我尝试了我能想到的所有显示、位置、浮动和边距组合。@Reibusu那么,我什么都没有了。设计和CSS不是我的强项;我只是把我知道的告诉别人。很抱歉,我帮不上更多的忙,但我祝你好运,让造型开始工作。
`/*single product page*/
.imagecol,.productcol {float:left;}
.productcol {vertical-align:top; width:100%; margin:0 0 0 5px;}
.single_product_display h1  {line-height:20px; margin:0 0 17px;}
.single_product_display form  {margin:20px 0 0;}
.single_product_display label {float:left; margin:0 10px 0 0;}
.single_product_display input[type="text"] {width:20px; margin:0 0 0 10px; border:1px         solid #CCC;}
.pricedisplay {font-size:18px; font-weight:normal;}
.single_product_display form  {float:left;}
.single_product_display .wpsc_buy_button_container  {float:left; text-align:left     !important;}
.single_product_display .wpsc_buy_button {background:#CB8700; border:0; padding:5px !important; color:#FFF; cursor:pointer;}
<div id="container">
    <div id="maincolumn" style="float:left">
        <div id="itempreview" style="float:left">
            <!-- HTML/PHP goes here -->
        </div>
        <div id="itemsidebar" style="float:right">
            <div id="addtocart">
                <!-- HTML/PHP goes here -->
            </div>
            <div id="itemdescription">
                <!-- HTML/PHP goes here -->
            </div>
        </div>
    </div>
    <div id="items" style="float:right">
        <!-- HTML/PHP goes here -->
    </div>
</div>