Page 1 of 1

[CLOSED] Custom products

Posted: Tue May 13, 2025 1:09 am
by Joe1234
I'm looking for a feature I don't know is available. Search term requires custom and it seems like everything under the sun has the word custom in it, and none of them SEEM to match up with what I need.

Someone asked me to do a site for them and the premise is everything ordered is a custom job. So nothing listed you can actually buy, everything is an example of the size and package. So when you go to order you choose a size and then the optional contents.

How do I accomplish this? Now under OC you go to add something to a cart, you are adding that product and then the options you selected (from what I understand, I've never actually used the option feature). What I need is when someone presses add to cart(or create order as it were) (on any product that is listed), basically a blank product should come up where you then select how to configure the product from the options available.

Is a mod like this available or am I going to have to fenagle this? Or if you can offer a different route to achieve what I'm trying to do please do so.

EDIT: After thinking about it a little more, a route to take could be creating a dedicated product page where only that page can place an order, all other listed product pages would replace the "add to cart" button with a "create order" button which would take customers from that product to the order page. This order page would have all the options to choose and place the order and in the back end that product would have a million or whatever in quantity. Any better ideas than this let me know.

Also, is there a quick way to disable all indications of out of stock labels (not change them) that I'm not aware of, or do I just have to take care of that in the coding?

Re: Custom products

Posted: Tue May 13, 2025 1:39 am
by Cue4cheap
Can you explain how the product is combine?
Would chained options work for this?
i.e.
Shirt -> -> Long or Short sleeve -> Size -> Color -> design -> design color -> etc?

Mike

Re: Custom products

Posted: Tue May 13, 2025 7:44 am
by Joe1234
Custom baskets
Size -> Tier -> Occasion -> Theme
Possible other options (still fleshing it out).
I don't know what you mean by chained options...I've never touched the option feature before.
Also, with the options, is it possible that certain options only present themselves based on a previous option selection, or is that a mod that I would have to get (if that exists)?

Re: Custom products

Posted: Tue May 13, 2025 7:52 am
by Cue4cheap
Here is one option and it shows chained options:
https://www.opencart.com/index.php?rout ... n_id=14468

Re: Custom products

Posted: Tue May 13, 2025 4:59 pm
by OSWorX
Basically it's very easy to offer options for a product.

1. create a "basic" product with a "basic price"
2. define custom options you will need
3. assign these options (the required ones) to the product (and adopt the price if needed +/-)

This will show customers at the product single view all possible options they can select with the price (+/-)
The basket then will display all selected options beside this "basic" product and the total price.

Easy - or not?

Another method can be an extension which let the customer select which option ncan eb the next - based on the previous selection
This is called a "chained option".

Unfortunetely you did not write for which OC-Version you are planning to create this webshop (is it so hard to tell as the primary facts ? ? ? ).
There are better and cheaper extensions then the above mentioned.
So go through all possible extensions by yourself: https://www.opencart.com/index.php?rout ... ch=chained

Re: Custom products

Posted: Tue May 13, 2025 6:53 pm
by paulfeakins
Joe1234 wrote:
Tue May 13, 2025 1:09 am
I've never actually used the option feature
Set up a fresh OC and play with the option feature, then come back if you still have questions.

Re: [CLOSED] Custom products

Posted: Sun May 18, 2025 9:24 am
by grgr
Either we are missing a lot of details or your seem to be trying to make this harder than it needs to be.

If, for expample, Tiers is dependant (you didn't say either way) on size, then chained options may be requitred, otherwise, just create your 4 (or more) options:
Size:
> Small
> Medium
> Large

Tier:
> 1
> 2
> 3

Occasion:
> Birth
> Wedding
> Divorce
> Death

Theme:
> Happy
> Sad

Then, on the product edit page in the admin, on the data tab, set "subtract Stock" to no (so you don't have to add 1 million to stock, can just set set stock to 1).

If that doen't work for you, then more details on why it doesn't work are needed.

Re: [CLOSED] Custom products

Posted: Sun May 25, 2025 1:07 pm
by Joe1234
Sorry for the MIA, and thanks all that jumped in on this. After my reply and searching through the market I realized what I wanted seemed pretty customized so I dove into making the thing myself....then I dove further down in a rabbit whole expanding it beyond its initial scope.

Initial scope was to create something with options that would hide or state "out of stock" (chosen in admin) option selections with 0 quantity. This is based on a group of products instead of a single product. Basically I have products A, B, C, D all grouped as "Premium" on the option selection. When I have none of any of those products then the "Premium" selection is either hidden or set to "Sold Out", and I get a notification in the admin and by email when it reaches a different threshold like 10 or something. That worked fine.

Then I went down the rabbit hole and made the inputs and selections chained and sortable. That worked out fine.

Then I went down the rabbit whole further and ran into a coding problem that involves making uploads more logical and efficient. Everything was going fine until in my code I inadvertently caused an array to be saved as an option value with the upload (I believe). I don't know how, and I can't explain it better than that. So what happens now, is every time I log in with that user that did the upload I immediately get an error:

Code: Select all

/system/library/db/mysqli.php - line: 54 - Message: mysqli::real_escape_string(): Argument #1 ($string) must be of type string, array given - #0 /home/chris850/site_sigc/system/library/db/mysqli.php(54): mysqli->real_escape_string(Array)
#1 /storage/modification/system/library/db.php(87): DB\MySQLi->escape(Array)
#2 /catalog/model/tool/upload.php(12): DB->escape(Array)
#3 /storage/modification/system/engine/loader.php(248): ModelToolUpload->getUploadByCode(Array)
#4 /system/engine/proxy.php(47): Loader->{closure}(Array, Array)
#5 /storage/modification/catalog/controller/common/cart.php(80): Proxy->__call('getUploadByCode', Array)
#6 /storage/modification/system/engine/action.php(79): ControllerCommonCart->index(Array)
#7 /storage/modification/system/engine/loader.php(48): Action->execute(Object(Registry), Array)
#8 /storage/modification/catalog/controller/common/header.php(107): Loader->controller('common/cart')
I put a trace in the code block that calls getUploadByCode from the cart controller and I can see the array is from the IF condition that sees that option value is supposed to be a file. I've deleted all the missing orders thinking that is what's coming up when I log in but it still happens. Deleted the history, cache, browser sessions, cookies, everything, it always happens when I log in with that same user that I was going to make the purchase with. I come to the site as a guest or use a different user I have no problems. For now I guess I can catch if it's an array or string before proceeding, but that doesn't really solve the problem. So what file, dir, db entry, do I need to delete to get rid of an issue that's attached to a particular user. Since I don't know exactly where I caused this issue, I'm going to need to know how to fix this problem when it happens before I continue coding and debugging this.

Thanks.

Re: Custom products

Posted: Sun May 25, 2025 3:49 pm
by Joe1234
I figured out how to get rid of the problem, but it raises another question if anyone is able to answer it.
I fixed it by going into the db table _cart and deleting what was there. You can clearly see customer ID attached to carts in there...I first tested it by putting in a random customer ID in place of the problematic customer ID.
What I don't understand and if someone can clarify it for me, I thought "missing orders" were abandoned carts, which I deleted and this problem still remained. So I now assume things in db _cart are "abandoned" or not yet processed carts. So if missing orders are not abandoned carts as I thought they were, what are they?

Re: Custom products

Posted: Sun May 25, 2025 9:52 pm
by by mona
New question new topic please.
JNeuhoff wrote:
Fri May 20, 2022 12:19 am
Missing orders are those from users who started the checkout sequence, but never finished it to the final successful payment step.

Re: Custom products

Posted: Sun May 25, 2025 9:52 pm
by by mona

Re: Custom products

Posted: Mon May 26, 2025 1:56 am
by Joe1234
I remember that post, and that's why I was initially confused and needed clarification of what was happening. But I guess there is a distinction between things simply being in the cart and actually starting the checkout process, which was flying over my head after trying so long to figure out what was going on. Thanks.

Re: [CLOSED] Custom products

Posted: Mon May 26, 2025 5:04 am
by by mona
It was just the first answer on google, I did not remember it.

Not sure what the confusion is - the cart is not an order .. saved item is not an order and wish list is not an order .. the order process can not start until checkout .. only after payment is it an order … anything between the two is a missing order.