Page 2 of 2 FirstFirst 12
Results 11 to 20 of 20
  1. #11
    Join Date
    Jun 2007
    Posts
    23
    Plugin Contributions
    0

    Default Re: Product's Meta Tag Title

    Actually, that shouldn't be too hard. Just an if and else on checking 0 should do it. I'll take a crack at it after I finish setting it up.

  2. #12
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Product's Meta Tag Title

    Quote Originally Posted by dietcoke View Post
    Got it. I have to have value in the fields in order for me to use the options to metatag title particular product, or turn on customization.
    Correct - the logic currently requires that the keywords or description must have custom content in order for the rest of the switches to take effect for that particular product.

    Code:
        if (!empty($product_info_metatags->fields['metatags_keywords']) or !empty($product_info_metatags->fields['metatags_description'])) {
    .

    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.

  3. #13
    Join Date
    Jun 2007
    Posts
    23
    Plugin Contributions
    0

    Default Re: Product's Meta Tag Title

    Still, why not detect switch fields not "0," too.
    Last edited by dietcoke; 7 Jun 2007 at 11:56 PM.

  4. #14
    Join Date
    Jun 2007
    Posts
    23
    Plugin Contributions
    0

    Default Re: Product's Meta Tag Title

    The administrator has specified that you can only edit messages for 7 minutes after you have posted. This limit has expired, so you must contact the administrator to make alterations on your message.

    What I'm saying is why not add switch fields are 0 too.

  5. #15
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Product's Meta Tag Title

    Customizing and making those kind of changes would be perfectly acceptable if that's what meets your needs.

    You'll have to alter the codeblock starting with the line I quoted, and move/edit/re-arrange, and troubleshoot the logic to operate on those different fields regardless of whether the text fields have content.

    It would be advisable to save your edits into the overrides folder:
    /includes/modules/YOURTEMPLATE/meta_tags.php
    .

    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.

  6. #16
    Join Date
    Jun 2007
    Posts
    23
    Plugin Contributions
    0

    Default Re: Product's Meta Tag Title

    Doc,

    Thanks. I really appreciate this.
    Hello. My name is dietcoke.

  7. #17

    Default Re: Product's Meta Tag Title

    Have read thru' this thread, but still not clear what the solution is -

    I have many products set as 'Call For Price', which actually enters a zero price in the product database. The Title tag shows a price of 0.00, which is subsequently found by the googlebots so when my products are googled, searchers see a zero price in the search summary. Great for getting hits, but ultimately misleading to potential customers !!
    So I goto the product admin page, select metatags, turn off the price in the title, update, but the price is still in the product page source title tag. Also, when I go back to the admin and look again, the show product price is still set.
    Are we sure this isn't a bug?
    Cheers
    Pa

  8. #18

    Default Re: Product's Meta Tag Title

    Quote Originally Posted by pasher View Post
    Have read thru' this thread, but still not clear what the solution is -

    I have many products set as 'Call For Price', which actually enters a zero price in the product database. The Title tag shows a price of 0.00, which is subsequently found by the googlebots so when my products are googled, searchers see a zero price in the search summary. Great for getting hits, but ultimately misleading to potential customers !!
    So I goto the product admin page, select metatags, turn off the price in the title, update, but the price is still in the product page source title tag. Also, when I go back to the admin and look again, the show product price is still set.
    Are we sure this isn't a bug?
    Cheers
    Pa
    Anyone???

  9. #19
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Product's Meta Tag Title

    To handle call-for-price products that have no price set, you could try this:

    /includes/modules/meta_tags.php
    line 200:
    Code:
                                          pd.products_description, p.product_is_free,
    add another field, like this:
    Code:
                                          pd.products_description, p.product_is_free, p.product_is_call,
    line 253:
    Code:
              if (zen_check_show_prices() == true) {
                $meta_products_price = zen_get_products_actual_price($product_info_metatags->fields['products_id']);
                $meta_products_price = SECONDARY_SECTION . $currencies->display_price($meta_products_price, zen_get_tax_rate($product_info_metatags->fields['products_tax_class_id']));
              }
    change to this:
    Code:
              if (zen_check_show_prices() == true) {
                $meta_products_price = zen_get_products_actual_price($product_info_metatags->fields['products_id']);
                $prod_is_call_and_no_price = ($product_info_metatags->fields['product_is_call'] == '1' && $meta_products_price == 0);
                $meta_products_price = (!$prod_is_call_and_no_price ? SECONDARY_SECTION . $currencies->display_price($meta_products_price, zen_get_tax_rate($product_info_metatags->fields['products_tax_class_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.

  10. #20

    Default Re: Product's Meta Tag Title

    Yep - That fixes it up
    Thanks DrB

    Pa

 

 
Page 2 of 2 FirstFirst 12

Bookmarks

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
Zen-Cart, Internet Selling Services, Klamath Falls, OR