Jump to content
joekushner

Actual Attribute Price V1.0

Recommended Posts

Installed per your file, but get the following error:

 

Parse error: parse error, unexpected $ in /home/ramkitch/public_html/catalog/includes/classes/shopping_cart.php on line 505

 

can't figure out why - any ideas?

 

I am using CREloaded 6.1a

 

Mike

Share this post


Link to post
Share on other sites

I want to use this mod to set specific prices for autographed poster sizes (8x10 = $95, 16x20 - $195) in my store. But instead of having a product base price and then two separate prices in the attributes, can I put both prices on the products_info.php page AND both prices with an 'Add to cart' button each on the category view of index.php? That way a user can immediately select their item to their cart without visiting the product info.

 

Is this possible? Can someone help me do this?

 

Thanks! Cheers,

 

//jantzie

Share this post


Link to post
Share on other sites
I would like to find out how to do this too. can anyone help? i'm sure i have read all my way through this forum with no luck yet.

 

Version 1.41 also misses a reference to order.php(i think) which you can find in previous version.

 

Gecko

 

Has anyone gotten anywhere with this yet?

 

I'm no PHP coder, but I'm going to try to take a stab at it. Has anyone else tried? I'm wondering if I should start with a base install without Actual Attribute or Weight Attribute, install the Weight Attribute contrib and start from there.

 

Anyone get anywhere yet?

Share this post


Link to post
Share on other sites
Has anyone gotten anywhere with this yet?

 

I'm no PHP coder, but I'm going to try to take a stab at it.  Has anyone else tried?  I'm wondering if I should start with a base install without Actual Attribute or Weight Attribute, install the Weight Attribute contrib and start from there.

 

Anyone get anywhere yet?

 

I've attempted to incorporate the changes (mostly to catalog/includes/classes/shopping_cart.php).

 

The only 2 problems I'm seeing so far are

 

1) The following error when attempting to manually add a product's price and weight using the "products attributes" admin menu item. The new "Weight" field shows up there, but when I try to add a price of 15.00 and a weight of 3 with a "" prefix, I get:

---------------------------------------------------------------------

1136 - Column count doesn't match value count at row 1

 

insert into products_attributes values ('', '8', '3', '4', '15.00', '', '3')

-------------------------------------------------------------------------------

 

Again, I'm no PHP coder, but it looks as though perhaps when I ran the SQL as outlined in the Products-Weight contrib, I added a field and something isn't expecting the extra field.

 

2) The "weight" attribute does not show up on the attribute grid on the admin->catalog->product entry screen.

 

Anyone have any suggestions?

Share this post


Link to post
Share on other sites
The only 2 problems I'm seeing so far are

 

1) The following error when attempting to manually add a product's price and weight using the "products attributes" admin menu item.  The new "Weight" field shows up there, but when I try to add a price of 15.00 and a weight of 3 with a "" prefix, I get:

---------------------------------------------------------------------

1136 - Column count doesn't match value count at row 1

 

insert into products_attributes values ('', '8', '3', '4', '15.00', '', '3')

-------------------------------------------------------------------------------

 

 

Quick update.... Even if I am merely replying to the air, at least I'm learning something! ;-)

 

AFAICT, the problem lies in catalog/admin/products_attributes.php - or in one of the functions called from there. When attempting to update the products_attributes table with the new attributes, there appears to be a discrepancy between the *number of values* being sent ('', '8', '3', '4', '15.00', '', '3') from products_attributes.php and the *actual number of fields* in the "products_attributes" table.

 

Does anyone know where this is defined? I can see a $num_rows variable in "products_attributes.php, but I can't see a "$num_col"-ish variable.

 

In the "Add Weight to Product Attributes" contrib install instructions, this SQL statement looks to be adding an extra field to the "product_attributes" table.

---------------------------------------------------

ALTER TABLE `products_attributes`

ADD `options_values_weight` DECIMAL (15 ,4) DEFAULT '0.0000' NOT NULL;

--------------------------------------------------------------------

 

If this was resolved, I think we'd be taking a major leap towards being there!

 

Oh, as is obvious to all by now, not only do I not know diddly 'bout PHP, but I'm not Mr. MySQL either... ;-(

Share this post


Link to post
Share on other sites
Quick update....  Even if I am merely replying to the air, at least I'm learning something!  ;-)

 

AFAICT, the problem lies in catalog/admin/products_attributes.php - or in one of the functions called from there.  When attempting to update the products_attributes table with the new attributes, there appears to be a discrepancy between the *number of values* being sent ('', '8', '3', '4', '15.00', '', '3') from products_attributes.php and the *actual number of fields* in the "products_attributes" table. 

 

Does anyone know where this is defined?  I can see a $num_rows variable in "products_attributes.php, but I can't see a "$num_col"-ish variable.

 

In the "Add Weight to Product Attributes" contrib install instructions, this SQL statement looks to be adding an extra field to the "product_attributes" table.

---------------------------------------------------

ALTER TABLE `products_attributes`

ADD `options_values_weight` DECIMAL (15 ,4) DEFAULT '0.0000' NOT NULL;

--------------------------------------------------------------------

 

If this was resolved, I think we'd be taking a major leap towards being there!

 

Oh, as is obvious to all by now, not only do I not know diddly 'bout PHP, but I'm not Mr. MySQL either...  ;-(

 

I checked out the products_attributes table, and sure enough, there are 8 fields. The products_attributes.php in catalog/admin is only passing 7 fields...

 

I had copied in the products_attributes straight from the weight contrib, and decided to manually tweak. The problem was pretty apparent, but I'm using CRE Loaded and there have been a couple of attribute contribs applied so the products_attributes.php looks a bit different.

 

I'm now able to add attributes with no errors, but am not sure how much more I have to go.

 

I may try it on a stock MS-2 install.

 

Is there any interest in this? If not, I'm going to create separate products and forget it for now.

Share this post


Link to post
Share on other sites

Ok - problem. I installed this and now everything works right except for when the customer goes to checkout and then everything doubles. So, in other words, everything works perfect, the customer goes to check out, and the cart doubles the cost on all the attributes that were supposed to be 'actual'.

 

Anybody?

 

Mike

Share this post


Link to post
Share on other sites

hi all.. installed the mod.. but when i click 'add to cart' i get the following...

 

Fatal error: Call to undefined function: generate_cart_id() in /home/s/t/stamp/public_html/catalog/includes/classes/shopping_cart.php on line 107

Share this post


Link to post
Share on other sites

It's okay i've done it now. Great contrib :D

 

For some reason this contrib doesnt aggree with dreamweaver as much as the others.. i used another editor and it worked fine.

 

Now, does anyone know if this can be used with new attribute manager? This contrib is excellent, and certainly something which was lacking on OS, but it does mean that you can't use other attrib contribs, and have to revert to the original sucky OS one.

 

I really want to use newa attribute manager, but cant find where to change the code to allow the actual price?

Share this post


Link to post
Share on other sites
Ok - problem. I installed this and now everything works right except for when the customer goes to checkout and then everything doubles. So, in other words, everything works perfect, the customer goes to check out, and the cart doubles the cost on all the attributes that were supposed to be 'actual'.

 

Anybody?

 

Mike

 

I've seen this question asked a few times but haven't seen the answer during my search.

 

I am also having the same trouble as well as the sub-total equalling 0.00 on the cart contents page.

 

What would be causing this?

 

Slater

Share this post


Link to post
Share on other sites
I've seen this question asked a few times but haven't seen the answer during my search.

 

I am also having the same trouble as  well as the sub-total equalling 0.00 on the cart contents page.

 

What would be causing this?

 

Slater

 

Best I can figure is that the latest version of this just doesn't work. I have been posting back and forth on the CREloaded forum on this. You can see what we have done there:

 

http://creloaded.com/Forums/viewtopic/t=4735/start=15.html

 

Good luck,

 

Mike

Share this post


Link to post
Share on other sites

Hi can someone please post some decent instructions for this mod.

 

Its a great contribution , but the latest documentation just does not make sense.

 

Can anyone help decipher please.

 

all help appreciated

 

Gecko


this time it'll go :-)

Share this post


Link to post
Share on other sites
Hi can someone please post some decent instructions for this mod.

 

Its a great contribution , but the latest documentation just does not make sense.

 

Can anyone help decipher please.

 

all help appreciated

 

Gecko

 

Post which part is confusing you and I'll see what I can do to help decipher it for you.

 

Mike

Share this post


Link to post
Share on other sites

FIX: Add an attribute's actual weight to the cart for checkout and shipping

 

To xtech and others who are trying to set a weight for an attribute:

 

The only problem with this contribution is that it doesn't account for weights. So I came up with this fix.

What this does is allow you to assign specific weights to each attribute. When you select an attribute product for purchase, that attribute's weight is added to cart (for shipping calculations) WITHOUT BEING ADDED TO THE PRODUCT'S ORIGINAL WEIGHT!!! The product's base weight is replaced with the weight of the attribute!

 

Before proceeding make sure you already have the Actual Attribute Price mod correctly installed, as this edits one of it's lines of code.

 

STEP 1: Install the contribution: "Add Weight To Product Attributes v0.2"

 

STEP 2: In catalog/classes/shopping_cart.php:

 

Find this line:

 

$this->weight += ($qty * $attribute_price['options_values_weight']);

 

And replace it with this line:

 

$this->weight += ($qty * $attribute_price['options_values_weight'])-($qty * $products_weight);

 

That's it!!

I've tested this in every scenario possible, but there is still a possibility for error.

Share this post


Link to post
Share on other sites

Hello... I need your help..

I have the difficulty with installing this script.. Can somebody give me files to replace on my host in order to make it work.... Thanks...

Share this post


Link to post
Share on other sites

Hi Folks,

 

In relation to 'actual attribute weight'.

 

I first installed Advanced_Actual_Attribute_Prices_1.41 and that worked, then i wanted to implement the actual attribute weight module. So I first installed Add Weight To Product Attributes v0.2 then actual attribute weight module.

 

Whilst the addtion of weights and prices are all correct and working I get a negitive total in shopping cart column.

 

I fear that installing the Add Weight To Product Attributes v0.2 AFTER Advanced_Actual_Attribute_Prices_1.41, may have over written some of the code in \includes\classes\shopping_cart.php

 

I also get an error on the payment information screen:

 

Fatal error: Call to undefined function: count_contents_virtual() in C:\sokkit\site\melbourneBeads\catalouge\checkout_payment.php on line 82

 

Which i assume is caused by similar.

 

Is there a quick way around this or am i best set to reinstall the actual attribute price module?

 

Thanks,

paul.

Share this post


Link to post
Share on other sites
I checked out the products_attributes table, and sure enough, there are 8 fields.  The products_attributes.php in catalog/admin is only passing 7 fields...

 

I had copied in the products_attributes straight from the weight contrib, and decided to manually tweak.  The problem was pretty apparent, but I'm using CRE Loaded and there have been a couple of attribute contribs applied so the products_attributes.php looks a bit different.

 

I'm now able to add attributes with no errors, but am not sure how much more I have to go.

 

I may try it on a stock MS-2 install. 

 

Is there any interest in this?  If not, I'm going to create separate products and forget it for now.

 

Hi xtech,

 

I have been looking at this thread all day and i've finally figured out i have the same problem as you. Have you had any luck resolving this?

 

Things run smoothly untill i installed the weight attribute contrib and i end up with the miss match in the number of fields, the products_attributes.php looks rather different than the creloaded version, can you suggest what vital code chunks are required for the weight contrib products_attributes.php so i can add them to the existing version of products_attributes.php?

 

At first i thought the instructions for Actual Attribute Price were annoying, but in fact its much better to copy and paste the snippets of code, than overwrite the whole file, and loose bits and pieces of other contribs.

 

Cheers,

Paul.

Share this post


Link to post
Share on other sites

Hi there,

 

Ok I think the missing attribute is 'sort order' i think that is why the inserting weight attributes is coming up short. it is reference here on line 38 and lots of other places.

 

// BOF: WebMakers.com Added: Attribute Sorter
// OLD ? ? ? ?tep_db_query("insert into " . TABLE_PRODUCTS_ATTRIBUTES . " values ('', '" . $HTTP_POST_VARS['products_id'] . "', '" . $HTTP_POST_VARS['options_id'] . "', '" . $HTTP_POST_VARS['values_id'] . "', '" . $HTTP_POST_VARS['value_price'] . "', '" . $HTTP_POST_VARS['price_prefix'] . "', '" . $HTTP_POST_VARS['sort_order'] . "')");
? ? ? ?tep_db_query("insert into " . TABLE_PRODUCTS_ATTRIBUTES . " values ('', '" . $HTTP_POST_VARS['products_id'] . "', '" . $HTTP_POST_VARS['options_id'] . "', '" . $HTTP_POST_VARS['values_id'] . "', '" . $HTTP_POST_VARS['value_price'] . "', '" . $HTTP_POST_VARS['price_prefix'] . "', '" . $HTTP_POST_VARS['sort_order'] . "')");
// EOF: WebMakers.com Added: Attribute Sorter

 

admin\product_attributes.php contains ref to $HTTP_POST_VARS['sort_order'] which isnt in the weight attribute version of the same file Is the alternative to pick thru and get only the relevant pieces from the weight attribute product_attribute.php file? I think thats far beyond my copy n paste ability, best left to someone who knows the contrib inside out.

 

anywho, progress progress.

Paul.

Edited by Mibble

Share this post


Link to post
Share on other sites

I justed wanted to say that this is a wonderful contribution in terms of what it does but the documentation is a bit tricky. On the latest version, above point 8, it doesn't say that you apply the following changes to classes/order.php. I had to look back at a previous version notes to work out where to change. Other than that, thank you. :thumbsup:

Share this post


Link to post
Share on other sites

Hi there,

 

I installed version 1.41. Since the documentation was a bit confusing I'm not too sure if I've installed it correctly. I've followed all the steps but when I try and check out tax is not applied to my attribute price. Am I doing something incorrect in the installation here or is there a fix for this?

 

Any help would be appreciated.

 

Thanks!

Share this post


Link to post
Share on other sites

Hi,

 

Is it possible for somebody to post the complete code of modified pages ?

I'm very sorry but I can't speak english and I don't have knoweldge in php.

 

Thanks.

 

R?mi

Share this post


Link to post
Share on other sites

I'm having problems, too; but I'm not sure if its a module conflict problem with the Quantity Price Break Module or an installation problem. The install instructions are VERY hard to understand.

 

I have installed version 1.41 from March 11th posted by CrashWave. I haven't installed the weight fix version yet because I wanted to make sure this part worked first.

 

From reading the install instructions and the posts in this thread, I have done the following:

 

catalog/includes/classes/shopping_cart.php - Made changes from #1, #2, #5, & #6.

 

catalog/product_info.php - Made changes from #3.

 

catalog/includes/classes/order.php - Made changes from #9.

 

#4, #7, #8, and #9a were removed from the instructions and #9b was only for people with the customer group pricing module.

 

Could someone please let me know if I have followed all of the install steps correctly and let me know if I have missed something?

 

CG :(

Share this post


Link to post
Share on other sites

I've tried installing this 3 times, but every time I upload the changed files there seems to be no effect to how attributes are displayed.

 

Is there anyway someone could upload the entire shopping_cart.php , order.php , and product_info.php files after this contribution is installed so I can compare them? Thanks for all the help.

Share this post


Link to post
Share on other sites

I'm sooo tireed...

 

sorry, but I need some help.

 

Has someone installed the advanced actual Price - Contribution ??

 

 

I have all the updates and fixes...but...it does not work. So I want to setup this contribution again, but I have some difficults with the update-files. It makes me crazy....

 

Can someone help me with an easy "What to do- Text" ?

 

I found no tread..


just create...and sell..sell...sell.....

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×