Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[Contribution] Option Types v2


Zappo

Recommended Posts

Hey George, I've been lurking here for about 2 weeks now, and I thought I was close on my own changes to /includes/classes/shopping_cart.php. I've gotten past the issue with updating quantities/deleteing items out of the cart, but I'm still beating my head against a few other problems (including getting temporary cart options to carry over when a user signs in.) Any chance I could take a look at your version of that file to compare?

 

Thanks in advance, will post what I find.

Edited by bluejayt
Link to comment
Share on other sites

Gabriel, could you say some of the problems you are beatings your head against, so we try to solve them 1by1?

 

For example, what exactly is the problem to carry over the temp cart options upon sign in? What do you mean? To write them to the db?

 

Well, "my version" is nothing more or less hat the "old version" and modifications that are posted here in this topic some pages pack + some more extended functionality, however, that all has nothing to do with the core functionality of option types and the cart functions.

 

If you compare the 2 virgin includes/classes/shopping_cart.php (rc2a and 231) you will see that differences are very few. Based on this you can merge then easily the "old" file into the new.

 

All you need is a file comparison tool

 

Anyway, post your concrete issues and lets go on from there

Link to comment
Share on other sites

George,

 

Thanks for your help, and sorry I wasn't more clear - I think hours of staring at code have started to kill my ability to communicate with actual people. So yes, one of the issues is the problem where if an item is added to a cart before the user logs in, once they do login, all textfield option types are dropped in writing it to the db. The other issue (now) is that if a user is signed in and adds an item to the cart, if they sign out without purchasing and sign back in, again the textfields are gone. I'm pretty sure I introduced this behavior when trying to fix the first problem, though, which is why I was hoping someone might have a working example of the code I could check my work against. I'll pull up rc2a and compare. Thanks!

Link to comment
Share on other sites

Gabriel,

 

From what you describe, you need to check 2 functions of file includes/classes/shopping_cart.php

 

1) function restore_contents This is responsible for addinf temporary cart contents to the DB, and pulling DB cart contents to the session upon login/create account

 

2) function add_cart This is responsible for adding items to cart tables in DB in case user is registered

 

Check this 2 functions against the "old" file

 

Other thing that you need to do is, to disable the parts where it is checked if attributes are numeric values, because of text options and file options, the "attributes pass check" need to return true anyway

 

Strange however that you have issues only with "text" options. Is this the only option type you have enabled, or do you have issues just there?

 

Whatever, I will try to post a complete and correct merged classes/shopping_cart.php to here

Edited by multimixer
Link to comment
Share on other sites

  • 2 weeks later...

Dear Albert Van Osch (Zappo),

 

We have been using your excellent contribution Option Types V2 for over a year. We have received complaints from customers who try to order multiple bracelets. We recently found that a quote mark or single quote mark in the text disallows changing the quantity from 1 in the shopping cart. Apparently the quantity is not being updated in the session table. Help!! Our website is www.custommemorialbracelets.com

 

Thanks for your help,

Tom

Edited by totalsystom
Link to comment
Share on other sites

Dear Albert Van Osch (Zappo),

 

I you are looking for Zappo, then it would be better to find an other way to contact him, since he is not active in the forums here anymore, unfortunately.

 

If you are just looking for help, then please explain a bit more what the issue is and what you mean with quotes in text. I just checked and it work fine

 

EDIT: Ah, you mean if the customer add quotes to the text he want, right?

Edited by multimixer
Link to comment
Share on other sites

this looks like a great contrib, but I'm having issues with what to do with the files. What files go where? I have done all of the updates in the install.txt, and ran the sql file, but what do I do with the other files? I see catalog has a number of new files, but also has files that potentially could overwrite what I just did in the install.txt file. What do I do?

Link to comment
Share on other sites

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

Maybe somebody has a little hint for me:

 

I've installed the contribution and it works so far. When the customer choses the same item a second time with another text, only the quantity is raised. So the customer sees 1 item with a quantity of 2, but only 1 text. What I need is, that the customer get 2 items with different text and a quantity 1.

Before installing this contribution it worked this way. (My colleague told me so)

 

I've checked the product_info, shopping_cart, includes/classes/shopping_cart and options_types, but I can't see any mistake.

Link to comment
Share on other sites

[...]When the customer choses the same item a second time with another text, only the quantity is raised. So the customer sees 1 item with a quantity of 2, but only 1 text. What I need is, that the customer get 2 items with different text and a quantity 1.

Before installing this contribution it worked this way. (My colleague told me so)[...]

 

Before installing this addon there was no text input option

 

Regarding your issue, take a look here

Link to comment
Share on other sites

  • 2 weeks later...

