Page 1 of 4 123 ... LastLast
Results 1 to 10 of 39
  1. #1
    Join Date
    Jul 2012
    Posts
    346
    Plugin Contributions
    0

    Default Microdate vs price-by-attributes

    Hi,
    Google Microdata plugin catch product price but not attribute. For price by attribute it catches price as 0 because our starting price is 0 and hidden as each attribute have its own price with out + sign.

    I have check file and it have following line which caching price:

    Code:
    "price" : "<?php echo $specials_new_products_price = (round(zen_get_products_actual_price($product_info_metatags->fields['products_id']),2)); ?>",
    Any idea how to change it so it catch regular price when no attribute available and catch attribute price when present?

    Thank you!

  2. #2
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Google Microdate

    Could you post the code that you are using 5 lines before and 5 lines after?
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.5]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  3. #3
    Join Date
    Jul 2012
    Posts
    346
    Plugin Contributions
    0

    Default Re: Google Microdate

    Code:
    <script type="application/ld+json">
    {
      "@context": "http://schema.org",
       "@type": "Product",
        "brand": "<?php echo $manufacturers_name; ?>",
        "mpn": "<?php echo $products_model; ?>",
        "productID": "<?php echo $products_id; ?>",
        "url": "<?php echo $canonicalLink; ?>",
        "name": "<?php echo $products_name; ?>",
        "description": "<?php echo META_TAG_DESCRIPTION; ?>",
        "image": "<?php echo HTTP_SERVER . DIR_WS_CATALOG . 'images/' . $products_image; ?>",
       "offers": {
        "@type" : "Offer",
        "availability" : "<?php if ($products_quantity > 0) { ?>http://schema.org/InStock<?php } ?><?php if ($products_quantity == 0) { ?>http://schema.org/OutOfStock<?php }?>",
        "price" : "<?php echo $specials_new_products_price = (round(zen_get_products_actual_price($product_info_metatags->fields['products_id']),2)); ?>",
        "priceCurrency" : "<?php if (FACEBOOK_OPEN_GRAPH_CUR != '') { ?><?php echo FACEBOOK_OPEN_GRAPH_CUR; ?><?php } ?>",
        "seller" : "<?php echo STORE_NAME; ?>",
        "itemCondition" : "http://schema.org/<?php if (FACEBOOK_OPEN_GRAPH_COND != '') { ?><?php echo FACEBOOK_OPEN_GRAPH_COND; ?><?php }?>",
        "inventoryLevel" : "<?php echo $products_quantity; ?>",    
        "deliveryLeadTime" : "<?php if (FACEBOOK_OPEN_GRAPH_DTS != '') { ?><?php echo FACEBOOK_OPEN_GRAPH_DTS; ?><?php }?>",
        "category" : "<?php echo $categories->fields['categories_name']; ?>",
        "itemOffered" : "<?php echo $products_name; ?>",
        "eligibleRegion" : "<?php if (FACEBOOK_OPEN_GRAPH_ELER != '') { ?><?php echo FACEBOOK_OPEN_GRAPH_ELER; ?><?php }?>",
        "acceptedPaymentMethod" : [ "http://purl.org/goodrelations/v1#<?php echo FACEBOOK_OPEN_GRAPH_PAY1; ?>,http://purl.org/goodrelations/v1#<?php echo FACEBOOK_OPEN_GRAPH_PAY2; ?>,http://purl.org/goodrelations/v1#<?php echo FACEBOOK_OPEN_GRAPH_PAY3; ?>,http://purl.org/goodrelations/v1#<?php echo FACEBOOK_OPEN_GRAPH_PAY4; ?>,http://purl.org/goodrelations/v1#<?php echo FACEBOOK_OPEN_GRAPH_PAY5; ?>,http://purl.org/goodrelations/v1#<?php echo FACEBOOK_OPEN_GRAPH_PAY6; ?>" ]    
    }       
    }
    </script>

  4. #4
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Google Microdate

    What happens if you change:
    Code:
    $product_info_metatags->fields['products_id']
    to be:
    Code:
    $products_id
    This is assuming that the:
    Code:
    "productID": "<?php echo $products_id; ?>",
    displays the products_id correctly ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.5]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  5. #5
    Join Date
    Jul 2012
    Posts
    346
    Plugin Contributions
    0

    Default Re: Google Microdate

    No change still same. Product with price by attribute it catch price as 0 I think it is catching starting at price not attribute price as on site I have turned off starting at price and remove attribute prefix + and each attribute have total price (unique).

    So I think need to add something to when starting price is 0 it should catch attribute price. I tried else statement and attribute code next to it but then page did not load.

  6. #6
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Google Microdate

    Have you an URL to the page where you are using this that we could perhaps peek at?
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.5]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  7. #7
    Join Date
    Jul 2012
    Posts
    346
    Plugin Contributions
    0

    Default Re: Google Microdate

    sent via message.

  8. #8
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Google Microdate

    Above that script code, add this:
    Code:
    $microdate_price = (round(zen_get_products_actual_price((int)$_GET['products_id']),2));
    and then use this for the price:
    Code:
        "price" : "<?php echo $microdate_price; ?>",
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.5]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  9. #9
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Google Microdate

    Also, if that does not work ... check the Attribute settings on the Product in the Attributes Controller ...

    Do you have the settings for:
    Include in Base Price
    When Priced by Attributes
    marked as YES?
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.5]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  10. #10
    Join Date
    Jul 2012
    Posts
    346
    Plugin Contributions
    0

    Default Re: Google Microdate

    Yes I have.

    I also apply change you suggested and now view source shows "price" : "", which means it no longer getting 0 as price or base price but also not getting attribute price. As there are multiple attributes on same page and multiple prices so how this will know which one to catch. I think this module may only work for 1 price for all attribute but not sure as you know lot more than me :)

 

 
Page 1 of 4 123 ... LastLast

Similar Threads

  1. v138a Bulk update price attributes to reflect global % price increase
    By alexjoverton in forum General Questions
    Replies: 0
    Last Post: 28 Jan 2013, 04:37 PM
  2. Attributes to replace the price.. but not add on to default price..
    By jackson5759 in forum Setting Up Categories, Products, Attributes
    Replies: 1
    Last Post: 18 Apr 2011, 06:43 AM
  3. Replies: 17
    Last Post: 21 Mar 2010, 05:57 PM
  4. Need to show product price as ONE OF the attributes price, but not lowest??
    By infocom in forum Setting Up Categories, Products, Attributes
    Replies: 4
    Last Post: 19 Nov 2009, 06:15 PM
  5. Display price will include lowest group attributes prices plus price
    By jtjohnston in forum Setting Up Categories, Products, Attributes
    Replies: 3
    Last Post: 3 Feb 2008, 06:39 AM

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