solved Combined Sales Page on Profiles

Ken Rich
Ken Rich
@ken-rich
8 years ago
926 posts
I brought this up before and someone closed it.

Brian suggested this can be done with a Foxycart list call, Paul suggested using the seamless module.

In any case, I find that my clients would rather promote other sales sites because they list all their items on one page, rather than spread out over several tabs.

I've even got a client who is award winning in sales saying there should be one page his fans can go to to see all his saleable items, whether downloads, physical items, services. He is still waiting for me to implement.

The trouble is, I have no idea how.

1) Can this be done?
2) What is the best approach - FC list call or seamless?
3) Is someone good at coding willing to try this?


--

Ken Rich
indiegospel.net

updated by @ken-rich: 07/03/16 02:55:28PM
michael
@michael
8 years ago
7,717 posts
1.) yes
2.) There is no "best" either of the two approaches will work. either approach could be implemented via code ( jrCore_list | jrSeamless_list ) or via site builder.

--edit--
Ah, you're wanting it on a profile as a tab, then you'll need a simple module and put code in the item_index.tpl file for the module.
updated by @michael: 01/28/16 06:17:12PM
Ken Rich
Ken Rich
@ken-rich
8 years ago
926 posts
Hi Michael,

Yes - I was about to say I didn't think the site builder worked in profiles yet.

I'm needing it in profiles as a tab with it's own URL. The way of organizing it all separately the way it is now can stay (it's useful), but I need a "combined" sales page that has it all under one roof for marketing purposes.

It can have partial lists that link to more items (for profiles that have many items).

I have never built a module and wouldn't know where to start.


--

Ken Rich
indiegospel.net
michael
@michael
8 years ago
7,717 posts
Here's an idea:
Use the Aparana module to create a new module. This will give you a tab on the profiles that you're after.

Then alter the item_index.tpl file and put whatever code you like in there, probably:
{jrCore_list module="jrFoxyCart" search1="_profile_id = `$_profile_id`"}

updated by @michael: 01/29/16 05:33:22PM
Ken Rich
Ken Rich
@ken-rich
8 years ago
926 posts
Hi Michael,

Thanks, I'll try that when I can carve out some time.


--

Ken Rich
indiegospel.net
Ken Rich
Ken Rich
@ken-rich
8 years ago
926 posts
I finally carved out some time for this. I created the module and so far I've got products to list with this code.

 {* If the Profile has products they will show here*}
 <div class="block_content">
        <div id="default_list">
            {jrCore_list module="jrStore" profile_id=$_profile_id order_by="product_display_order numerical_asc" pagebreak="2" page=$_post.p pager=true}
        </div>
    </div> 

I'm pretty sure I can get bundles, services, and songs to list too by grabbing the list codes from their respective item indexes. Not sure about layout issues yet.

On the top of the page, I would like an editable space like the Profile Index has. I am not having much success with that.

In the form designer, I created a new category sales_editor in both the create and modify view. It provides the editor function and verification is string with allowed HTML.

In the Sales item_index I put this code I copied and modified from the profile_Index template.

 {* If the Profile creates content with the editor it will show here *}
        {if strlen($sales_editor) > 1}
        <div class="row">
            <div class="col12 last">
                <div class="block">
                    <div class="block_content">
                        <div class="item" style="margin-top:0">
                            {$sales_editor|jrCore_format_string:$profile_quota_id}
                        </div>
                    </div>
                </div>
            </div>
        </div>
        {/if}

To test, I tried to embed a bundle but I got what you see in the attached screenshot. So at this point, I'm at a loss as to how to proceed.
sales.JPG.jpg
sales.JPG.jpg  •  37KB




--

Ken Rich
indiegospel.net
Ken Rich
Ken Rich
@ken-rich
8 years ago
926 posts
Also, I'm pretty sure I did the code blocks above as singles - not sure why it doubled up???


--

Ken Rich
indiegospel.net
paul
@paul
8 years ago
4,326 posts
Ken Rich:
Also, I'm pretty sure I did the code blocks above as singles - not sure why it doubled up???

Sorry, a bug has crept in - we'll fix it up asap


--
Paul Asher - JR Developer and System Import Specialist
brian
@brian
8 years ago
10,148 posts
The "double code" bug has been fixed...


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
Ken Rich
Ken Rich
@ken-rich
8 years ago
926 posts
I managed to list four different sales categories but I have two problems with my combined sales page.

1) I don't know how to do one global pager=true so I have to do pager=true for each section which looks weird especially if more than one category is past its page break.

