e-commerce

How to get data for an entity (for example customer) from eav_attribute table to be shown in Customer Grid for admin

半城伤御伤魂 提交于 2019-11-29 10:51:51
I have extended Magento’s customer information form to store an additional attribute for customer. Lets call it ‘customer_referrer_id’. I have a role ‘referrer ‘ who has access to customer grid and order grid only. But, I want to restrict a referrer to see only those customers in the grid who have the customer_referrer_id set as the referrer’s id who has logged in. Similarly for orders, the logged in referrer shall be able to see only those orders made by customers who have customer_referrer_id = loggedin_referrer_id. I already know how to override a module and that I have to mainly override

Display magento products by category ID

无人久伴 提交于 2019-11-29 02:45:41
I need to know how can I display products in a page like (cart, below total) only few products by ID. Eg: products with id 2,3,4 and 5. <div class="freeProducts voucher code"> <?php $categoryid = 64; $category = new Mage_Catalog_Model_Category(); $category->load($categoryid); $collection = $category->getProductCollection(); $collection->addAttributeToSelect('*'); foreach ($collection as $_product) { ?> <a href="<?php echo $_product->getProductUrl() ?>"><img src="<?php echo $this->helper('catalog/image')->init($_product, 'small_image')->resize(200); ?>" width="200" height="200" alt="" /></a> <a

Shopping cart and stock management

浪子不回头ぞ 提交于 2019-11-29 00:51:37
问题 I am currently building an ecommerce site with PHP/MySQL. Recently, I have been working on the Shopping Cart integration. The client wanted to ensure that stock was available to potential buyers, so I created a stock management system. The shopping cart works as follows: Client adds a quantity of an item to his cart. Item quantity is reserved from available stock in the database. No one else can purchase reserved stock. Stock remains reserved until client processes order - where stock is then

Magento: how to get the price of a product with catalog rules applied

时光毁灭记忆、已成空白 提交于 2019-11-29 00:24:24
问题 I'm developing a script (external to Magento, not a module) which aims to output a text list of all available products, their prices and some other attributes. However, catalog price rules don't seem to be applied to product prices. If I use any of the following: $_product->getPrice() $_product->getFinalPrice() I get the normal price (without rules being applied). If I use: $_product->getSpecialPrice() I get null unless the product actually has a special price inserted in the product itself

PHP run a script when a session expires

杀马特。学长 韩版系。学妹 提交于 2019-11-28 13:48:56
I have a cart application with unique items with qty 1 - I need to deplete the stock qty when a user puts one in the basket to avoid someone else buying it. Problem is, that if they abandon the cart without buying I need to put the item back in stock. Is there a way I can replenish the stock when the cart session expires? ie run a script to replace the stock. mishu You can use session_set_save_handler to create a custom session-handling class. When you do this, you can decide other actions that need to run either when the garbage collector is called or at session destroy. If you decide to work

Online payments for a middleman

懵懂的女人 提交于 2019-11-28 12:12:51
I'm new to online payments and would like some opinions on my task. Here is the scenario: I have a website where people buy and sell digital photos. A seller has a photo and wants to sell it. They create an ad on the site and upload the photo into the website database. Buyers looking for photos come to the site and buy them. The buyer pays the asking amount and then can download the photo. As the middleman, I'd like to charge the seller a fee or percentage of the selling price. The buyer shouldn't pay any website fees, just the selling price. My question is - what is the best way to do this? I

How can i generate an API key for Baidu China for an website store locator?

时光怂恿深爱的人放手 提交于 2019-11-28 09:30:01
I have been asked by our developers to give them an API key for Baidu maps so they can set up our on site store locator and I'm not really sure how to go about doing this. I tried to set up an account on Baidu but it asked for a chinese mobile number. Do I have to get one of these before I can get the key? And how easy is it to work out how to obtain the key once i've got an account? Can anyone advise on the best way to set this up? Thanks in advance! Update 2016: It now appears to be possible to use non-Chinese phone numbers to create Baidu accounts, see this page . Once you're logged into

Enable template path hint in admin pages - Magento

坚强是说给别人听的谎言 提交于 2019-11-28 03:42:55
I want to enable template path hints in admin panel. I know how to do it for the front end, but for back end?? I actually want to edit the admin panel . Thanks in advance.. You can do it by changing the database directly. If you have something like phpMyAdmin that is a good way to gain access. Enter this SQL. INSERT INTO `core_config_data` (`scope`, `scope_id`, `path`, `value`) VALUES ('websites', '0', 'dev/debug/template_hints', '1'); When you are done with path hints just delete the matching record from core_config_data Or update the value field to 0 instead of deleting the whole record, it

API For Direct Deposit (ACH, EFT, Whatever) [closed]

℡╲_俬逩灬. 提交于 2019-11-28 03:23:15
I'm looking for a way to automate a transfer from one bank account to another, without the end user having to login to something like paypal or amazon payments to complete the process (by transferring their on-line balance to their bank account). I've looked around online a bit, and found some vendors that seem to be able to do that, but API documentation doesn't make me feel sure about it. Can anyone recommend a service they've used to do something like this? Obviously I'm looking for a web based API. The complete process is a middleman site that collects payments (that's the easy part), then

Designing a SQL schema for a combination of many-to-many relationship (variations of products)

蹲街弑〆低调 提交于 2019-11-28 03:12:57
I hope the title is somewhat helpful. I'm using MySQL as my database I am building a database of products and am not sure how to handle storing prices/SKU of variations of a product. A product may have unlimited variations, and each variation combination has its own price/SKU/etc.. This is how I have my products/variations table set up at the moment: PRODUCTS +--------------------------+ | id | name | description | +----+------+--------------+ | 1 | rug | a cool rug | | 2 | cup | a coffee cup | +----+------+--------------+ PRODUCT_VARIANTS +----+------------+----------+-----------+ | id |