Jump to content

Call the CubeCart from outside the cart folder


BOSman

Recommended Posts

I have an existing website catalog with 1000 products. Site is based on Bootstrap 3. I strictly use a shopping cart for placing items in the cart, order checkout, order records. Product display is handled by Bootstrap. I've integrated a shopping cart based on javascript and it functions well, but the cart is limited in security.

I have CubeCart 6.1.4 installed and it looks great. I understand that Bootstrap and Foundation have similar grids but I DON'T want to rewrite the website. I'm looking for a workaround. If I reproduced my products in the CubeCart mysql product table, and somehow had Bootstrap pages call a cart display from CubeCart and had an Add To Cart button that also called CubeCart, would something like that work?

Basically I would need to call CubeCart from files outside the CubeCart folder environment. Would I be losing state? I'm looking for an opinion before I dive into coding. Thanks in advance.

 

Link to comment
Share on other sites

Welcome BOSman! Glad to see you made it to the forums.

As long as CubeCart is aware of its cookie, session state will be maintained.

Bootstrap (Foundation, et al) allows for browser-activated CSS and javascript control of special effects. Very little matters to CubeCart regarding the skin. The only thing that does matter is that the skin/theme have templates with certain names.

CubeCart gets the data requested and gives it to the template rendering engine. The rendering engine reads in the specified template and tries to match up the data that is supposed to replace the placeholders. It is simply a matter of an arbitrary string with {$placeholders} that will have data such as phrases and prices. There is no penalty for having a placeholder with no matching data, and data with no matching placeholder.

CubeCart has a very minimal API - none of it designed to operate Cubecart in the manner described. All messages are sent to CubeCart using typical GET and POST form submissions.

 

Link to comment
Share on other sites

Thank you for your quick response bsmither.

I knew my idea was cumbersome and I'm not surprised at your answer.

So if I'm understanding your response correctly, maybe I should try creating a new skin for CubeCart using my existing code, css and js (as well as what is necessary for CubeCart), rewriting grid code for foundation, and see what happens.

Where may I find placeholder definitions in CubeCart or are they so obvious I'll understand them looking at another skin?

I'm sure I'll find issues, but if I get something that looks half-way good it will give me momentum to proceed further. Thanks.

Link to comment
Share on other sites

Many of the placeholder variable names are indicative of what they are supposed to be holding.

You mention rewriting grid code for Foundation. I think there is no reason for doing that - bootstrap grids provide structure to the skin - something CubeCart is not aware of.

Unfortunately, there is no SDK for CubeCart - yet. In these forums, no one will ever suggest to you to RTFM. There isn't one. (There is, however, a WIKI. In admin, every page has a Help link, the comprehensiveness of the contents vary.)

 

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