View Full Version : Shop plugin
JBJBJB
12-13-2005, 08:13 PM
Hello folks,
I am still working on the shop plugin I wrote about earlier but also I'm still making no progress since I lack some support to make the final things working. I would like to get in touch with the developers of the CMS itself since I would like to get to know how Subdreamer renders the plugins. Of course I can start reading the sourcecode but I prefer a little more high-level explanation.
Please contact me or reply with an email address so we can work it out and I can finish the plugin,
For more information about the plugin and what I'm trying to achieve, please read my previous postings.
Thanks in advance,
Jeroen
abcohen
12-13-2005, 08:59 PM
what kindof information do you need?
JBJBJB
12-14-2005, 05:03 PM
<div class='quotetop'>QUOTE(abcohen @ Dec 13 2005, 10:59 PM) 2444</div>
what kindof information do you need?
[/b]
Thanks for answering, I would like to have more information on how Subdreamer renders the plugins. It's clear that it is a loop that inserts the plugins that are assigned to each position. However, I have a sample category with a main area (3 plugins) and a side area (7 plugins) (the default Subdream theme).
My focus is on the main area, in which I add three plugins:
- My Shop Engine plugin
- The standard Contact Form plugin
- My Shop Content plugin
Besides these, all other 7 positions in the side area also contain a plugin.
The problem is that in some cases, the Shop Engine fully renders properly, but the other two plugins do not appear. They are not rendered at all, not even if they only contain a comment without any PHP code.
In all cases, the plugins in the side area are always rendered properly.
It looks to me that the code breaks out of the loop that renders the main area, just after rendering the Shop Content. However, all other things go well after that.
I would like to know how this is possible. I already enabled all errors but I do not see any errors (but I do see three notices:
Notice: Use of undefined constant USERIP - assumed 'USERIP' in /public_html/includes/usersystems/subdreamer.php on line 40
Notice: Use of undefined constant USERAGENT - assumed 'USERAGENT' in /public_html/includes/usersystems/subdreamer.php on line 41
Notice: Use of undefined constant COOKIE_PREFIX - assumed 'COOKIE_PREFIX' in /public_html/includes/usersystems/subdreamer.php on line 44
Notice: Undefined variable: userip in /public_html/includes/usersystems/subdreamer.php on line 64
Notice: Use of undefined constant lastactivity - assumed 'lastactivity' in /public_html/includes/usersystems/subdreamer.php on line 94
But they do not affect my problem since they already existed and most other shop stuff work properly.
I hope you can help me with more information on how this works or where to start looking for the loop I mentioned, and how it can stop working for one area only.
Thanks in advance,
Jeroen
Terminator1138
12-14-2005, 09:24 PM
Whoever gets this done first might make some good cash with it...i know rvdam is making or planning on making a shopping cart also....
It's most likely that your problem is with the code in your shop plugin. Try commenting out the code in your shop plugin and you should find that the other plugins render correctly. Then add your code back in bit by bit to find the area where the problem is
72dpi
12-14-2005, 10:41 PM
This would seriously be a great addition.
If you can add the paypal adddition by spib that would rock......
Really can't wait to hear more about this!
JBJBJB
12-15-2005, 05:57 PM
Thanks for the positive feedback, I'm still working on the last parts but its mostly completed.
I'll start with the suggestion of spib, I already tried the approach he suggested but I can also try this from another side and perhaps that makes it work (the shop consists of several plugins). For as far as PayPall support is concerned, that is already integrated into the shop and supported natively.
I'll try to work this out this weekend and I'll get back on this forum on sunday to tell what happened.
Thanks again for the support,
Jeroen
william
12-15-2005, 10:55 PM
Horray for Jeroen for stepping up... I was excited about rvdarm's but he took his example down and I haven't heard or seen anything for it in a while...All I know is if Jeroen can get it up and it works many of us will be very happy!
72dpi
12-15-2005, 11:22 PM
Too Right William, Jeroen is a champ.
In fact everyone who contributes is.
I run a student photography website in Australia, (for free last 3 years), and I know they would love to sell prints online, as well as merchandise. Subdreamer is the perfect solution, as I use Subdreamer, PHPBB & 4Images, plus I really needed to have a shop of sorts.
I would have loved to setup individual sale accounts for members, but when you are talking about a whole shop with multiple products, that would get quite tricky.
I am VERY excited, will do extensive testing on this one. (if I can afford it =)
mirage459897
12-15-2005, 11:24 PM
I saw it just now at http://demo.rvdam.com/admin/
log into the demo site.
JBJBJB
12-16-2005, 03:19 PM
Hi, I just fixed the thing that bugged me for the last three weeks. The cause of the problem was a very small piece of code in some external part. Disabling that part without did not yet cause any actual loss in functionallity but it does fix my problem, so that's one step further.
And surely, there's a new challenge around the corner: when submitting a form using the POST method, I get the strange effect that the page renders properly but after the last plugin, it start rendering the Shop plugin AGAIN after the last plugin in the rightside plugin column. It's a bit difficult to debug because of the url rewriting by the htaccess file.
Can anyone tell me more about the algoritm that renders the plugins and how a plugin like mine can mess up this logic (and cause it to rerender some parts)? Are there perhaps some variables that I should not use? I'm now (amongst others) using variable names $html and one named $content. I do not define them as global variables, only locally within functions. Is it correct to assume that therefore this cannot interfere with the Subdreamer code?
Thanks in advance,
Jeroen
mirage459897
12-16-2005, 03:27 PM
url re-writing is really only needed for SEO. I don't think you need the search engine crawling through the shoping cart? I am wrong?
abcohen
12-16-2005, 04:28 PM
SEO and shopping carts go hand in hand with small markets or small business circles (I get sales on one site directly from google - cause it spiders the whole shopping cart)
JBJBJB
12-17-2005, 09:15 PM
<div class='quotetop'>QUOTE(abcohen @ Dec 16 2005, 06:28 PM) 2492</div>
SEO and shopping carts go hand in hand with small markets or small business circles (I get sales on one site directly from google - cause it spiders the whole shopping cart)
[/b]
I think SEO is a very desirable thing, especially for a shop. I used htaccess files and url rewriting not just for SEO but as a basic tool to implement the shop with less work. That said, I do not think it will interfere with the SEO support of Subdreamer and the shop does have some support for it as well. After applying the latest changes, I still have to check that SEO still works properly for the shop.
Jeroen
bopheim
01-23-2006, 07:09 AM
Any progress in this?
I started working on a shop plugin as well. I don't have much done, but I can start a new thread with what I have and I can share the files so mabe it can be developed faster.
vBulletin® v3.8.6, Copyright ©2000-2012, Jelsoft Enterprises Ltd.