Jump to content

Documentation


Recommended Posts

Hello everybody!

After testing several ecommerce platforms I'm trying CubeCart, and I like it very much. But as I'm not a genius developer I need simple documentation. Recently I developed site using Processwire CMS, and there was API information (https://processwire.com/api/). Is there something similar for CubeCart? If no, could somebody who knows it enough make such a thing? It whould be enormously helpful.

Link to comment
Share on other sites

Welcome Alexey Shimkin! Glad to see you made it to the forums.

For the user/owner/admin, there is wiki.cubecart.com.

For the developer, so very little as to be pointless to mention it.

CubeCart does not have an established API. There is the root mechanism to implement a custom API. That is, CubeCart listens for XML requests and custom querystrings, but it is up to the developer to make the functions that would act on that input.

I could write the "Missing Manual" book, but... well, stuff happens.

Link to comment
Share on other sites

Thank you for the link, I believe it would be useful. Though the interface is rather intuitive, and I hadn't looked for the help for users or administrators yet.

OK, there is no API. But there are file structure, plenty of variables and hooks, to begin with. Now I shoud look into files ang guess what they are destined to (names help but not much, especially for oere files. And as I don't know how to use hooks I'm trying to modify core that is not a very good thing, I know. As for variables, their names are helpful but only if You know which is exist, and besides there are issues with the usage area (I tried to call PRODUCTS from the product page, and nothing happend - while at the catalog it worked).

I don't ask for the comprehensive manual but some tips for developers would be very appreciated.

Link to comment
Share on other sites

I have experience in PHP programming but mainly procedural, very little oop (only using object's properties as variables). So please try to be simple :)

What I want to do:

1) remove some required fields (for example, address - it should be  optional and single text area, there is comments field which could do) from check out page. I removed them phisically from the template but I need to disable their checking.

2) make several options for some products but with different price - not with additional cost. The goal is to allow customer to buy single product or a pack (i.e. of 10) with discount (like at http://www.blueheronarts.com/product_info.php?cPath=2&products_id=20). When I use discount option I get discount for more then 10 while I neen the reduced price for 10, 20, 30... items (and possibility to sell individual products with higher price). Besides I like to show the options on the product card, not in tab somewhere... When I use options, I finish with +95 price, and I don't know how to connect it with the same product in the stock (but ten times more quantity). Surely there should be a solution besides creating additional product?

Not too much, isn't it?

Link to comment
Share on other sites

Assuming you are using the latest CC6 and the Foundation skin, I understand you removed some fields from the template content.checkout.confirm.php.

If so, perhaps it was in the <div id="checkout_register_form"> block. And it is the billing[line1], billing[line2], and billing[town] that you have (or are wanting to) merged into one text area form element.

These form elements can certainly be made optional, but I would not recommend they be merged into one form element as that would mean the PHP that accepts the form data would have to split it up to fit the database schema.

In the template file, remove the tag attribute required (but not the class value required) and {$LANG.form.required} from any field you do not want required. In the Foundation file js/3.cubecart.validate.js, near line 165, start making required:false the fields you do not want validated.

Link to comment
Share on other sites

Thank You, I haven't looked in the js folder. I'll try and report the result. And I don't need to combine address fields, I'm going to use the comments field instead (which is optional), so I need only disable required address fields.

As for package sales, can I create a package product (perhaps with the same id but with '-10' at the end), show its Add to basket field and button at the same page with the main product, and connect their stock levels?

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