Installing Shopping Cart- Need Help With Code Placement

A place for users and developers of the Xataface to discuss and receive support.

Installing Shopping Cart- Need Help With Code Placement

Postby RocksDiamondDeals » Fri Sep 02, 2011 1:34 pm

Hello,

Currently I have a eshop/checkout system with my hosting provider (http://www.rocksdiamonddeals.net/Shop_R ... dDeals.php) and i received help with them in copying the files from their location (eshop) to xataface/modules/ShoppingCart like step on in the installation instructions at http://www2.xataface.com/wiki/ShoppingCart.

Now i am trying to do the remaining steps:
2. Add the following line to the [_modules] section of your conf.ini file:
modules_ShoppingCart=modules/ShoppingCart/ShoppingCart.php

Q. Where do i find this file? there are a few by this name.

3. Add the following to the beginning of your index.php file?:
function __autoload($class){
if ( $class == 'ShoppingCart' ) require_once 'modules/ShoppingCart/lib/ShoppingCart/ShoppingCart.class.php';
}
Q. Where do i find this file? there are a few by this name.

4. In the fields.ini file for any table whose records you wish to represent items for sale, add the following:
[__implements__]
InventoryItem=1

Q. Where do i find this file? there are a few by this name. Also, I dont understand this table stuff... what does that mean?


5. Specify which fields should be used for the item description, price, width, height, length, and weight in the fields.ini file for each table whose records you wish to represent items for sale by adding the following directives to the appropriate fields:

ShoppingCart.description=1
ShoppingCart.unitPrice=1
ShoppingCart.weight=1
ShoppingCart.width=1
ShoppingCart.height=1
ShoppingCart.length=1

E.g. if your table has a field named ""price"" that you want to represent the unit price, you would have something like:

[price]
ShoppingCart.unitPrice=1

The shopping cart module will make its best guess on which fields to use for these values if they are not explicitly specified.

Q. Where do i find this file? And again with the table stuff???

6. Specify the paypal account where money should be deposited by adding the following to your application's actions.ini file:

[view_cart]
paypal.account="youremail@example.com"

Q. Where do i find this file?


I understand the concept of what is required, i am just not familiar with the practice of doing this...
I will attach photos of where i have the ENTIRE shop for my eshop that i transfered to use with the auctions... can you tell me if i need to only use the 'cart' file or the whole thing, or if i need a whole new shopping cart... i would really prefer to use the same cart to make my life easier, but im in waters way above my head at this point. Ill download a new cart if absolutely necessary... but i would rather not.

Please help me in very simple words... dont say something like ccs or css what ever it is... i dont kow what that mean lol!
locations.png
Where i have the files located...
locations.png (74.03 KiB) Viewed 2086 times


The cart file code is located here
https://gator1582.hostgator.com:2083/fr ... =&basedir=


Thank you
RocksDiamondDeals
 
Posts: 7
Joined: Thu Sep 01, 2011 7:19 am

Re: Installing Shopping Cart- Need Help With Code Placement

Postby shannah » Sun Sep 04, 2011 9:44 pm

Q. Where do i find this file? there are a few by this name.


This is your application's conf.ini file. It is the file that you created (or makesite created) that contains all of your app's config information. If this is your first module you'll need to add a [_modules] section. See http://xataface.com/wiki/Module_Developers_Guide for more information about Xataface modules.

Q. Where do i find this file? And again with the table stuff???


This section is generally referring to field settings in your fields.ini file for the table that is housing your products.


[view_cart]
paypal.account="youremail@example.com"

Q. Where do i find this file?


You create an actions.ini file for your application.
See
http://xataface.com/documentation/tutor ... ce_actions
http://xataface.com/wiki/actions.ini_file

for more information about actions.

Note: The shopping cart module is pre-alpha quality. It has been used in only a few projects generally has required a fair amount of customization to make it fit right into the requirements of each app.

-Steve

-Steve

-Steve
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

Re: Installing Shopping Cart- Need Help With Code Placement

Postby RocksDiamondDeals » Mon Sep 05, 2011 9:41 am

This is your application's conf.ini file. It is the file that you created (or makesite created) that contains all of your app's config information.

Do you mean my web auction app, or my shopping cart app?
Id you meant the web auctions app--- do i alter the main conf.ini, or the one in the skeleton sub folder

This section is generally referring to field settings in your fields.ini file for the table that is housing your products.

Again in which app do you mean? Yours or theirs?
I am sorry i sound so naive... I normally catch on to new things really quick... and my inability to 'get' this is incredibly annoying!


I tried to alter my current shopping cart system for my eshop to allow the auctions to checkout through the same system, but it did not have ANY of the files you say to alter... I was told that this app is just to simple to need to configure...

So in an attempt to test the system with another check out system (presta shop), i downloaded it... it also does not have a conf.ini file, although it does have some of the others...


Any more advice?
RocksDiamondDeals
 
Posts: 7
Joined: Thu Sep 01, 2011 7:19 am

Re: Installing Shopping Cart- Need Help With Code Placement

Postby shannah » Mon Sep 05, 2011 10:33 am

Sounds like you may be jumping in a little too fast here. You shouldn't ever modify files in xataface or any modules. All customizations should be done through your application. If you find you are making changes to xataface or a module that means that you are putting on your developers hat and are forking the software. Xataface is made so that all settings can be done in your application.

If you are starting from a base of WebAuction, then webauction is the application. All config files mentioned would be in the application - not xataface (i.e. dataface) or any module.

ShoppingCart = module
Xataface = Dataface
WebAuction = application (this is where all your customizations and configurations go).

I've never tried to incorporate the shopping card module into web auction so I'm not sure what pitfalls you're likely to run into. At the very least I'd say there will be some pitfalls (and I don't consider the current obstacles you're facing to be pitfalls).

Sounds like you should probably work your way through the getting started tutorial or try building some simple apps from the ground up with Xataface to help grasp some of the concepts in Xataface.

-Steve
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

Re: Installing Shopping Cart- Need Help With Code Placement

Postby RocksDiamondDeals » Mon Sep 05, 2011 1:12 pm

You would be amazed at how helpful just categorizing
ShoppingCart = module
Xataface = Dataface
WebAuction = application (this is where all your customizations and configurations go).

was for me!

I understand what is going on a lot more now...
I placed all the alterations in to the correct places...


Now i get this error:
function __autoload($class){ if ( $class == 'ShoppingCart' ) require_once 'modules/ShoppingCart/lib/ShoppingCart/ShoppingCart.class.php'; }

Theories on what i am missing/need to fix?
RocksDiamondDeals
 
Posts: 7
Joined: Thu Sep 01, 2011 7:19 am


Return to Xataface Users

Who is online

Users browsing this forum: No registered users and 23 guests

cron
Powered by Dataface
© 2005-2007 Steve Hannah All rights reserved