Adding additional data in Page List (re-post)
Permalink
Hello all,
I am developing a website which uses a PayPal Add-on to manage online purchases. In the Paypal block, the user enters all of the information about the product, and each Paypal product block lives on its own page.
I created a Page List to display all of the products under their parent page, and I want to get certain variable data (such as price and description) directly from the Paypal data on that page. I understand how to program Custom Attribute data into the Page List template, but this data seems to be hard coded, and is not using Concrete5 Attributes.
Is there a way to pull variable data from the page? Although I can read a bit of PHP, it is not my strong suit. I tried contacting the developer a few weeks ago, but haven't received a reply.
Thank you! I would appreciate any help I can get.
Craig
I am developing a website which uses a PayPal Add-on to manage online purchases. In the Paypal block, the user enters all of the information about the product, and each Paypal product block lives on its own page.
I created a Page List to display all of the products under their parent page, and I want to get certain variable data (such as price and description) directly from the Paypal data on that page. I understand how to program Custom Attribute data into the Page List template, but this data seems to be hard coded, and is not using Concrete5 Attributes.
Is there a way to pull variable data from the page? Although I can read a bit of PHP, it is not my strong suit. I tried contacting the developer a few weeks ago, but haven't received a reply.
Thank you! I would appreciate any help I can get.
Craig
mnakalay,
Thank you so much for the link to the Community Store! I wish I had seen that option a year ago, while I was building another storefront site with a different add-on. It took me only one day to install CS, figure out the interface, and replace my old store entirely! It has most every option imaginable, the interface and workflow is clean and intuitive, and I love the ability to add custom attributes. This is a great addition to Concrete5, and I look plan to use it every time I need a shopping solution.
Cheers!
Craig
Thank you so much for the link to the Community Store! I wish I had seen that option a year ago, while I was building another storefront site with a different add-on. It took me only one day to install CS, figure out the interface, and replace my old store entirely! It has most every option imaginable, the interface and workflow is clean and intuitive, and I love the ability to add custom attributes. This is a great addition to Concrete5, and I look plan to use it every time I need a shopping solution.
Cheers!
Craig
You are very welcome. I'll make sure to let mesuva know about your kind words. He's the developer behind CS and he puts a lot of effort and goodwill into it.
Please do!
One issue I am experiencing... everything is great with the PayPal gateway, but when I try to add the Authorize.net or the Stripe Add-on, I get an error when installing. I have installed Composer in the Authorize.net folder and in the Community Store folder, but neither has helped with the issue.
I am getting this error:
and it is calling out this code:
Any ideas? I don't need Authorize.net for this project, but I know I will need it in the future.
Thanks again for all your help,
Craig
One issue I am experiencing... everything is great with the PayPal gateway, but when I try to add the Authorize.net or the Stripe Add-on, I get an error when installing. I have installed Composer in the Authorize.net folder and in the Community Store folder, but neither has helped with the issue.
I am getting this error:
Call to a member function getPackageHandle() on null
and it is calling out this code:
protected function setMethodController() { $th = Application::getFacadeApplication()->make("helper/text"); $namespace = "Concrete\\Package\\" . $th->camelcase(Package::getByID($this->pkgID)->getPackageHandle()) . "\\Src\\CommunityStore\\Payment\\Methods\\" . $th->camelcase($this->pmHandle); $className = $th->camelcase($this->pmHandle) . "PaymentMethod"; $namespace = $namespace . '\\' . $className; $this->methodController = new $namespace(); }
Any ideas? I don't need Authorize.net for this project, but I know I will need it in the future.
Thanks again for all your help,
Craig
You'd probably get a quicker response from those repositories on github, especially since the title doesn't even contain community store. Both can be found here:
https://github.com/concrete5-community-store...
Please post back here when you find a solution ;)
https://github.com/concrete5-community-store...
Please post back here when you find a solution ;)
Make sure you download a release version 'from the release tab) and not directly the development code.
With the release, you will have all the composer dependencies already included.
With the release, you will have all the composer dependencies already included.
That did the trick! Once again, a thousand thanks, mnakalay!
as you said it yourself the data is in the block. It's not hardcoded.
To do what you want you'd have to do the following for each page in the page list:
1- grab all blocks from that page in a specific Area (I assume the Paypal block always goes in the same Area)
2- filter the blocks to keep only the one with the PayPal block type handle
3- get the data you need from that block
4-- rinse and repeat for each page.
As you can see it's not trivial if you don't know PHP.
Have you considered using a proper e-commerce solution that will do all that out of the box?
Community Store is awesome AND free and will simplify your life greatly.
You can find it here:https://github.com/concrete5-community-store/community_store/release...