Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Microdate vs price-by-attributes

Microdate vs price-by-attributes

Views: 3,583

Results 21 to 39 of 39
2 Oct 2015, 1:02 PM
#21
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Microdate vs price-by-attributes

A better test for line 71 would be:

  echo (zen_get_products_price_is_priced_by_attributes((int)$_GET['products_id']) ? '' : $one_time . ((zen_has_product_attributes_values((int)$_GET['products_id']) and $flag_show_product_info_starting_at == 1) ? TEXT_BASE_PRICE : '') . zen_get_products_display_price((int)$_GET['products_id']));

as this only blocks prices from products that use Priced by Attributes vs have attributes with prices ...

To mark all Attributes to be included in the base price, first, backup your databsae ...

Next, you can run this in the Tools ... Install SQL Patches ...

UPDATE products_attributes SET attributes_price_base_included = 1;

I do not use Microdata so I really do not know how to approach this for multiple prices on 1 product ... if you find a method, let us know ...

2 Oct 2015, 2:24 PM
#22
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Microdate vs price-by-attributes

I don't/haven't used it yet either, but an internet search resolved to the following page: https://developers.google.com/structured-data/rich-snippets/products

On there, it looks like in the case of a product priced by attributes (possibly even just those that have attributes) that an aggregateoffer could be presented showing the lowest (current price as calculated in situation above) and highest price (requiring reverse function as provided) and that further within that aggregateoffer each possible combination could be determined through the use of itemOffered for each sub-product... Each itemOffered (product) would need to have all of the applicable information also included.

In the end this may be something that could be included through a possible do while loop or perhaps a for loop. The goal would be to upfront identify the need for the aggregateOffer, and if it is needed, use it instead of an Offer, but then to determine the need to have indvidual itemOffered groups looping through each itemOffered to provide the necessary data for the one item, then the remaining items to then close out the aggregateOffer...

Just an on the spot idea without digging deeper into the microdata requirements and structure.

15 Oct 2015, 4:20 AM
#23
jsarwar avatar

jsarwar

Zen Follower

Join Date:
Jul 2012
Posts:
347
Plugin Contributions:
0

Re: Microdate vs price-by-attributes

Thank you for help.

When I don't do yes for attribute by price and add attribute to product it shows $0.00 next to attribute. How to hide this 0 as it does not look right.

15 Oct 2015, 1:04 PM
#24
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Microdate vs price-by-attributes

Are you using the code I posted in post #21?

28 Oct 2015, 4:01 AM
#25
jsarwar avatar

jsarwar

Zen Follower

Join Date:
Jul 2012
Posts:
347
Plugin Contributions:
0

Re: Microdate vs price-by-attributes

I tried Yes and No both for price by Attribute but it did not make difference.

as you may see in image it shows product price $4.99 and then $0.00 next to each attribute how to hide $0.00 as it does not look nice,

Attribute Grid is installed and contributing here. Also is it possible to show Price heading when attribute price is not $0.00 like size and quantity heading?

Thanks

[Attachment no longer available]

28 Oct 2015, 1:06 PM
#26
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Microdate vs price-by-attributes

Could you do a screen shot of from the Attributes Controller for the Product:
Hydroxycut Elite

29 Oct 2015, 2:03 AM
#27
jsarwar avatar

jsarwar

Zen Follower

Join Date:
Jul 2012
Posts:
347
Plugin Contributions:
0

Re: Microdate vs price-by-attributes

[Attachment no longer available]

Top one is price by attribute. Bottom one is not and have single price for all as $4.99 in product listing so did not enter attribute price and displaying $0.00 in attribute controller and on product page. Second product you will find in T Shirts category > First product.

29 Oct 2015, 2:42 AM
#28
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Microdate vs price-by-attributes

Do you have some type of add-on for the attributes?

If you switch to the Classic Template, what happens on these Products on the display for the Attributes in the Catalog?

30 Oct 2015, 5:06 AM
#29
jsarwar avatar

jsarwar

Zen Follower

Join Date:
Jul 2012
Posts:
347
Plugin Contributions:
0

Re: Microdate vs price-by-attributes

Only 1 installed it is "attribute Grid layout" I think I mentioned it earlier.

Also just an update on feature we discusses last week or so in same thread.

https://support.google.com/merchants/answer/6069143?hl=en

talks about how google micro can catch price for each attribute instead of base price. How to get this happen with zencart?

30 Oct 2015, 5:44 PM
#30
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Microdate vs price-by-attributes

On all of your Products that are Priced by Attribute, they are ALL set with products_price = 0.00 correct?

If so, run the following in the Tools ... Install SQL Patches ...

UPDATE products SET products_priced_by_attribute = 0 WHERE products_price = 0;

