product

Check Post Type in custom search to get Woocommerce product attributtes

本小妞迷上赌 提交于 2019-12-13 18:13:43
问题 I am implementing a woocommerce website. In here I am providing a search bar to search only the products. <form action="<?php echo get_site_url() ?>" method="GET"> <div class="input-group"> <input type="search" name="s" class="form-control" placeholder="Search Products" required> <input type="hidden" name="post_type" value="products" /> <div class="input-group-btn"> <button class="btn btn-default" type="submit"> <i class="fa fa-search" aria-hidden="true"></i> </button> </div> </div> </form>

WooCommerce Avoid add to cart for non logged user

杀马特。学长 韩版系。学妹 提交于 2019-12-13 17:34:23
问题 In my WooCommerce shop, when a customers is not logged in I would like to avoid him adding to cart asking him to either login or register an account… Is it possible? 回答1: Updated - You could use this 2 little snippets of code, that will: Replace add-to-cart button/link in shop pages and archives pages (for non logged in users). Avoid non logged in customers adding to cart and displaying a custom message. Here is the code: // Replacing add-to-cart button in shop pages and archives pages (forn

Woocommerce - Showing 1 page instead of 4 pages for products on sale

。_饼干妹妹 提交于 2019-12-13 16:22:57
问题 I've got 44 products on sale, and when I put WooCommerce shortcodes [sale_products per_page="12"] I'm getting only 12 products on sale, i.e. 1 page instead of 4 pages. What's wrong? I'm using: WP 4.4.1, WC 2.5.1, Mystile theme. 回答1: Look at "The ‘per_page’ Argument" section on the documentation, it states: Please note : the ‘per_page’ shortcode argument will determine how many products are shown on a page. This will not add pagination to the shortcode. 来源: https://stackoverflow.com/questions

Magento $_product->getName empty

放肆的年华 提交于 2019-12-13 14:50:57
问题 I want to export a custom XML feed from Magento, and this is the following code I use: <?php header('Content-Type: text/xml'); // XML's a handy dandy format include '../app/Mage.php'; // Include the magento core include 'ArrayXml.php'; Mage::app(); //And start up the Magento app $_result = array(); // Make sure we have a result array to store our products $_products = Mage::getModel('catalog/product')->getCollection(); foreach($_products as $_product) { $_result['produs'][] = array( 'denumire

Implement multiple product chooser widget Magento

情到浓时终转凉″ 提交于 2019-12-13 12:29:52
问题 Hi I need to implement a multiple product chooser widget in magento. For this I am using the below code. With this a I can put a multiple sku for the products in the field in admin. But I need to implement a product chooser with a checkboxes so that I can check those and submit. Please check the screenshot here http://www.awesomescreenshot.com/0035hy791a app/code/community/Speroteck/SelectedProductsBlock/etc/config.xml <config> <modules> <Speroteck_SelectedProductsBlock> <version>0.1.0<

Welcome menu in Eclipse product

你离开我真会死。 提交于 2019-12-13 07:31:57
问题 I have a product definition that depends on my feature. In my feature I have dependency on org.eclipse.ui.intro. However, when I launch product I don't see Welcome item in Help menu. What can cause welcome menu not to load? thanks! 回答1: The dependency alone is not enough. Did you follow all the steps required to define an intro? See Defining a minimal intro configuration, which echoes back that old message: You need to register a Intro (aka Welcome) with a product for you to be able to see it

Magento category description

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-13 07:16:17
问题 I have the following problem. My category description above (before the goods). I wish to change the location of the category description. This should be at the bottom (after the goods). I am using magento commerce 1.9 回答1: You need to find the category template, which should be in your theme directory here; app/design/frontend/XXX/YYY/template/catalog/category/view.phtml Where XXX YYY is the directory of the template you are using. If there is no view.phtml file in there, magento will fall

Eclipse RCP config.ini

烂漫一生 提交于 2019-12-13 06:22:19
问题 Is it possible to call and use the confi.ini file generated by RCP product in RCP plugin project ? In the Configuration tab i've added two properies that i want to call and use in my RCP plugin project . The two properties are an URL adress and a KEY . I've added them in the config.ini so when I export my RCP product and deploy it later, other users could modify the KEY or the URL . I hope that my post is clear enough ! Thanks in advance. Ismail 回答1: Properties you define in the config.ini

Magento product and category pages return magento 404

痞子三分冷 提交于 2019-12-13 05:34:06
问题 After upgrading my magento system from version 1.4.1 to 1.6.2 my categorie pages and product pages return the magento 404 error. products do show up on my homepage product lists but i can't get to their detail page because they also return a 404. Any suggestions? My cache is currently disabled for development. 来源: https://stackoverflow.com/questions/9875296/magento-product-and-category-pages-return-magento-404

Featured products in magento home page

天大地大妈咪最大 提交于 2019-12-13 05:23:07
问题 I want to show featured product in home page.So I Created custom module and block file in app/code/local/FeaturedProduct/Catalog/Block/Product/Featured.php Code : class FeaturedProduct_Catalog_Block_Product_Featured extends Mage_Catalog_Block_Product_List { protected $_productCollection; public function fetchProducts() { $this->productCollection =Mage::getModel('catalog/product')->getCollection() ->addAttributeToSelect('*') ->addFieldToFilter('featured_products', array('eq' => '1')); return