Archive

Posts Tagged ‘commerce shopping cart’

Shopping Cart – Postgresql

November 26th, 2009 Comments off

Shopping Cart with the following features to be based on PostgreSql database:

Product Recommendation
Blog
Forum
Poll
Articles
FAQ
Search

Mysql Export Using Php

May 19th, 2009 Comments off

Experience I need: MySQL, PHP – Would be best if you also have experience with Instinct’s E-Commerce Shopping Cart Plugin and WordPress

Overview of what the system is and how it was created to this point: Using a customized Ecommerce Shopping Cart in WordPress. The customer orders this plugin saves into the database will need to be exported out daily by the business owning the site to be imported into their POS system to process the orders in their store. After getting the correct order information out using PHP, it is echoed in the same order as their POS system accepts data separated by commas. I’ll handle saving the data to the csv file and setting up so that it begins at the last exported order to current. Right now I just need someone more experienced in mysql querying and php to correctly pull the remainder of the right data out for each order. The beginning is complete, I have run into something over my head on some variation id numbers needed that queries multiple tables in the database instead of just one.

As an example, the purchase order number is 5. That id number needs to be used to query a variation table, which will give back 3 variation number fors every item in order # 5. Those variation numbers will need to be used to get the stores webitemid number from another table. I had no problem getting to this point, but I am incorrectly looping the information and just repetitively repeating one items variation information.

The layout of the csv file is one item per line. So if one order has 3 items, that order will print 3 lines, each showing different webitem numbers that refer to that item.

I already have the order id number and a sku number in a variable. I need the next 3 csv columns to echo out correctly. If there is a sku number, then the first of those 3 fields will use it and the other 2 will be the webitemid numbers. If not, the first webitemid number will start the 3 columns and fill them.

Here’s info on the db and tables and where I’m stuck at:

wp_cart_item_variations lists the variations in each order number. In that table, the value_id are the numbers needed for referencing the webitemid number in wp_variation_values. (Or at least that’s what I think – not sure if it would be simpler to use different numbers.)

This is the field column list of the required csv order (ignore the quotation marks please, I added them so that I could read the column names easier.
“order_id”,”customer_id”,”subtotal”,”tax”,”shipping”,”discount”,”order_total”,”date_placed”
,”bundle_id”,”customer_firstname”,”customer_lastname”,”customer_email”,”billing_address_1″
,”billing_address_2″,”billing_city”,”billing_state”,”billing_zip”,”card_message”,”card_signature”
,”product_id”,”flower_id”,”flower_qty”,”card_id”,”shipping_firstname”,”shipping_lastname”
,”shipping_email”,”shipping_address_1″,”shipping_address_2″,”shipping_city”,”shipping_state”
,”shipping_zip”,”shipping_method”,”shipping_delivery_date”,”status”,”organization”

The programming is working up to “product_id”. Unless you feel that one of the other columns I have programmed could be done better to make the rest of the exporting work better, that part doesn’t need done. I actually think unless you are also experienced in the e-commerce shopping cart for WordPress developed by Instinct, re-starting the whole process over is just going to be too confusing with a bunch of questions that I won’t have time to answer correctly.

There should always be the product_id and flower_id, but the flower_qty can be empty once in a while. There are a couple products that do not have a quantity option and are a specific flower arrangement.

The card_id is found in the wp_cart_contents table under giftcard. I already have this data being pulled in the programming, but you may need to alter my programming some. This is the odd field that has a whole bunch of info in one cell. (I really wish I could change that, but there would be so much more cart customizing needed. The cart itself needs the least amount of customizing so that it’s possible to upgrade.) The id number for the cards is entered at the beginning between * and with a space after it before the other information starts.

The remainder of the columns in the list with shipping address are also in that gift card cell.

The last 3 – shipping_delivery_date can just auto set to 00:00.0, status to 3000, and organization will be in the wp_submited_form_data table using the cart id and the form_id 18. That can be blank on some orders.

I can take care of the file saving etc, if you can just have it print or echo the result.

If you can do at least those 3 columns – that’s great. Even better if you want to go ahead and just finish up the others too. The rest are simply breaking apart a single variable that is already being pulled correctly.

Please type Hello Dzynit at the beginning of your bid so that I know it’s not automated. I would prefer someone in the US simply so that I can communicate during daytime hours for both of us. MSN chat needed.

Bear