[Zen Cart] Pulling Wrong Product Type TPL File
-
- Posts: 10
- Joined: Sun Jan 13, 2013 9:31 pm
[Zen Cart] Pulling Wrong Product Type TPL File
Another issue I came across has to do with product types and the TPL files associated with them. Fortunately for my actual store all products are music type so I was able to work around this issue by editing the htaccess file.
It seems that when MSU is installed and when you view a product info page... that all products use the default tpl_product_info_display.php instead of the TPL version intended for that particular product type.
Lets take Music Type for example...
http://test.experimedia.net/index.php?m ... cts_id=169
vs
http://test2.experimedia.net/sample-of- ... e-169.html
You will notice that on the test2 site with MSU installed that these fields are missing.
Artist: The Russ Tippins Band
Music Genre: Jazz
This is because all the product info urls are being rewritten from....
main_page=product_info
when in music product cases they should be rewritten as...
main_page=product_music_info
When I initially stumbled across this I was able to verify this is what was happening by adding some some text into my tpl_product_info_display.php to confirm that the music product pages were in fact now displaying tpl_product_info_display.php instead of the correct file tpl_product_music_info_display.php
It seems that when MSU is installed and when you view a product info page... that all products use the default tpl_product_info_display.php instead of the TPL version intended for that particular product type.
Lets take Music Type for example...
http://test.experimedia.net/index.php?m ... cts_id=169
vs
http://test2.experimedia.net/sample-of- ... e-169.html
You will notice that on the test2 site with MSU installed that these fields are missing.
Artist: The Russ Tippins Band
Music Genre: Jazz
This is because all the product info urls are being rewritten from....
main_page=product_info
when in music product cases they should be rewritten as...
main_page=product_music_info
When I initially stumbled across this I was able to verify this is what was happening by adding some some text into my tpl_product_info_display.php to confirm that the music product pages were in fact now displaying tpl_product_info_display.php instead of the correct file tpl_product_music_info_display.php
Re: [Zen Cart] Pulling Wrong Product Type TPL File
experimedia wrote:This is because all the product info urls are being rewritten from....
main_page=product_info
when in music product cases they should be rewritten as...
main_page=product_music_info
We are afraid it does not seem to be related to MSU (please check demo site where you can see different product types in action).
Since MSU for ZC 4.x Series all product URLs are rewritten to "product_info". Later on, in the run time, proper product type is injected according to the product (by this way more clean URLs are can be produced).
-
- Posts: 10
- Joined: Sun Jan 13, 2013 9:31 pm
Re: [Zen Cart] Pulling Wrong Product Type TPL File
Checked out your demo store and you have the same issue happening there.
You can tell by looking at a music product type and you can see there is no artist or genre listed under the model number which is included in the default product music info tpl.
You can tell by looking at a music product type and you can see there is no artist or genre listed under the model number which is included in the default product music info tpl.
Re: [Zen Cart] Pulling Wrong Product Type TPL File
Please change MSU installation code in includes/application_top.php file to:
Code: Select all
include(DIR_WS_INCLUDES . 'magic_seo_url.php');
$current_page_base = $current_page = $_GET['main_page'];
$page_directory = $code_page_directory = DIR_WS_MODULES . 'pages/' . $current_page_base;
include(DIR_WS_INCLUDES . 'init_includes/init_category_path.php');
-
- Posts: 10
- Joined: Sun Jan 13, 2013 9:31 pm
Re: [Zen Cart] Pulling Wrong Product Type TPL File
That did it. Thanks a ton.
Except I had to make one edit to your code...
Instead of...
magic_seo_urls.php
changed to
magic_seo_url.php
So this is the correct code.
Except I had to make one edit to your code...
Instead of...
magic_seo_urls.php
changed to
magic_seo_url.php
So this is the correct code.
Code: Select all
include(DIR_WS_INCLUDES . 'magic_seo_url.php');
$current_page_base = $current_page = $_GET['main_page'];
$page_directory = $code_page_directory = DIR_WS_MODULES . 'pages/' . $current_page_base;
include(DIR_WS_INCLUDES . 'init_includes/init_category_path.php');
Re: [Zen Cart] Pulling Wrong Product Type TPL File
Oh I am sorry (code in my last post was edited).
-
- Posts: 10
- Joined: Sun Jan 13, 2013 9:31 pm
Re: [Zen Cart] Pulling Wrong Product Type TPL File
Not a problem. Thanks again for being helpful in sorting this out. Now I dont have to manually edit my htaccess file after any regeneration. Fortunately as I mentioned it wasnt a big deal since I only have music products so far.