我想在Opencart过滤器中添加一个onclick事件来替换隐藏在页面外的提交按钮.我假设这应该用javascript/jquery来完成,但是实现有点超出我的范围,你能帮忙吗?
PHP:
<div class="box">
<div class="box-heading"><?php echo $heading_title; ?></div>
<div class="box-content">
<ul class="box-filter">
<?php foreach ($filter_groups as $filter_group) { ?>
<li><span id="filter-group<?php echo $filter_group['filter_group_id']; ?>"><?php echo $filter_group['name']; ?></span>
<ul>
<?php foreach ($filter_group['filter'] as $filter) { ?>
<?php if (in_array($filter['filter_id'], $filter_category)) { ?>
<li>
<input type="checkbox" value="<?php echo $filter['filter_id']; ?>" class="click_checkbox_manufacturers-filter" id="filter<?php echo $filter['filter_id']; ?>" checked="checked" />
<label for="filter<?php echo $filter['filter_id']; ?>"><?php echo $filter['name']; ?></label>
</li>
<?php } else { ?>
<li>
<input type="checkbox" value="<?php echo $filter['filter_id']; ?>" class="click_checkbox_manufacturers-filter" id="filter<?php echo …
Run Code Online (Sandbox Code Playgroud) 进入Magento只需几周,设法开始使用高级导出配置文件(非常方便),我想要做的是将url值添加到其中一个输出列,特别是图像URL.我想将url追加到路径输出的开头.
有人可以帮忙吗?
<action type="catalog/convert_adapter_product" method="load">
<var name="store"><![CDATA[0]]></var>
<var name="filter/price/from"><![CDATA[0.01]]></var>
<var name="filter/price/to"><![CDATA[999999]]></var>
<var name="filter/visibility"><![CDATA[4]]></var>
<var name="filter/status"><![CDATA[1]]></var>
</action>
<action type="catalog/convert_parser_product" method="unparse">
<var name="store"><![CDATA[0]]></var>
<var name="url_field"><![CDATA[0]]></var>
</action>
<action type="dataflow/convert_mapper_column" method="map">
<var name="map">
<map name="name"><![CDATA[ItemTitle]]></map>
<map name="upc"><![CDATA[EANBarCode]]></map>
<map name="description"><![CDATA[ItemTextDescription]]></map>
<map name="sku"><![CDATA[SKU]]></map>
<map name="qty"><![CDATA[StockLevel]]></map>
<map name="price"><![CDATA[CostPrice]]></map>
<map name="manufacturer"><![CDATA[Brand]]></map>
<map name="ebaycategory1"><![CDATA[eBayCategory1]]></map>
<map name="ebaycategory2"><![CDATA[eBayCategory2]]></map>
<map name="image"><![CDATA[Image1]]></map>
<map name="description"><![CDATA[ListingDescription]]></map>
<map name="name"><![CDATA[ListingTitle]]></map>
<map name="msrp"><![CDATA[OriginalRetailPrice]]></map>
<map name="conditionnote"><![CDATA[SellerNotes]]></map>
</var>
<var name="_only_specified">true</var>
</action>
<action type="dataflow/convert_parser_csv" method="unparse">
<var name="delimiter"><![CDATA[,]]></var>
<var name="enclose"><![CDATA["]]></var>
<var name="fieldnames">true</var>
</action>
<action type="dataflow/convert_adapter_io" method="save">
<var name="type">file</var>
<var name="path">var/export</var>
<var name="filename"><![CDATA[testing123.csv]]></var> …
Run Code Online (Sandbox Code Playgroud) Wordpress WooCommerce StoreFront Theme在WooCommerce StoreFront Customiser的标题中排队样式;
<style id='storefront-woocommerce-style-inline-css' type='text/css'></style>
<style id='storefront-style-inline-css' type='text/css'></style>
Run Code Online (Sandbox Code Playgroud)
我似乎花了更多的时间来纠正这些风格,而不是定义我想要的东西.有谁知道如何删除它们或禁用Storefront自定义程序?
我想在Opencart 1.5.4中设置其他页面和类别布局.
我已进入一个阶段,如果我将新类别的路径输入地址栏,新模板会显示我想要的,但我似乎无法在OC中注册该路由更改.
如果我在.htaccess文件中指定了更改,则新模板会按预期加载,但我不是这个问题的正确答案(尽管它有效).
添加.htaccess(我确定不是正确的方法)
RewriteRule ^skis$ index.php?route=product/categories&path=1 [L,QSA]
Run Code Online (Sandbox Code Playgroud)
我创建了两个新文件
/catalog/view/theme/default/template/product/categories.tpl
/catalog/controller/product/categories.php
Run Code Online (Sandbox Code Playgroud)
在/catalog/controller/product/categories.php中,我更改了内容以反映新的tpl文件;
class Controllerproductcategories extends Controller {
Run Code Online (Sandbox Code Playgroud)
.
if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/product/categories.tpl')) {
$this->template = $this->config->get('config_template') . '/template/product/categories.tpl';
} else {
$this->template = 'default/template/product/categories.tpl';
}
Run Code Online (Sandbox Code Playgroud)
所以总结一下
任何人都有任何想法,我可能会试图让这个正常工作?我有大量模板可以为产品,类别和信息页面创建,因此我们希望正确地执行此操作.
Tx提前
斯图
我在 Wordpress 中使用 Unite 主题和我创建的子主题。
当尝试删除操作时,php 错误表明子主题中的functions.php 文件在包含我要覆盖的挂钩的父/inc/extras.php 之前加载。
尝试正确地完成所有事情,而不是仅仅在父主题中进行快速而肮脏的更改。
父/inc/extras.php从包含在父functions.php中加载;
add_action('woocommerce_before_main_content', 'unite_wrapper_start', 10);
add_action('woocommerce_after_main_content', 'unite_wrapper_end', 10);
function unite_wrapper_start() {
echo '<div id="primary" class="col-md-8">';
}
function unite_wrapper_end() {
echo '</div>';
}
Run Code Online (Sandbox Code Playgroud)
当我将删除添加到同一个文件时,它可以工作;
add_action('woocommerce_before_main_content', 'unite_wrapper_start', 10);
add_action('woocommerce_after_main_content', 'unite_wrapper_end', 10);
function unite_wrapper_start() {
echo '<div id="primary" class="col-md-8">';
}
function unite_wrapper_end() {
echo '</div>';
}
remove_action('woocommerce_before_main_content', 'unite_wrapper_start',10);
Run Code Online (Sandbox Code Playgroud)
但是,当我添加到子functions.php 文件时,它没有;
remove_action('woocommerce_before_main_content', 'unite_wrapper_start',10);
Run Code Online (Sandbox Code Playgroud)
子functions.php 文件肯定正在加载和工作...
为什么会这样呢?
我正在尝试使用Amazon MWS API检索特定SKU的费用估算。我有示例文件,已经阅读和阅读,但是我无法弄清楚如何实际指定要提交的SKU。
我有针对模拟文件的示例文件GetMyFeesEstimateSample.php,但这是响应文件,不是吗?
这是我所拥有的,如何为请求指定SellerSKU?
<?php
/*******************************************************************************
* Copyright 2009-2016 Amazon Services. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License");
*
* You may not use this file except in compliance with the License.
* You may obtain a copy of the License at: http://aws.amazon.com/apache2.0
* This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
* CONDITIONS OF ANY KIND, either express or implied. See the License for the
* specific language …
Run Code Online (Sandbox Code Playgroud) 所以这是我正在尝试使用的数组的一部分,它是从xml文件中提取的.
Array
(
[0] => Array
(
[SKU] => 0016
[StandardProductID] => 32109876453210
[Condition] => NEW
[ItemPackageQuantity] => 1
[Currency] => GBP
[StandardPrice] => 5.00
[DescriptionData] => Array
(
[Title] => Product Title
[Brand] => Franks
[Ingredients] => Array
(
[Ingredient] => Array
(
[0] => Water (Aqua)
[1] => Dicetyldimonium Chloride
)
)
Run Code Online (Sandbox Code Playgroud)
我已经知道我可以使用以下方法访问数组的第一列:$ Details = std_class_object_to_array($ xml);
foreach ($Details[product] as $Detail) {
if (strtoupper(trim(!empty($Detail[SKU])))) {
$SKU = (strtoupper(trim($Detail[SKU])));
echo $SKU;
}
}
Run Code Online (Sandbox Code Playgroud)
但是我该如何访问其他列,DescriptionData/Title和DescriptionData/Ingredients/Ingredient.有人可以放在一起或指出我正确的方向与阵列中的不同级别一起工作吗?
提前谢谢了
php ×3
opencart ×2
wordpress ×2
amazon-mws ×1
arrays ×1
foreach ×1
html ×1
javascript ×1
jquery ×1
magento ×1
themes ×1
woocommerce ×1