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.
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.
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.
Still, why not detect switch fields not "0," too.
Last edited by dietcoke; 7 Jun 2007 at 11:56 PM.
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.
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.
Doc,
Thanks. I really appreciate this.
Hello. My name is dietcoke.
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
To handle call-for-price products that have no price set, you could try this:
/includes/modules/meta_tags.php
line 200:add another field, like this:Code:pd.products_description, p.product_is_free,line 253:Code:pd.products_description, p.product_is_free, p.product_is_call,
change to this: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'])); }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.
Yep - That fixes it up
Thanks DrB
Pa
Bookmarks