Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#91 2007-04-25 19:31:50
- WhiteDog
- Member

- From: Maine
- Registered: 2005-09-07
- Posts: 174
Re: Thinking about building an e-commerce plugin...
rr wrote:
Anybody got an example of a form for product info display?
This is what I threw together
<h3><txp:permlink><txp:title /></txp:permlink> · <txp:posted /></h3> <txp:body />
<p>Price: <txp:custom_field name=“price” /></p>
<p>Weight: <txp:custom_field name=“weight” /></p>
<p>Vendor: <txp:custom_field name=“vendor” /></p>
<p>SKU: <txp:custom_field name=“sku” /></p>
<p>Stock: <txp:custom_field name=“stock” /></p>
<txp:article_image />
<div><img src=”<txp:site_url />images/1.gif” width=“400” height=“1” class=“divider” alt=”—-” title=”“ /></div>
On an added note i have been able to turn messy urls off now
Last edited by WhiteDog (2007-04-25 19:32:22)
Grrr RRR nnndth grrr Skeek!
Offline
#92 2007-04-25 20:22:08
- -rr-
- Member
- Registered: 2005-09-11
- Posts: 73
Re: Thinking about building an e-commerce plugin...
How do you show the actual custom field data? I created the custom fields in the store/product view and entered some values, but they don’t show up.
I would suppose this whole custom field step is unnecessary since the price/weight etc. info are entered in the product form already. We need to know what functions to use to call them up.
Last edited by -rr- (2007-04-25 20:22:26)
Offline
Re: Thinking about building an e-commerce plugin...
Good morning, everyone. I’ll try to answer all the questions as best I can.
I downloaded the patched install of TxP – which installed fine – now I just need a couple of pointers to work out how to start playing with it.
On a standard install of the patched version, the ‘Store’ tab just gives me a 404, and I don’t see any other hints for operation…
This is really odd. I don’t think it should never give you a 404 error. At worst TXP just won’t recognize the action and give you a blank screen with the logo at the bottom. The correct url should be: <code>http://yoursite.com/textpattern/index.php?event=store</code>. Is that the URL that’s giving you the 404?
I just found out about this and did a clean test install. After creating a few products, clicking on the product link gives me “404 Not Found, Unknown section”. Normal articles work ok.
This is my bad. I should’ve mentioned this. As WhiteDog has already figured out articles are by default created with the section ‘store’. Even if the section doesn’t exist. (I need update the installer script so it creates that section.) To fix this error for now, just create a section called “store”.
from my understanding Levi only developed the admin part of the plugin and all the other things are yet to be implemented…
Sven is right. Sorry to get everyone’s hopes up. The store is not complete. I still need to build the following items before it can be called a complete solution:
- A PayPal checkout system
- A shopping cart
- Product display tags
In the meantime WhiteDog has posted a great cheatsheet on how to access the product variables:
<h3><txp:permlink><txp:title /></txp:permlink> · <txp:posted /></h3> <txp:body />
<p>Price: <txp:custom_field name=“price” /></p>
<p>Weight: <txp:custom_field name=“weight” /></p>
<p>Vendor: <txp:custom_field name=“vendor” /></p>
<p>SKU: <txp:custom_field name=“sku” /></p>
<p>Stock: <txp:custom_field name=“stock” /></p>
<txp:article_image />
<div><img src=”<txp:site_url />images/1.gif” width=“400” height=“1” class=“divider” alt=”—-” title=”“ /></div>
Thanks, WhiteDog!
How do you show the actual custom field data? I created the custom fields in the store/product view and entered some values, but they don’t show up.
Right now custom fields are stored in their own table so the product doesn’t have to limit their number. That means that there’s no tag for them yet. :-( Soon though!
~ Levi ———————————-
- TextCommerce is being developed
- My Portfolio
Offline
#94 2007-04-25 20:32:41
- WhiteDog
- Member

- From: Maine
- Registered: 2005-09-07
- Posts: 174
Re: Thinking about building an e-commerce plugin...
I assumed the data was in it too, but for now in the admin under advanced preferences you need to add the custom fields price, sku, weight etc…
Then once you do that in a form add the above data I listed and it will show the form info. When the plug-in is finished i am sure this will all be uneccesary
Grrr RRR nnndth grrr Skeek!
Offline
Re: Thinking about building an e-commerce plugin...
a_band wrote:
I downloaded the patched install of TxP – which installed fine – now I just need a couple of pointers to work out how to start playing with it.
On a standard install of the patched version, the ‘Store’ tab just gives me a 404, and I don’t see any other hints for operation…
This is really odd. I don’t think it should never give you a 404 error. At worst TXP just won’t recognize the action and give you a blank screen with the logo at the bottom. The correct url should be: <code>http://yoursite.com/textpattern/index.php?event=store</code>. Is that the URL that’s giving you the 404?
Hi Levi,
Yep that’s the URL being displayed, and this is a screenshot of the error…
Thanks for any help…
Offline
#96 2007-04-25 21:34:53
- -rr-
- Member
- Registered: 2005-09-11
- Posts: 73
Re: Thinking about building an e-commerce plugin...
Any estimate in what time table there might be something complete to try out?
a_band wrote:
Sorry to get everyone’s hopes up. The store is not complete. I still need to build the following items before it can be called a complete solution:
- A PayPal checkout system
- A shopping cart
- Product display tags
Offline
Re: Thinking about building an e-commerce plugin...
Neil: Thanks for the screenshot. Can you verify that the plugin is installed and turned on in your admin screen?
Everyone: To make life easier for you, I’ve just released a plugin containing product display tags Enjoy!
~ Levi ———————————-
- TextCommerce is being developed
- My Portfolio
Offline
Re: Thinking about building an e-commerce plugin...
Nope. No plugin installed or activated Levi.
In fact, I had thought of that, and tried downloading the plugin and installing it, but got the error ‘malformed or corrupt’ plugin.
Am I guessing right that something is amiss with the install… ;-)
Offline
#99 2007-04-26 12:49:34
- -rr-
- Member
- Registered: 2005-09-11
- Posts: 73
Re: Thinking about building an e-commerce plugin...
The product display tags work great. Only problem is that the currency symbol does not show correctly. It’s a missing “;” character somewhere probably?
&euro12.00
Offline
#100 2007-04-26 13:12:49
- -rr-
- Member
- Registered: 2005-09-11
- Posts: 73
Re: Thinking about building an e-commerce plugin...
The admin products list desperately needs a function to change multiple items’ categories/status instead of one by one.
Offline
#101 2007-04-26 13:36:55
- -rr-
- Member
- Registered: 2005-09-11
- Posts: 73
Re: Thinking about building an e-commerce plugin...
Also importing csv files creates problems when the content data contains commas (like sentences do). Could it also allow import of tab delimited text files instead of csv?
Offline
#102 2007-04-26 17:15:50
Re: Thinking about building an e-commerce plugin...
rr: I’ll be adding your comments to the issues list.
~ Levi ———————————-
- TextCommerce is being developed
- My Portfolio
Offline
#103 2007-04-26 17:32:28
- -rr-
- Member
- Registered: 2005-09-11
- Posts: 73
Re: Thinking about building an e-commerce plugin...
I’ve had trouble importing csv-files. I’m only able to get the first product item in. For some reason it ignores the rest. For the life of me, I can’t figure out what’s wrong with the csv-file. I’ve removed all extra commas, made sure the column counts are the same for every product, utf-8 and unix line feeds. I don’t get it. Same happens with the example csv-file.
Additional ideas:
A possibility to export the product list as a tab delimited text file would be really good. In general, it would be really good to be able to manage everything in the product database through the admin interface, or otherwise export the database for editing and re-importing. Otherwise the management of stock counts etc. might become a nightmare soon as there are more than a few products.
Last edited by -rr- (2007-04-26 18:21:10)
Offline
#104 2007-04-26 22:09:20
- -rr-
- Member
- Registered: 2005-09-11
- Posts: 73
Re: Thinking about building an e-commerce plugin...
Just a few more issues I noticed:
- Vendors show up as categories with txp:categorylist, so better not use them unless you limit what categories txp:categorylist shows
- Can’t delete vendors in the admin, except by going through the database (phpmyadmin etc.)
- Categories don’t show in product edit view, but you can set them in the article view. Editing product descriptions afterwards will delete category setting so you’ll have to reset it in article view.
- Can’t link to existing image and can’t upload (but that’s maybe just my 777-settings)
- Some way of sorting the product listing would be nice
Having looked at a couple of other ecommerce solutions (e.g. zen-cart), this looks like it’s going to be a fantastic plugin compared to the others’ visual chaos. Levi is right. Textpattern is and excellent platform for this. I can’t wait to see it complete!
I’m ready to help to make things happen faster if there’s anything I can do to help out. Unfortunately that’s mainly in graphics and layout, no php for me…Last edited by -rr- (2007-04-27 01:01:55)
Offline
#105 2007-04-27 00:36:30
Re: Thinking about building an e-commerce plugin...
Levi,
Not sure what’s going on here, but I blew away the customised version TxP, installed a fresh new copy (including a new db), and I still can’t install the alpha admin plugin from your site. “Badly formed or empty plugin code.” is the error.
Obviously, others are managing this OK, so do you have any suggestions?
Thanks
Additional thought: Is there a max size for plugins? Is it influenced by admin > prefs? Or host settings?
I can install other plugins, but not the admin one for this…
Last edited by NeilA (2007-04-27 08:44:45)
Offline