2) I want the editor to edit the space on top of the sales page the way the profile builder edits the top space of the profile index page. Currently, the editor I put in the form makes a list of entries instead. When the title is clicked for each created item, the view which appears has issues. Like not rendering codes, and displaying things I don't want showing (see attached).

This is the code I'm using in item_index.tpl


{jrCore_module_url module="xxSales" assign="murl"}

<div class="block">

    <div class="title">
        <div class="block_config">
            {jrCore_item_index_buttons module="xxSales" profile_id=$_profile_id}
        </div>
        <h1>{jrCore_lang module="xxSales" id="10" default="Sales"}</h1>
        <div class="breadcrumbs">
            <a href="{$jamroom_url}/{$profile_url}">{$profile_name}</a> ยป <a href="{$jamroom_url}/{$profile_url}/{$murl}">{jrCore_lang module="xxSales" id="10" default="Sales"}</a>
        </div>
    </div>
    <div class="block_content">

{jrCore_list module="xxSales" profile_id=$_profile_id order_by="_created desc" pagebreak="1" page=$_post.p pager=true}

</div>

  <div class="block_content">

        <div id="default_list">
            {jrCore_list module="jrStore" profile_id=$_profile_id order_by="product_display_order numerical_asc" pagebreak="1" page=$_post.p pager=true}
        </div>

    </div>
    
    
        <div class="block_content">

        <div id="service" >
            {jrCore_list module="jrServiceShop" profile_id=$_profile_id order_by="service_display_order numerical_asc" pagebreak=1 page=$_post.p pager=true}
        </div>
    
 <div class="block_content">

        {jrCore_list module="jrFoxyCartBundle" profile_id=$_profile_id order_by="bundle_display_order numerical_asc" pagebreak="1" page=$_post.p pager=true}

    </div>

 <div class="block_content">

        {jrCore_list module="jrAudio" profile_id=$_profile_id order_by="audio_display_order numerical_asc" pagebreak="4" page=$_post.p pager=true}

    </div>

    </div> 

I can see that this below is the section displaying the list of editor created entries but I don't know what to change it to if I want the editor to control the space on top of the page like the profile builder does to the profile index.

     <div class="block_content">
{jrCore_list module="xxSales" profile_id=$_profile_id order_by="_created desc" pagebreak="1" page=$_post.p pager=true}

</div> 

I can also see by trial and error that the item_detail.tpl has to do with some of the gobble-de-goop that displays from the editor, but how to rectify is beyond me.

Any ideas??? Anyone???
702.JPG.jpg
702.JPG.jpg  •  37KB




--

Ken Rich
indiegospel.net

updated by @ken-rich: 03/22/16 06:49:06PM
Ken Rich
Ken Rich
@ken-rich
8 years ago
926 posts
By trial and error I've gotten closer.

However, I can't figure out why enbedded codes won't render.

For example -
[jrEmbed module="jrAudio" id="1063"]
will not show the player, it will show the code.

This was occurring when the templates were at default so I don't believe it is due to my modifications.

item_list.tpl has been changed to:

{jrCore_module_url module="xxSales" assign="murl"}
{if isset($_items)}
    {foreach from=$_items item="item"}
        <div class="item">

            <div class="block_config">
              {jrCore_item_list_buttons module="xxSales" item=$item}
              
            </div>
{$item.sales_editor}
            
            <br>
        </div>

    {/foreach}
{/if}



item_detail.tpl has ben changed to:

{jrCore_module_url module="xxSales" assign="murl"}

             
                        <div class="container">
  
                           {if strlen($item.sales_editor) > 0}
     {$item.sales_editor}
{/if}
                      
                </div>



--

Ken Rich
indiegospel.net
Ken Rich
Ken Rich
@ken-rich
8 years ago
926 posts
Had to write it like this was the solution.
{$item.sales_editor|jrCore_format_string:$item.profile_quota_id}

I have another question but I'll start a new thread to avoid confusion.


--

Ken Rich
indiegospel.net
michael
@michael
8 years ago
7,717 posts
perfect :)! nice job.