Have you done any customization to Attribute Grid Layout other than install it?

I have Attribute Grid Layout installed and cannot reproduce a screen with any product set to Priced by Attribute that shows the $0.00 next to the Attribute as you have it ...

See if there are any changes when you run that SQL Update in the Install SQL Patches ...

12 Nov 2015, 1:32 AM
#31
jsarwar avatar

jsarwar

Zen Follower

Join Date:
Jul 2012
Posts:
347
Plugin Contributions:
0

Re: Microdate vs price-by-attributes

Ajeh:

On all of your Products that are Priced by Attribute, they are ALL set with products_price = 0.00 correct?

If so, run the following in the Tools ... Install SQL Patches ...

UPDATE products SET products_priced_by_attribute = 0 WHERE products_price = 0;

> 
> Have you done any customization to Attribute Grid Layout other than install it?
> 
> I have Attribute Grid Layout installed and cannot reproduce a screen with any product set to Priced by Attribute that shows the $0.00 next to the Attribute as you have it ...
> 
> See if there are any changes when you run that SQL Update in the Install SQL Patches ...

No changes after running SQL.  When price by attribute product price is 0 on as each attribute have its own price, but when I change product price to 0+ and don't enter any value for attribute price on site it shows 0 as shown in image I sent you. 

The only change in attribute grid I have made is table width and heading.


Also if you do inspect element on quantity box next to attribute it shows product id with attribute id:

<input type="text" name="products_id[5191:9376ceecf951315849b15ec782b9cf74]" size="3" value="0"> ```

Do you think we can add somehow this products_id + Attribute Id so google can catch separate price for each attribute as they mentioned in link I sent in post above.

12 Nov 2015, 1:39 AM
#32
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Microdate vs price-by-attributes

I am not sure why your grid is doing that I do not have that happening when I installed the grid to test ...

12 Nov 2015, 1:52 AM
#33
jsarwar avatar

jsarwar

Zen Follower

Join Date:
Jul 2012
Posts:
347
Plugin Contributions:
0

Re: Microdate vs price-by-attributes

Ajeh:

I am not sure why your grid is doing that I do not have that happening when I installed the grid to test ...

May I know which version you installed? I am clicking on "Download latest" and using these files.

12 Nov 2015, 2:30 AM
#34
jsarwar avatar

jsarwar

Zen Follower

Join Date:
Jul 2012
Posts:
347
Plugin Contributions:
0

Re: Microdate vs price-by-attributes

I think I got it. Default layout is two column table but I changed it to 3 with price in second and I think it causing this. Do you know what will be best way to do 3 column table with price heading on second and it only shows when price by attribute or attribute price >0?

12 Nov 2015, 2:46 AM
#35
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Microdate vs price-by-attributes

jsarwar:

May I know which version you installed? I am clicking on "Download latest" and using these files.

Pretty sure I used this add on:
https://www.zen-cart.com/downloads.php?do=file&id=618

12 Nov 2015, 2:52 AM
#36
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Microdate vs price-by-attributes

jsarwar:

I think I got it. Default layout is two column table but I changed it to 3 with price in second and I think it causing this. Do you know what will be best way to do 3 column table with price heading on second and it only shows when price by attribute or attribute price >0?

Where did you change the columns from 2 to 3?

12 Nov 2015, 2:53 AM
#37
jsarwar avatar

jsarwar

Zen Follower

Join Date:
Jul 2012
Posts:
347
Plugin Contributions:
0

Re: Microdate vs price-by-attributes

Ajeh:

Pretty sure I used this add on:
https://www.zen-cart.com/downloads.php?do=file&id=618

Did you read my last post? I think you replied to only the one before.

I think I got it. Default layout is two column table but I changed it to 3 with price in second and I think it causing this. Do you know what will be best way to do 3 column table with price heading on second and it only shows when price by attribute or attribute price >0?

So on some products when size is same I can enter product price and price column should not appear. But on others when size is different making price different then have to enter attribute price then it should appear with price column. Default showing price below option name but I want it to in separate column (2) like I have on live site but I think I did not do it correctly and it pushing 0.00 there.

12 Nov 2015, 2:56 AM
#38
jsarwar avatar

jsarwar

Zen Follower

Join Date:
Jul 2012
Posts:
347
Plugin Contributions:
0

Re: Microdate vs price-by-attributes

Ajeh:

Where did you change the columns from 2 to 3?

search for <table in attribute module file around there I added <td></td> for price column

12 Nov 2015, 2:57 AM
#39
jsarwar avatar

jsarwar

Zen Follower

Join Date:
Jul 2012
Posts:
347
Plugin Contributions:
0

Re: Microdate vs price-by-attributes

I sent you file via PM. Please check.