Results 1 to 10 of 10
  1. #1
    Join Date
    Jan 2011
    Posts
    10
    Plugin Contributions
    0

    Default Add Model Number to Specials Page

    I would like to add the model number below the image on the specials page. The grid layout mod is installed with the template, not sure why it only shows up on the specials page because my layout is set to rows. But that's ok, as long as I can find the code to add model #. Thanks for any help.

  2. #2
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,755
    Plugin Contributions
    9

    Default Re: Add Model Number to Specials Page

    You might follow the outline on this thread but for the specials page file

    http://www.zen-cart.com/showthread.p...Page&p=1219365
    Zen-Venom Get Bitten

  3. #3
    Join Date
    Jan 2011
    Posts
    10
    Plugin Contributions
    0

    Default Re: Add Model Number to Specials Page

    Thank you, this does help, though the model number displays after the price. I will play around with this to try and get it to display after the image. If anyone is better at code and can give me the info, I would certainly appreciate it. If not, when I get this straight I'll post the code for others.

  4. #4
    Join Date
    Feb 2005
    Location
    Lansing, Michigan USA
    Posts
    20,021
    Plugin Contributions
    3

    Default Re: Add Model Number to Specials Page

    Possibly, if we can see the site to see what you have now.

  5. #5
    Join Date
    Jan 2011
    Posts
    10
    Plugin Contributions
    0

    Default Re: Add Model Number to Specials Page

    Quote Originally Posted by stevesh View Post
    Possibly, if we can see the site to see what you have now.
    Since I don't own the site and just work as a freelance designer, I don't feel comfortable or free to post their webpage. But the current order on the specials is the image, then name/title, then price, then the percentage off. I'd like the model number to go just below the image.

    Thanks to anyone who can help, and I'll work on it here as well.

  6. #6
    Join Date
    Feb 2010
    Posts
    2,159
    Plugin Contributions
    17

    Default Re: Add Model Number to Specials Page

    Quote Originally Posted by aimwilk View Post
    Since I don't own the site and just work as a freelance designer, I don't feel comfortable or free to post their webpage. But the current order on the specials is the image, then name/title, then price, then the percentage off. I'd like the model number to go just below the image.

    Thanks to anyone who can help, and I'll work on it here as well.
    /includes/modules/pages/specials/main_template_vars.php

    add p.products_model to the $specials_query_raw

    then find the section of code:
    'text' => '<a href="' . zen_href_link(zen_get_info_page($specials->fields['products_id']), 'cPath=' . zen_get_generated_category_path_rev($specials->fields['master_categories_id']) . '&products_id=' . $specials->fields['products_id']) . '">' . (($specials->fields['products_image'] == '' and PRODUCTS_IMAGE_NO_IMAGE_STATUS == 0) ? '' : zen_image(DIR_WS_IMAGES . $specials->fields['products_image'], $specials->fields['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a>') . '<br /><a href="' . zen_href_link(zen_get_info_page($specials->fields['products_id']), 'cPath=' . zen_get_generated_category_path_rev($specials->fields['master_categories_id']) . '&products_id=' . $specials->fields['products_id']) . '">' . $specials->fields['products_name'] . '</a><br />' . $products_price);

    replace with:
    'text' => '<a href="' . zen_href_link(zen_get_info_page($specials->fields['products_id']), 'cPath=' . zen_get_generated_category_path_rev($specials->fields['master_categories_id']) . '&products_id=' . $specials->fields['products_id']) . '">' . (($specials->fields['products_image'] == '' and PRODUCTS_IMAGE_NO_IMAGE_STATUS == 0) ? '' : zen_image(DIR_WS_IMAGES . $specials->fields['products_image'], $specials->fields['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a>') . '<br />' . $specials->fields['products_model'] . '<br /><a href="' . zen_href_link(zen_get_info_page($specials->fields['products_id']), 'cPath=' . zen_get_generated_category_path_rev($specials->fields['master_categories_id']) . '&products_id=' . $specials->fields['products_id']) . '">' . $specials->fields['products_name'] . '</a><br />' . $products_price);

  7. #7
    Join Date
    Jan 2011
    Posts
    10
    Plugin Contributions
    0

    Default Re: Add Model Number to Specials Page

    Quote Originally Posted by rbarbour View Post
    /includes/modules/pages/specials/main_template_vars.php

    add p.products_model to the $specials_query_raw

    then find the section of code:
    'text' => '<a href="' . zen_href_link(zen_get_info_page($specials->fields['products_id']), 'cPath=' . zen_get_generated_category_path_rev($specials->fields['master_categories_id']) . '&products_id=' . $specials->fields['products_id']) . '">' . (($specials->fields['products_image'] == '' and PRODUCTS_IMAGE_NO_IMAGE_STATUS == 0) ? '' : zen_image(DIR_WS_IMAGES . $specials->fields['products_image'], $specials->fields['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a>') . '<br /><a href="' . zen_href_link(zen_get_info_page($specials->fields['products_id']), 'cPath=' . zen_get_generated_category_path_rev($specials->fields['master_categories_id']) . '&products_id=' . $specials->fields['products_id']) . '">' . $specials->fields['products_name'] . '</a><br />' . $products_price);

    replace with:
    'text' => '<a href="' . zen_href_link(zen_get_info_page($specials->fields['products_id']), 'cPath=' . zen_get_generated_category_path_rev($specials->fields['master_categories_id']) . '&products_id=' . $specials->fields['products_id']) . '">' . (($specials->fields['products_image'] == '' and PRODUCTS_IMAGE_NO_IMAGE_STATUS == 0) ? '' : zen_image(DIR_WS_IMAGES . $specials->fields['products_image'], $specials->fields['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a>') . '<br />' . $specials->fields['products_model'] . '<br /><a href="' . zen_href_link(zen_get_info_page($specials->fields['products_id']), 'cPath=' . zen_get_generated_category_path_rev($specials->fields['master_categories_id']) . '&products_id=' . $specials->fields['products_id']) . '">' . $specials->fields['products_name'] . '</a><br />' . $products_price);
    This is just not working correctly for some reason. I was able to add the model number to includes/modules/mytemplate/specials_index.php to show on the main page by adding p.products_model to $specials_index_query and editing the following code. How do I rearrange this code so that the model number shows up under the image?

    $specials_index->fields['products_name'] = zen_get_products_name($specials_index->fields['products_id']);
    $list_box_contents[$row][$col] = array('params' => 'class="centerBoxContentsSpecials centeredContent back"' . ' ' . 'style="width:' . $col_width . '%;"',
    'text' => (($specials_index->fields['products_image'] == '' and PRODUCTS_IMAGE_NO_IMAGE_STATUS == 0) ? '' : '<a href="' . zen_href_link(zen_get_info_page($specials_index->fields['products_id']), 'cPath=' . $productsInCategory[$specials_index->fields['products_id']] . '&products_id=' . (int)$specials_index->fields['products_id']) . '">' . zen_image(DIR_WS_IMAGES . $specials_index->fields['products_image'], $specials_index->fields['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a><br />') . '<a href="' . zen_href_link(zen_get_info_page($specials_index->fields['products_id']), 'cPath=' . $productsInCategory[$specials_index->fields['products_id']] . '&products_id=' . $specials_index->fields['products_id']) . '">' . $specials_index->fields['products_name'] . '</a><br />' . $products_price . '<br />' . $specials_index->fields['products_model']);

    Thanks to anyone who can help, and for any ideas on why I can't get this same type of display on the 'specials' page.

  8. #8
    Join Date
    Feb 2010
    Posts
    2,159
    Plugin Contributions
    17

    Default Re: Add Model Number to Specials Page

    Quote Originally Posted by aimwilk View Post
    I would like to add the model number below the image on the specials page. The grid layout mod is installed with the template, not sure why it only shows up on the specials page because my layout is set to rows. But that's ok, as long as I can find the code to add model #. Thanks for any help.
    Quote Originally Posted by aimwilk View Post
    This is just not working correctly for some reason. I was able to add the model number to includes/modules/mytemplate/specials_index.php to show on the main page by adding p.products_model to $specials_index_query and editing the following code. How do I rearrange this code so that the model number shows up under the image?

    $specials_index->fields['products_name'] = zen_get_products_name($specials_index->fields['products_id']);
    $list_box_contents[$row][$col] = array('params' => 'class="centerBoxContentsSpecials centeredContent back"' . ' ' . 'style="width:' . $col_width . '%;"',
    'text' => (($specials_index->fields['products_image'] == '' and PRODUCTS_IMAGE_NO_IMAGE_STATUS == 0) ? '' : '<a href="' . zen_href_link(zen_get_info_page($specials_index->fields['products_id']), 'cPath=' . $productsInCategory[$specials_index->fields['products_id']] . '&products_id=' . (int)$specials_index->fields['products_id']) . '">' . zen_image(DIR_WS_IMAGES . $specials_index->fields['products_image'], $specials_index->fields['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a><br />') . '<a href="' . zen_href_link(zen_get_info_page($specials_index->fields['products_id']), 'cPath=' . $productsInCategory[$specials_index->fields['products_id']] . '&products_id=' . $specials_index->fields['products_id']) . '">' . $specials_index->fields['products_name'] . '</a><br />' . $products_price . '<br />' . $specials_index->fields['products_model']);

    Thanks to anyone who can help, and for any ideas on why I can't get this same type of display on the 'specials' page.
    Your first post was asking for the code to display on the specials page, this last post is saying you implemented on the main page.

    Do you want it on the specials page?

    Do you want it in the main page specials centerbox?

    Both have similar code but different files.

    Use the code I provided for the specials page, use the code you have for the main page specials centerbox, placing your code in the same position I placed my code will put the Model Number under the image.

  9. #9
    Join Date
    Jan 2011
    Posts
    10
    Plugin Contributions
    0

    Default Re: Add Model Number to Specials Page

    Quote Originally Posted by rbarbour View Post
    Your first post was asking for the code to display on the specials page, this last post is saying you implemented on the main page.

    Do you want it on the specials page?

    Do you want it in the main page specials centerbox?

    Both have similar code but different files.

    Use the code I provided for the specials page, use the code you have for the main page specials centerbox, placing your code in the same position I placed my code will put the Model Number under the image.
    Sorry for the confusion. I originally wanted to add the model number to the specials page and had no luck, but then tried adding it to the index/main page and got it there, just in the wrong place.
    I did get your code to work correctly on the specials page, thank you SO much. The problem was in the template override I set up. Thank the Lord that is solved.
    So now I just need to move the model number up on the main/index page and I'm sure will get this up and running.
    Thank you very much for all of the help.

  10. #10
    Join Date
    Feb 2010
    Posts
    2,159
    Plugin Contributions
    17

    Default Re: Add Model Number to Specials Page

    Quote Originally Posted by aimwilk View Post
    I would like to add the model number below the image on the specials page. The grid layout mod is installed with the template, not sure why it only shows up on the specials page because my layout is set to rows. But that's ok, as long as I can find the code to add model #. Thanks for any help.
    Quote Originally Posted by aimwilk View Post
    Sorry for the confusion. I originally wanted to add the model number to the specials page and had no luck, but then tried adding it to the index/main page and got it there, just in the wrong place.
    I did get your code to work correctly on the specials page, thank you SO much. The problem was in the template override I set up. Thank the Lord that is solved.
    So now I just need to move the model number up on the main/index page and I'm sure will get this up and running.
    Thank you very much for all of the help.
    Glad you got it working!

 

 

Similar Threads

  1. v139h Catalog / Specials Page, How to change the number of specials displayed
    By lynbor in forum Customization from the Admin
    Replies: 2
    Last Post: 12 Jun 2015, 07:19 PM
  2. v153 add model number in checkout and conformation page?
    By aatony in forum Templates, Stylesheets, Page Layout
    Replies: 5
    Last Post: 30 Jan 2015, 09:30 PM
  3. v139f How to add "Model" infront of my model number above my product pictures?
    By missymissy in forum Templates, Stylesheets, Page Layout
    Replies: 9
    Last Post: 15 Apr 2014, 06:44 AM
  4. Add Model Number to Upcoming Products
    By cowinger in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 16 Jan 2009, 06:40 PM
  5. Quick add to cart by item number(model) ?
    By tj1 in forum General Questions
    Replies: 4
    Last Post: 13 Apr 2007, 03:50 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg