Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[Contribution] Option Type Feature v1.4 (for osc 2.2 ms1)


Guest

Recommended Posts

i assume that it would have something to do with the 'restore_cart_contents' function as tat function is at login.

 

Not much help, but should point you in the right direction.

 

cheers

barry

Link to comment
Share on other sites

  • Replies 192
  • Created
  • Last Reply

Top Posters In This Topic

Logging in also has the same affect on the radio's and text options.

 

What is also strange is that selects options are also dropped when logging in, this is not good at all.

 

:?

 

cheers

barry

Link to comment
Share on other sites

Logging in also has the same affect on the radio's and text options.

 

What is also strange is that selects options are also dropped when logging in, this is not good at all.

 

:?  

 

cheers

barry

 

i sorted my problem above as i had tried to add a fix for the checkbox problem not adding to the cart contents.

 

i am now getting everything added to the cart contents before login, but if i have more than one checkbox defined all get dropped apart from one when i log in.

 

The offending code is in catalog/includes/classes/shopping_cart.php

 

i have tried and failed to get it to work....maybe someone can shed some more light.

 

 

cheers

barry

Link to comment
Share on other sites

Barry,

 

I have been spending some time on this but have not quite figured it out. Everything is working fine, except (as you just verified in your last post) that when more than one checkbox is checked it does not get carried over into the shopping cart upon login.

 

I have checked, and the data DOES get put into the database correctly. If you look in the customer_basket_attributes table you should see a listing for each of the checked checkboxes. The problem appears to be (again as you indicated) in the catalog/includes/classes/shopping_cart.php. From what I can see, the issues lies in the restore_contents() function. I have been playing around with the lines around line 55 - 60 (in my snapshot). It appears it is taking the data from the database, but since the checkbox option number is the same for each of the selected items it is only listing one of them. This appears to be the same issue that i corrected on the product_info.php page, just in another place.

 

I will keep trying, but I am not sure if it can be done without alot of changes to the code. One option would be to make each checkbox a separate option with just one attribute. Then my code fix earlier wouldn't be needed and the checkboxes would work without any problems just like the radio boxes do (because they only allow one selection).

 

Let me know if you have any ideas

 

As a side note (somewhat related): For those of you who are using Linda's Attribute Copier & Sorter, are you having an issue with the attributes losing their order after logging out and back in, or on the invoice pages? I had this problem and am creating a fix for it. If others need it, let me know and I will post it when it is fully completed.

 

Eric

Link to comment
Share on other sites

i think if we could get through this without having to make each checkbox a seperate option then that would be great.

 

what about reading the selected attributes from the database into an array where the option type id matches the checkbox id then read this array off row by row, that way the value of the row counter could be appended to the value id so the selected options display correctly after the cart contents are restored.

 

here's what i mean about the option type id's (this is from admin/product_attributes.php where the option type id's are set up)

 

function draw_optiontype_pulldown($name, $default = '') {

 $values = array();

 $values[] = array('id' => 0, 'text' => 'Select');

 $values[] = array('id' => 1, 'text' => 'Text');

 $values[] = array('id' => 2, 'text' => 'Radio'); 

 $values[] = array('id' => 3, 'text' => 'Checkbox');

 $values[] = array('id' => 4, 'text' => 'Multiple Select');

 return tep_draw_pull_down_menu($name, $values, $default);

}

 

 

I should note that i am no coder and although i have an idea of how this could be done, i cannot code it in the time i have available( and i would need a lot of time :? ).

 

i hope i have conveyed my theory well enough, let me know.

 

cheers

barry

Link to comment
Share on other sites

Has anybody fully tested the ConteZero contributions to see if the checkboxes work properly in allowing multiple checked attributes. If it does allow multiple checked items, does it carry them through the whole process (through login and checkout) without altering them?

 

Please let me know if you have tested this and it works. If so, then i could apply some of the logic to our case. If not, then I don't want to spend too much time on that option.

 

Eric

Link to comment
Share on other sites

i have looked at and installed conte mod in the past but do not recall how well the other features worked as my only concern was could i get the text feature to work on it.

 

To give you the information, i would need to through this up on a test server but that aint gonna happen for a couple of hours or even til tomorrow.

 

cheers

barry

Link to comment
Share on other sites

  • 2 weeks later...
  • 3 weeks later...

New problem with Option Type Feature v1.4 ?!?

 

I installed this mod and everything works fine but if I checkout a product with textoptions it is displayed very well until checkout_confirmation.php!

BUT when I look in the admin area in order.php for this order the product appears BUT the textoptions are just: Colour: TEXT

In that way there should not be TEXT - there should be the right value like red or something like that.

What is the problem?

I think the value is not written into database after checkout_confirmation. Any Ideas?

 

Thx,

Rob

Link to comment
Share on other sites

You need to be pretty careful when you are installing this mod, use a good diff program suchas beyond compare or examdiff to pick out changes. If you follow the readme file to the letter and use a diff program you will be ok.

 

What you have found is not a bug, but probably a symptom of something you've missed.

 

I assume you are using MS1 and not a CVS version.

 

cheers

barry

Link to comment
Share on other sites

The last version the mod was released for was MS1, i can not comment on any CVS version after MS1 (mid february) as i have not looked at one. The CVS versions are a work in progress and code changes are made daily so it can be difficult to keep contributions up to date and offer support.

 

My advice is use MS1 as it is a stable release and is well supported and the majority of contributions released in the psat few months are written or updated for MS1.

 

 

cheers

barry

Link to comment
Share on other sites

If you percivere with it you should be able to get this working, chances are that you have not passed the variables properly through the checkout procedure.

 

If i remember right the original variables are $option and $value.

They should be $option_id and $value_id.

 

But like i said earlier use a diff program to pick out the proper changes don't just dive in and change all the variables as named above as you could break the cart.

 

hope this helps

 

cheers

barry

Link to comment
Share on other sites

  • 3 weeks later...

It looks like there has been a lot of good work to get the kinks worked out of this greatky needed contrib. Will someone be posting an update to the contrib soon?

 

I really need the text box attributes, but when I use Beyond Compare to see the file differences, I get bug eyed :shock: and am afraid to even guess which changes to apply.

 

There are so many differences between this and my 5-18-2003 snapshot that has been modded with Linda McGrath's Shoppe Enhancement Controller. Then there is the code changes that have been flying around in this thread to complicate things.

 

Are ALL of Chandra's changes clearly marked? If so, that will help quite a bit.

 

Thanks,

 

Randy

Awana Grand Prix and Pinewood Derby racing - Where a child, an adult and a small block of wood combine for a lot of fun and memories.

Link to comment
Share on other sites

I really need the text box attributes, but when I use Beyond Compare to see the file differences, I get bug eyed and am afraid to even guess which changes to apply.

 

hi gpraceman I'm with you on this one! Got to start on this some time this week! hmmm headaches galore

What goes up MUST come down

Link to comment
Share on other sites

Me thinks !!! I think I will start with just the option type feature, as I do'nt need the radio buttons. I'm hoping it will be easier! then integrating with SEC1B ???

What goes up MUST come down

Link to comment
Share on other sites

First, thank you to everyone who's contributed to modifying this mod. I've gone through all 12 pages of posts and I'm wondering if the problem with disappearing checkboxes ever got solved? Would anyone with the answers have time to post an update? That would be a great addition to an already useful mod but if anyone has come up with a solution, I couldn't find it here. Thanks!

"It's a small world...

But I wouldn't want to paint it!"

Stephen Wright

Link to comment
Share on other sites

Me thinks !!! I think I will start with just the option type feature, as I do'nt need the radio buttons. I'm hoping it will be easier! then integrating with SEC1B ???

 

Hello pilot1. I was able to get this contrib installed with SEC 1b without too much problem. Fortunately, Chandra was good about commenting changes. I am not bothering with the check boxes and radio buttons for now, since I just need the text boxes. Now to do some testing to see if it all works throughout the order process.

Awana Grand Prix and Pinewood Derby racing - Where a child, an adult and a small block of wood combine for a lot of fun and memories.

Link to comment
Share on other sites

hi I have a 11/2002 version of OSC, which contribution should I use. We want to personalize christmas ornaments

http://www.maryjeanschina.com

 

best thing i can suggest is download them and read the install file, it'll tell you which one works with what, but if my memory serves me right it is 1.2 that you need, don't take my word for it though.

 

cheers

barry

Link to comment
Share on other sites

Hello pilot1. I was able to get this contrib installed with SEC 1b without too much problem. Fortunately, Chandra was good about commenting changes. I am not bothering with the check boxes and radio buttons for now, since I just need the text boxes. Now to do some testing to see if it all works throughout the order process.

 

I have been looking through the files, and I am amiss with beyond compare and have been frantically looking for a similar program for the Mac. The only one I can find is nowhere near as good.

 

The code as you say is well commented and I too am on sec 1B and am heartened that you have got so far bar the testing. Where there any sticky bits that neads looking out for?

 

The check boxes are uneccessary for me too.

 

Good luck!!

What goes up MUST come down

Link to comment
Share on other sites

best thing i can suggest is download them and read the install file, it'll tell you which one works with what, but if my memory serves me right it is 1.2 that you need, don't take my word for it though.

 

cheers

barry

 

hi, thanks for your prompt reply... I did read them, but I'm a little confused.

 

1.2 is for the 10/2002 version

1.3 is for the 01/2003 version

1.4 is for the 03/2003 version

 

I know some new code was established 03/2003, but I dont know if it interferes with my version 11/2002, and the version I have has new code for the new check out process, and I'm not sure if that would conflict with the 1.2 version

 

Last week I installed the 1.3 version, but then my entire categories info box disappeared & I htought I might be using the wrong version

 

Any insight would be helpful.

Link to comment
Share on other sites

I have been looking through the files, and I am amiss with beyond compare and have been frantically looking for a similar program for the Mac. The only one I can find is nowhere near as good.

 

The code as you say is well commented and I too am on sec 1B and am heartened that you have got so far bar the testing. Where there any sticky bits that neads looking out for?

 

The check boxes are uneccessary for me too.

 

Good luck!!

 

The only sticky part I ran into was in product_info.php. There is a new IF statement that you need to make sure that the closing brace is in the correct place. I put it in the wrong place and was getting an extra select box showing up on top of all the other options. The only other thing is that some queries that Linda had changed in SEC 1b, you will need to change for this mod.

Awana Grand Prix and Pinewood Derby racing - Where a child, an adult and a small block of wood combine for a lot of fun and memories.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...