Author Topic: Where to find product ID and how to filter by product ID?  (Read 2401 times)

Offline cookie

  • Jr. Member
  • **
  • Posts: 65
  • Karma: +10/-0
    • View Profile
Where to find product ID and how to filter by product ID?
« on: January 10, 2014, 07:17:45 AM »
HI,

Where can we see the productID ?!?
And which "if" statement shall we use in product.tpl for ex in order to filter by or add some code pre-defined product IDs only?

Thank you!

Offline abantecart

  • Administrator
  • Hero Member
  • *****
  • Posts: 4152
  • Karma: +251/-9
    • View Profile
    • Ideal Open Source Ecommerce Solution
Re: Where to find product ID and how to filter by product ID?
« Reply #1 on: January 10, 2014, 08:31:55 AM »
You can look at product controller to see what variables and data structure are available.

In your case it would be $product_info[product_id']
We need your help to build better free open source eCommerce platform for everyone.
See how you can help

Offline cookie

  • Jr. Member
  • **
  • Posts: 65
  • Karma: +10/-0
    • View Profile
Re: Where to find product ID and how to filter by product ID?
« Reply #2 on: January 10, 2014, 09:19:00 AM »
Thank you, I will look at taht.
But where can I see the product ID !??!
If I want to write smth. like if($product_info[product_id']=="23") - where do I get that 23 (was just an example, no idea how the IDs even look like in abantecart) from?
I was expecting the IDs to show in a column or smth in the product listing on the admin site but there no such thing there ...

Thank you

Offline llegrand

  • Hero Member
  • *****
  • Posts: 1472
  • Karma: +383/-2
    • View Profile
Re: Where to find product ID and how to filter by product ID?
« Reply #3 on: January 10, 2014, 09:42:40 AM »
Hi Cookie,
There are several ways:

1. If you have the SEO feature turned on -  just switch it off and then the URL bar will show the product ID number in the long form. When you are done,  turn the SEO back on.  (it's in System > Settings > System)

2.  If you want the whole list - then you can use a data export in System > Data > Import/Export.  At the bottlem is Url_aliases
it will give you the product_id=XX and the seo that it uses.   

3.  Or you can go directly to the database and use the Url_aliases table.

Hope this helps.

Lee
     

Offline cookie

  • Jr. Member
  • **
  • Posts: 65
  • Karma: +10/-0
    • View Profile
Re: Where to find product ID and how to filter by product ID?
« Reply #4 on: January 10, 2014, 10:08:25 AM »
Thank you Lee!

Turning off SEO did the trick :)


 

Powered by SMFPacks Social Login Mod