I just need a simple logic check to what the current page's product type is.
e.g.
If (product_type == 2) {
echo "Product Type = Product - Music";
}
What is the variable or constant for product types?
I just need a simple logic check to what the current page's product type is.
e.g.
If (product_type == 2) {
echo "Product Type = Product - Music";
}
What is the variable or constant for product types?
Templates: Silverfish | Blue Admin | TruBlu
Contribs: USPS AutoFill | Column Divider Pro | Tabbed Products Pro | Main Image Replacer
DoNaTiOnS WeLcOmE!
in the products table, there is a field products_type, which is a numeric ID you can use to lookup the product-type name in the product_types table
or ... more easily ... zen_get_info_page($product_id) will tell you the page-handler name for the product's type, ie: product_info, product_music_info, etc
.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole
Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.
Hmm..
$x = (zen_get_info_page(GET_$product_id));
echo $x;
Always shows product_info .. even when im on a product_info_music page and a product_info_freeshipping page
I'm calling this from the product info page itself.
Templates: Silverfish | Blue Admin | TruBlu
Contribs: USPS AutoFill | Column Divider Pro | Tabbed Products Pro | Main Image Replacer
DoNaTiOnS WeLcOmE!
Try this:
$x = (zen_get_info_page((int)$_GET['products_id']));
.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole
Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.
ah.. i was close.. i was tryingOriginally Posted by DrByte
$duh = $_GET[$product_id];
$x = (zen_get_info_page($duh));
echo $product_id;
echo $x;
Thank you kind sir ! :)
Templates: Silverfish | Blue Admin | TruBlu
Contribs: USPS AutoFill | Column Divider Pro | Tabbed Products Pro | Main Image Replacer
DoNaTiOnS WeLcOmE!
Bookmarks