Magento - Db Query To Get Full Product URLs?

I am looking to interact with the database outside of Magento. Upon reviewing tables in the database, catalog_product_flat_1 seems to store the majority of the information I am looking to retrieve so this gets me just all about everything but the final step. I am trying to understand the relations within the Magento DB and get all the full product URL's into my newly created table.

The purpose of this is for an SEO/PPC initiative where having a nice list of every product sku, name, brand, description and url directly to the product would make the work a breeze. I have everything working just fine aside from the full product URL. I have been doing a good amount of reading and it appears more people are using SQL injections within the normal Magento methods, but I am looking to do this with the database outside of the site.


Magento: Adding Query String To End Of Product Url?

I am looking for a better way to do a modification.. I am adding a query string to the end of the product url. For example, the url would look like


notice the ?flagged=yes.

I am currently doing this by adding the following code to the list.phtml file:

$query = '?flagged='.$answer;

then I add this query string to the end of the product url by doing this:


I really like to try and leave modifications off the template file.

View 3 Replies View Related

Displaying All Attributes On The Simple Product Table Of A Grouped Product - Magento

I'd like to show all the attributes of a simple product in the grouped product view.

Is there any easy way to do this?

echo $this->htmlEscape($_item->getAttName() works, but then I would have to edit the file every time I had a new attribute, not to mention it would bloat the code if dozens of attributes exist.

Is there anything set up on magento to do this without much hassle?

View 1 Replies View Related

Magento, Custom Product List - Include A Product Listing On A CMS Page ?

I made my own product list page based on Mage_Catalog_Block_Product_List:


class Mage_Catalog_Block_Product_Special extends Mage_Catalog_Block_Product_List
/* Original contents */[code]...

The problem is: The product list shows up just fine, but I get no layered navigation in my left column.This is quite strange, since I am using exactly the same template as normal listings.A couple of things I have checked:

Mage_Catalog_Block_Product_Special just being a proxy class. This doesn't work. Even if I use block type "catalog/product_list" on my CMS page I will not get a layered navigation.There are no extensions that are overriding crucial core classes.I have also tried to create my own module and list it under for example 'mycatalog'. This results in exactly the same problem.I have a feeling this has to do with trying to include a product listing on a CMS page but I have not been able to track down the exact problem.

View 4 Replies View Related

Display Configurable Product In Each Color In Magento Product Listing?

I have a configurable product which is available in many different colors and sizes. I want the configurable product to appear once for every color. My idea is to assign one simple product of the configurable product in every color to the category of the configurable product. Then I want to change the listing, so that the (colored) simple product links to it's master product (the configurable one).

The other way would be, to just assign the configurable product to a category and then list it multiple times with different colors. But I think this would be to complicated.

Solution Sincerely I have lost my code. But here is how I've managed it:

Set visibility for all slave products to "catalog" so that they appear in the product listing Override the Product Model and it's getProductUrl function:

public function getProductUrl($useSid = null)
$product = $this;
$parentIds = $product->getParentProductIds();
if(count($parentIds) > 0 && $product->getTypeId() == Mage_Catalog_Model_Product_Type::TYPE_SIMPLE)
$parent = Mage::getModel("catalog/product")->setId($parentIds[0])->load();
return $this->getUrlModel()->getProductUrl($parent, $useSid);........

View 3 Replies View Related

Checking If A Magento Product Is A A Child Of A Configurable Product

I have the following code to grab a list of Products

$collection = Mage::getModel('catalog/product')->getCollection();
->addAttributeToFilter("category_ids", array('finset'=>$this->category_id));
foreach($collection as $product) {
echo $product->getName();

My question is, how can I NOT echo products that are 'simple' but belong to a parent 'configurable' product. (for example don't show "Red Shirt Medium" as it belongs to "Red Shirt")

I have worked out that this association lives in 'catalog_product_super_link' but I have only just started with Magento and unfortuantely don't know how to do the filtering :)

View 2 Replies View Related

Get All Product Collection Order By Product Name In Magento?

I want to get the product collection order by product name in magento?

View 2 Replies View Related

Retrieve Full Category Path For A Product?

I'm building a shopping cart and I would like to know how can I get the full category path for a product.

Let's say I have the following category structure: "Electronics (parent) -> TV -> Plasma TV" and my product belongs to the last category.

How should I write a script to return full category path like the one above.

My categories table looks like this:

- category_id
- category_parent_id
- category_name

View 2 Replies View Related

Get Product Id In Magento?

In magento,i want to add quick look feature like this have added a hidden input & a div in list.phtml.If i click the div of any product javascript returns product id of first product in that category page.But it should return product id of the selected div.

View 1 Replies View Related

Best Magento Associated Product Options?

I have imported all of my products as configurable and their options as simple product types, all the simple products have the correct size attributes and the configurable products have the right attribute_set. What is the best way of associating the product options with their products? I would rather not do this with SQL.

View 2 Replies View Related

Str_replace Magento Product Name?

I've got a select input of magento simple products on a grouped product page. I want to remove the grouped product name and leave the rest of the SKU. e.g. simple product name: trfu00XS grouped product name: trfu00 result: XS

Have a look below.

<select id="tflitem" onchange="showSelected()" />
<option value="" selected>Size</option>
<?php if (count($_associatedProducts)): ?>
<?php foreach ($_associatedProducts as $_item): ?>
<?php if ($_product->isSaleable()): ?>
<?php if ($_item->isSaleable()) : ?>


View 2 Replies View Related

Magento Pdf Download For Product?

I need to include a pdf icon within my product details page so they can download it as a summary, ideally using the print.css

View 1 Replies View Related

Replacement For # Sign In Product Data For SEF Urls?

I created Search engine friendly (SEF) urls paged on a product database. My function however was rendered useless when I discovered some product entries that contained the "#" or pound sign. What is a good replacement for the "#" sign when making SEF urls?

View 4 Replies View Related

Magento - Using Mage To Edit A Product?

I'm trying to integrate some functionality of Magento into my custom CMS to make it easier for my clients to update some of their products.I already have classes written to retrieve all the data information I need, but I'm trying to figure out how to save changes to a product in the same fashion (IE, attributes such as color, size, packaging). Is this possible to do through mage?Right now I essentially construct a class like below, then have various functions to filter products, sessions, and generate thumbnails... but I can't seem to find anything on editing a product.

$this->model = Mage::getModel('catalog/product');

View 2 Replies View Related

Add Option Value To Product, Then To Cart With Magento?

I searched around for a while and only came up wit solutions that added whole new option sets to products in a Magento store. What I'm trying to accomplish is a way to add a Simple Product to the cart. This Simple Product has some predifined custom options (free text fields) that has to be filled by a php function.So, how can I do this? Let's say I have a product with the ID "111" and a one custom option.

$qty = '1';
$product = Mage::getModel('catalog/product')->load("111");
// set option value in product model?
$cart = Mage::helper('checkout/cart')->getCart();
$cart->addProduct($product, $qty);
// set option value while passing product to car?

View 1 Replies View Related

Add A Simple Product Into Magento Using A Function?

How have I to add a product into Magento using a php function? I have used the API but it is very slow. I have to import about 100.000 records and check the stock everynight.

View 1 Replies View Related

Magento Configurable Product Attributes?

having an issue with magento which i just cant seem to find a solution to.i have tried many ways of getting a configurable products attributes (simple products) and listing them, now i have them listing from 2 ways but the way im working with is below


my only problem with this now is i need to only pull back the size attributes which are in stock - looked through mage files to find solution but just cant see anything - the result i need is done in config product php file but i cant access it from in the code where i need to list the size attribute.

View 1 Replies View Related

Magento: Find Orders Containing A Product?

Is there a way in Magento to find all orders that contain a given product? It would be even better if it could be done from the administration panel. Reports -> Products -> Products Ordered gives me the day the product was sold and how many orders contain it, but I need to know which specific orders include the product.

View 1 Replies View Related

Magento Product Insert Method?

in product save in magento this code not save the products. please find the solution of this problem:


View 2 Replies View Related

Have A Bundled Configurable Product In Magento

Is it possible to have a bundled configurable products in Magento? Take for example I want to sell a set of t-shirt and short on a product page where the customer can choose the number of quantity, the color and the size for the t-shirt and short respectively.

Maybe like this :

T-Shirt [A configurable Product]
Color : [combobox to select color]
Size : [combobox to select Size]
Qty : [input to enter the qty]
Short [Another configurable Product]
Color : [combobox to select color]
Size : [combobox to select Size]
Qty : [input to enter the qty]
[Add to Cart Button]

View 3 Replies View Related

Magento : Using GetModel To Get Product And Category?

I have some code that returns an array of product details including a url_path. To create a link to this product I have to know the category and subcategory of the product. Unfortunately out all the data this method returns neither the category or sub category are pulled out.Here is the code I have that gets a product:

$product_id = array(231, 230,229,228);

foreach ($product_id as $id){
$productDetails = Mage::getModel('catalog/product')->load($id)->getData();
echo $productDetails['url_path'].'<br />';

Is it possible to get the category and subcategory for each product?

View 2 Replies View Related

Translate Product Name And Info In Magento?

Magento provide translation feature, a nice one for e-commerce platform. But it seems to me that the translation is only for the predefined magento keyword, like 'add to cart', 'add to wishlist' etc and not for the product name, info, and description that the user input to the store.

View 2 Replies View Related

Magento Configure A Product While Comparing?

I'd like to add some functionality to the comparing feature Magento offers. When comparing products, users are presented with an 'Add to cart' button. This feature only works well for simple products. When pressing the add to cart button on a configurable or bundled product the user is redirected to the product detail, out of the compare view.

Would it not be much better when a user could configure the products inside the compare view?!

Do you guys know of a magento plugin that does this trick? Or have ideas how this feature could be implemented in the existing source?

View 1 Replies View Related

Create A Downloadable Product Through Magento API?

I am new to Magento, and are using their API. What I want to ask, is it possible to create a downloadable product through the API? The documentation example is just for creating a new simple product, and if I use the API to view the of a downloadable product, I don't see any attribute that link to a downloadable file assigned to that product.

View 1 Replies View Related

Add New Product Image Type (Attribute) In Magento

I am trying to add a new image type in the product admin panel. I created a new attribute (hero_banner) set it's type to media image (similar to how the thumbnail image and small_image have been set up). I then added it to the Default attribute set under images. It appears fine in the admin panel and allows you to assign images as the hero but then when I try and echo the image path into the phtml the templates stop rendering. The code I am using to echo the image is below:

<?php echo $this->helper('catalog/image')->init($_product, 'hero_banner'); ?>

This is being done within a product foreach iteration so I have the $_product variable and I am able to echo other images fine (such as thumbnail, small_image etc).

View 1 Replies View Related

Magento With Calling IsInStock() Method On A Product

I want to check if some products are in stock but whatever I do the isInStock() method always returns TRUE. My products are configurable products with no associated products and under the "Inventory" tab "Stock Availability" is set to "Out of Stock".

View 1 Replies View Related

Magento Bundle Product Displaying As Out Of Stock?

I have created a bundle product in Magento All the components of the bundle are in stock but when the bundle is displayed on the front end, it shows as out of stock? How do I get that product to display "in stock"?

In the admin system, there isn't an option to add inventory for the bundle, so I guess the stock level is worked out from the component parts (if at all?) - perhaps using the lowest stock count of a component item as the basis for the stock level of the entire bundle?

I really don't want that to happen (if it is?). I just need the bundle to display as in stock.

View 2 Replies View Related

Changing Product Options Layout In Magento?

How do you change the layout of the product options box? I have created a Configurable product with color options. I notice that Magento demo store doesnt display the product options consistently. My options box appears spanning the entire column for what is just a 1 character choice. I would like the options to display at the very least like this product:[URL]..

View 2 Replies View Related

Get Row Total Price From A Configurable Product In Magento?

I'm writing a payment module, and after the checkout process I'm doing the following to get the price for each product.

foreach($order->getAllVisibleItems() as $item)

View 1 Replies View Related

Create Coupon On Specific Product In Magento?

Let's say I have 10% off coupon code. This coupon is applicable only to Product B A customer have in its cart :

Product P1
Product B
Product P2

I don't want my 10% off coupon apply to other product but only to Product B. Do you know how I can do that within Magento?

View 2 Replies View Related

If/else In Magento Product Custom Option Section?

I want to know if magento has the following option in the custom options section of each product:I have a logo upload option which we have a setup fee of £20, as this isn't a recurring fee i dont want the user to pay multiple times so basically the function to say:if client doesn't have a logo uploaded or on file with us then show logo option (another option within custom options section) and add the price associated with this option to total else do not show this option.

View 1 Replies View Related

View Product In The Home Page In Magento V1.4.0.1?

I'm having a hard time displaying the products that I created in magento

View 1 Replies View Related

Magento Get Product Information On View Page?

This is probably a very easy question. (many of mine seem to be)But how do you get basic productinformation to be echo'd on product view page. Here are the things I am trying to access:

Inventory Stock Quantity
Restock Date
Essentialy I'm looking for something like
<?php echo $_product->getQty(); ?>

Except that would only give the in cart quantity, but it doesn't even work.

View 3 Replies View Related

Send Product Price Alert In Magento?

I am using magento 1.4 . how to send product price alert. Do i need to change any code for that. If i need to change the code, possible to tell me where exactly to change and what to change?

View 1 Replies View Related

Magento: Set And Store A Global Product Filter

In Magento, how can layered navigation selection be kept when a new category is selected or a search is performed? Full story: We're developing a store which sells Books and eBooks. When I am navigating the store I generally want to see all products. I also want to be able to view a category and only see the Books or the eBooks exclusively. That can be easily achieved with an attribute "Product Type" and Layered Navigation.

However, the problem is that if I select another category or perform a search, the current layered navigation filter is lost. I have to select the "Product Type" filter again. What are my options if I want to keep the layered navigation across multiple requests?

how to best organize my catalog if what I want can't be easily achieved with layered navigation? Would two top level categories for Books and eBooks be a better solution? But then how could I select the "Romance" category and still see Books and eBooks?

View 1 Replies View Related

Display ALL Categories That A Product Belongs To In Magento?

I am conceptualizing a new Magento site which will have products that are included in several categories. What I am wondering is if I can display all categories a product is in on the product detail page. I know that it is possible to get the category, but is it possible to display a list of all categories which a product belongs to? For example, a shirt may be included in the Shirts category, as well as in Designers and Summer. Ideally, I would like to be able to display the following:

More from:

Men > Shirts
Men > Designers > Barnabé Hardy
Men > Summer

View 2 Replies View Related

Magento Import Product Tags Via Speadsheet?

Is there a way of importing product tags via a spreadsheet ? if not through a module, can this be done through a script,

View 1 Replies View Related

Magento Get A Product Collection In An Arbitrary Order?

I have developed a custom search engine for our Magento store and I am trying to load the product collection in a very specific order (I have ranked the results according to an algorithm I designed).

I can load the product collection correctly, however it is not in the order that I would like it to be in. Here is basically how it is working now:

My database query basically comes back with a PHP array of product IDs. For this example lets say it looks like this:

$entity_ids = array(140452, 38601 );

Now I can transpose the 140452 and the 38601 and the product collection comes back in the same order each time. I would like the product collection to be in the same order as the ID of the entity ids.

The code I am using to create my collection is as follows:

$products = Mage::getModel('catalog/product')
->addAttributeToFilter('entity_id', array('in' => $entity_ids))

Is there a way to set the sort order to be the order of the $entity_ids array?

View 2 Replies View Related

Magento Product Watermarks Not Appearing Transparent

I have a Magento ver. install, I am having a problem with the transparency of product watermarks. The watermark is a .png file but when it is viewed on the product it loses its transparency and has a solid white background. The products on the shop are a wildlife artists paintings so this is really spoiling the artwork. Has anyone experienced this with Upgrading at this stage is not really an option as the site needs to go live soon.

View 2 Replies View Related

In Magento - Filter A Product Collection By The Manage_stock Field?

I've built an inventory update script - where I fetch a product collection in Magento, and iterate through the result set, updating product inventory (based on a separate inventory feed) as I go.I can fetch the product collection no problem.However, I only want to get products which have the "Manage Stock" field (a dropdown in the admin under the "inventory" tab) set to "yes".

So I tried:

// get all magento catalog products with "manage stock" field set to yes
$items = Mage::getModel('catalog/product')->getCollection();

But, getting an error: Invalid attribute name: manage_stock.

View 1 Replies View Related

Copyrights 2005-15, All rights reserved