Does anyone have step by step instructions on how to install the optionTypes231 addon with oscommerce 2.3.1? I have oscommerce 2.3.1 up and running. I downloaded the optionTypes231 addon. The top folder structure is as follows:

 

catalog

drag-on-top files

install.txt

OptionTypes v2 SQL.sql

ReadMe-ImageOptions.html

 

I went through the changes in the install.txt, ran the sql in OptionTypes v2 SQL.sql. This alone was enough to get some of the addon working, but there were errors so I figured it had something to do with the other folders. What are the catalog and drag-on-top folders for? I did a compare on shopping_cart.php, and the version in catalog is different than the version in drag-on-top files. They are both different the original oscommerce 2.3.1 shopping_cart.php file, even after I applied the changes in the install.txt. So I'm not understanding which changes are supposed to apply and in what order they are supposed to be applied.

 

Any help would be greatly appreciated.

Link to comment
Share on other sites

Many thanks to Zappo and of course to ALL the contributors here!

 

Having many checkboxes under many options makes for a looong page.

Is there a way to have checkboxes appear in two or more columns?

 

I have figured out multi-columns for radio buttons, but need help for checkboxes.

 

Thank you very much.

Link to comment
Share on other sites

I would say that it work perfectly fine with version 2.3.1

 

To your question: Yes, I have it running on many stores

 

I would still go some pages back in this topic here to check for fixes/improvements that have not been included into the 2.3.1 version of the addon. An issue could be with file classes/shopping_cart.php (as some users reported), my suggestion about is here

Link to comment
Share on other sites

Dear George, I'm happy to know that this contribution runs on 2.3.1 because it will be very usefull and I was about to give it up.

 

Following your instructions, I have dowloaded the version for rc2a, with the file comparer I have make the changes to have the includes/classes/shopping_cart.php like the old one, and finally I have made all the comparisons return attributes_pass_check = true;

 

Now the products with textboxes and checkboxes adds to the chart, but in the catalog/shopping_cart.php page, I can only see the products but not the options (texbox or checkbox I have selected) or the remove or change quantity buttons like before.

 

Any tip for solving this?

 

Thank you.

Link to comment
Share on other sites

Maybe somebody has a little hint for me:

 

I've installed the contribution and it works so far. When the customer choses the same item a second time with another text, only the quantity is raised. So the customer sees 1 item with a quantity of 2, but only 1 text. What I need is, that the customer get 2 items with different text and a quantity 1.

Before installing this contribution it worked this way. (My colleague told me so)

 

I've checked the product_info, shopping_cart, includes/classes/shopping_cart and options_types, but I can't see any mistake.

 

 

Which contribution are you using because so far when I have installed them, I keep getting errors. I really need to get this figured out as soon as possible.

Link to comment
Share on other sites

I get correctly the options in the catalog/shopping_cart.php : - texbox: "AS" - textarea: "EEE"

 

But I lose them in the catalog/checkout_confirmation.php : "- textbox : "CUSTOMER-INPUT" - textarea: "CUSTOMER-INPUT"

 

In the BD only saves products_options_values to "CUSTOMER-INPUT"

Link to comment
Share on other sites

This optionTypes231 module DON'T work at all. Don't waste your time to try install it.

Miss many file & basic OP V2 code.

 

 

Hello David,

 

Do you know which contribution works for that? I have also tried another Product Extra Fields - Max Grabowski from 2004. And some of the text he has you place or replace on #1, #4, and #6 are not even in the file.

Link to comment
Share on other sites

I would say that it work perfectly fine with version 2.3.1

 

To your question: Yes, I have it running on many stores

 

I would still go some pages back in this topic here to check for fixes/improvements that have not been included into the 2.3.1 version of the addon. An issue could be with file classes/shopping_cart.php (as some users reported), my suggestion about is here

 

 

Is there any way you can send me the file you have so that I can compare. I'm just about bald from pulling my hair out over this. Either I'm code drunk or have no clue what I'm doing. Please and thank you =o)

Link to comment
Share on other sites

Does anybody have an answer for this problem:

 

Having many checkboxes under many options makes for a looong page.

Is there a way to have checkboxes appear in two or more columns?

 

I have figured out multi-columns for radio buttons, but need help for checkboxes.

 

Thank you very much :)

post-201040-0-14467700-1328824851_thumb.gif

Edited by gtheocharis
Link to comment
Share on other sites

I have the issue where I can not add an item then has a text field into my shopping cart? It works fine if I dont have a text field though. I have tried murging with the old file but with no success. Does somebody have a working shopping_cart.php that will allow me to import product with text fields please.

 

I have attached my shopping_cart.php if that helps.

shopping_cart.php

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...