magento-1.6

how to restrict user to access a particular category in magento?

你。 提交于 2019-12-02 06:35:08
I created a website for online shopping and i want to give my admin panel to some vendors so that they insert their own products related with a particular category they are dealing with. For ex :- In electronics category,there are various options like cameras, mobiles etc. 1.So, i want one vendor who is related with mobiles should be allowed only to enter his related products(only mobiles) from admin panel. 2.And he should not be allowed to see or update the products in other categories like cameras.He will only be given access to update his related category. How can i achieve this? Thanks

Programmatically remove block from layout

杀马特。学长 韩版系。学妹 提交于 2019-12-01 08:56:20
问题 I want to remove the product_options_wrapper block from the product view page according to the logedin user via frontend router controller. I know that I can programmatically append a new block but I didn't find a remove function. :-( Tried sth. like that $this->getLayout()->unsetBlock('product_options_wrapper'); $this->getLayout()->getBlock('product.info')->remove('product_options_wrapper'); But nothing works. 回答1: The OP code should work, if it used the correct block name, which is product

How and where to modify Magento search query?

自闭症网瘾萝莉.ら 提交于 2019-12-01 02:48:45
First of all, I found similar questions in SO but there is not any answer for them. So, the first part of the question is a little bit duplicated. I want to improve search results in Magento. Here is what I've done already: 1. Search with AND instead of OR when there are multiple words. 2. Ajax search starts searching from anywhere and not only from the beginning of the fields. 3. Trim the last s from the words to prevent empty results when searching with plurals. 4. I changed the search type from Like to Fulltext or Combine but the results were not better and even were worst, so I leave it as

How and where to modify Magento search query?

懵懂的女人 提交于 2019-11-30 22:32:24
问题 First of all, I found similar questions in SO but there is not any answer for them. So, the first part of the question is a little bit duplicated. I want to improve search results in Magento. Here is what I've done already: 1. Search with AND instead of OR when there are multiple words. 2. Ajax search starts searching from anywhere and not only from the beginning of the fields. 3. Trim the last s from the words to prevent empty results when searching with plurals. 4. I changed the search type

How to remove links from top.liknks when loggin in / out in Magento 1.6.2

允我心安 提交于 2019-11-30 20:44:25
问题 I've had a good search around and found the customer_logged_in and customer_logged_out tags but I can't get them to work properly, this I'm sure is down to my misunderstanding of them. My goal is to hide the log in, account and checkout links from the block top.links when the user is not logged in and show them when the user is logged in. I have placed the following at the end of my local.xml file to try and remove the log in link: <customer_logged_in> <reference name="top.links"> <action

Cash On Delivery activated Admin Only ( Not Frontend enabled ) - Magento?

北城余情 提交于 2019-11-30 14:01:25
I am using magento for a time now. I wanted to know is it possible to enable Cash On Delivery option for admin use only. I want to use it as Store Pickup... So this way manual orders can be only created in admin panel for those who want Store Pickup. I dont want this to be shown in Magento Frontend Store. Can you all help me out ??? Joseph at SwiftOtter There are a number of ways to achieve this, but they require a familiarity with the Magento ecosystem. I would discourage using CSS to hide it from the end user, because someone that was slightly knowledgeable about CSS could easily unhide it

Overriding/Extending the Magento core javascript files

纵然是瞬间 提交于 2019-11-29 19:55:35
Last days as a result of some customer complains and discussion with our marketing guys I've got a request to change the default behavior of the configurable products options. They asked me to remove the + $xx.xx from the options drop-down as it is confusing the customers/visitors and just leave the available options without displaying the price change. Fair enough from their point of view, but it is a bit tricky from developers point of view I think. The site is running Magento CE 1.6.2, and the file which we need to override/change is /public_html/js/varien/configurable.js. We need to change

Cash On Delivery activated Admin Only ( Not Frontend enabled ) - Magento?

僤鯓⒐⒋嵵緔 提交于 2019-11-29 19:49:01
问题 I am using magento for a time now. I wanted to know is it possible to enable Cash On Delivery option for admin use only. I want to use it as Store Pickup... So this way manual orders can be only created in admin panel for those who want Store Pickup. I dont want this to be shown in Magento Frontend Store. Can you all help me out ??? 回答1: There are a number of ways to achieve this, but they require a familiarity with the Magento ecosystem. I would discourage using CSS to hide it from the end

Magento - get rule from coupon code

喜你入骨 提交于 2019-11-29 03:47:44
问题 I have to retrieve the rule associated to a coupon code in order to display in quote the discount percentage of that rule. the simplest way is to calculate directly from quote amounts, but i want to retrieve directly the rule and then get the discount percentage from it. this is what i tried: $rule = Mage::getModel('salesrule/coupon'); $rule->load($couponCode); by this way i still havent retrieved rules attributes. any help? thanks. 回答1: To load a coupon by code, pass 'code' as 2nd param to

Cannot update Stock Item Quantity for a Product in Magento 1.6.2

隐身守侯 提交于 2019-11-29 02:29:41
I am trying to update the stock quantities of products in Magento from within a script. I load the product, set the stock quantity, and save - but the quantity remains unchanged. // get stock data $stockData = $product->getStockItem(); printf(PHP_EOL.'Stock: qty=%d, instock=%s, man_stock=%s, use_cfg_man_stock=%s'.PHP_EOL, $stockData->getData('qty'), $stockData->getData('is_in_stock'), $stockData->getData('manage_stock'), $stockData->getData('use_config_manage_stock') ); // prints out qty=0, instock=, man_stock=, use_cfg_man_stock= // $stockQty = 1 $product->stockItem->setData('qty', $stockQty)