天道酬勤,学无止境

shop

下载链接隐藏(download link hidden)

问题 我正在开发一个商店系统,我有以下链接 http://cmstutorials.org/shop/downloads/2793156879(原始链接是 cmstutorials.org/shop/downloads.php?download=2793156879) 我想要做的是让用户下载与 ID 2793156879 匹配的项目,而不显示文件的实际链接。 就像他们在themeforest.net上一样 我该怎么做? 回答1 这个例子应该可以帮助你: $len = filesize($filename); header("Content-type: image/jpeg"); header("Content-Length: $len"); header("Content-Disposition: inline; filename=\"$new_filename\""); readfile($filename); 或另一个,对我来说看起来更简单: <?php header('Content-type: image/jpeg'); $f = file_get_contents('path/to/image.jpg'); print $f; ?> PS当然,您的content-type必须适合您的文件。 回答2 header () 必须在发送任何实际输出( echo )之前调用

2021-08-10 20:30:46    分类:技术分享    php   hyperlink   shop

download link hidden

I'm working on a shop system and I have the following link http://cmstutorials.org/shop/downloads/2793156879 (original link is cmstutorials. org/shop/downloads.php?download=2793156879) what I'm trying to do is let the user download the item that matches with the id 2793156879 withouth showing the actual link to the file. Like they have on themeforest.net how would I do this?

2021-07-02 08:32:02    分类:问答    php   hyperlink   shop

Problem with Magento connect

Since a while I can't install any magento modules by magento connect anymore because of the code below. Any help would be realy appreciated as I can't find the answer on the internet. Fatal error: Cannot use string offset as an array in /home/username/public_html/mydomain.nl/downloader/lib/Mage/Xml/Parser.php on line 86 Many thanks for the help

2021-07-01 21:33:06    分类:问答    magento   shopping-cart   shop

Changing the number of columns in archive pages in woocommerce

How can I change the number of columns in archive pages in woocommerce? It shows 3 in shop pages, but 4 in archive pages. Thanks

2021-06-27 12:59:31    分类:问答    php   wordpress   woocommerce   product   shop

Aliexpress API - 完整的订购流程(Aliexpress API - full ordering process)

问题 Aliexpress 是否有允许进行完整订购流程的 API? 这意味着拥有自己的 eshop,只需与 API 通信(包括通过 Aliexpress 付款)。 回答1 他们似乎有这个 DEV 中心,但他们说你必须成为卖家才能注册,不知道为什么。 作为买家,我正在寻找一种方法来下载我的订单,因为他们根本不提供报告。 一个问题是它是中文的,所以你可能不得不使用带有翻译选项的浏览器,比如 chrome。

2021-06-23 21:22:22    分类:技术分享    api   shop   webshop

Aliexpress API - full ordering process

Does Aliexpress have an API that allows to make full ordering process? This means to have own eshop and just communicate with API (including payment via Aliexpress).

2021-06-01 12:50:13    分类:问答    api   shop   webshop

WooCommerce:仅在商店中显示正在销售的产品(WooCommerce: Display ONLY on-sale products in Shop)

问题 我需要创建一个产品存档页面(通常是WooCommerce中的“商店”页面),但是仅显示“正在销售”的产品。 基本上,它应该使用与archive-product.php相同的模板布局。 在主菜单中将有一个指向该页面的链接。 我该怎么办? 更新 我设法过滤掉ON SALE产品,并将下面的代码放在if ( have_posts() ) :上方if ( have_posts() ) :行... $args = array( 'post_type' => 'product', 'order' => 'ASC', 'paged' => $paged, 'meta_query' => array( array( 'key' => '_sale_price', 'value' => 0, 'compare' => '>', 'type' => 'numeric' ) ) ); query_posts( $args ); 该代码放置在archive-product.php的副本中,我将其命名为archive-product_sale.php并作为页面模板制作。 但是,这仅适用于简单产品类型,我需要它同时适用于简单产品和变量产品类型。 回答1 @mirus关于简码的答案使我有了一个想法,以了解WooCommerce如何仅查询正在销售的商品。 显然,WooCommerce具有wc_get

2021-04-29 20:39:00    分类:技术分享    wordpress   woocommerce   archive   product   shop

WooCommerce: Display ONLY on-sale products in Shop

I need to create a products archive page (usually the Shop page in WooCommerce) but displays ONLY the ON SALE products. Basically it should use the same template layout as that in the archive-product.php. There will be a link in the main menu that will direct to this page. How do I go about this? UPDATE I managed to filter out the ON SALE products with the code below placed just above the if ( have_posts() ) : line... $args = array( 'post_type' => 'product', 'order' => 'ASC', 'paged' => $paged, 'meta_query' => array( array( 'key' => '_sale_price', 'value' => 0, 'compare' => '>', 'type' =>

2021-04-08 21:46:09    分类:问答    wordpress   woocommerce   archive   product   shop