I am trying to: Create Pagination between Auction Lots (child) of a particular Sale (parent)
Here is a basic workflow:
Visitor comes to the sale view page:
hidden link
Visitor selects an auction Lot they want to see:
hidden link
I expected to see: The Auction Lot details for the above mentioned Auction Lot.
Instead, I got: The first auction Lot in the database, i.e. Lot 1 from the first sale in the db
I am trying to get this view to paginate between the auction lots in the same parent sale.
I am pretty sure that I should be using the query filter to select only auction lots that share a common parent however I am yet to be able to figure out the correct way to do this.
Currently there is no filter selected which is why I am certain that 1) the wrong lot is displaying, i.e. the lot displayed does not correspond to the post title, and 2) all the lots in the database appear, not filtering out only lots that belong to the parent.
The Filter editor is pretty basic at the moment as all I have in the pagination:
[wpv-filter-start hide="false"]
[wpv-pager-prev-page][wpml-string context="wpv-views"]Previous Lot[/wpml-string][/wpv-pager-prev-page]
[wpv-pager-current-page][wpv-pager-nav-dropdown]
[wpv-pager-next-page][wpml-string context="wpv-views"]Next Lot[/wpml-string][/wpv-pager-next-page]
[wpv-filter-end]
The Loop Output section looks like this, but i don't have a problem with it, besides the fact that it is displaying the wrong info:
[wpv-layout-start]
[wpv-items-found]
<!-- wpv-loop-start -->
<wpv-loop>
<div class="Auction Lot Box">
<link rel="stylesheet" href="<em><u>hidden link</u></em>">
<script src="<em><u>hidden link</u></em>"></script>
<script src="<em><u>hidden link</u></em>"></script>
<div class="container">
<div class="row">
<div class="col-sm-8"><h3>[wpv-post-title]</h3></div>
</div>
<div class="row">
<div class="col-sm-4">
<div class="row">[types field="image" size="large" align="centre" resize="pad" padding_color="transparent"][/types]</div>
<div class="row">[wpv-post-body view_template="None"]</div>
[wpv-conditional if="( $(wpcf-write-up) ne '' )"]
<div class="row"><h4>Write Up</h4></div>
<div class="row">[types field="write-up"][/types]</div>
[/wpv-conditional]
</div>
<div class="col-sm-3 col-sm-offset-1">
<div class="row"><h4>Sale Details</h4></div>
<div class="row"><b>Sale Name:</b> [types field="sale-name" id="$sale"][/types]</div>
<div class="row"><b>Location:</b> [types field="location" id="$sale"][/types]</div>
<div class="row"><b>Date:</b> [types field="start-date" id="$sale"][/types] - [types field="end-date" id="$sale"][/types]</div>
<div class="row"><h4>Lot Details</h4></div>
<div class="row"><b>Lot: </b>[types field="lot-number" format="FIELD_VALUE"][/types] <b>Session: </b> [types field="session-number"][/types]</div>
<div class="row"><b>Category:</b> [types field="lot-category"][/types]</div>
<div class="row"><b>Low Estimate:</b> R[types field="low-estimate"][/types]</div>
<div class="row"><b>High Estimate:</b> R[types field="high-estimate"][/types]</div>
[wpv-conditional if="( $(wpcf-dimensions) ne '' )"]
<div class="row"><b>Dimensions:</b> [types field="dimensions"][/types]</div>
[/wpv-conditional]
[wpv-conditional if="( $(wpcf-condition) ne '' )"]
<div class="row"><b>Condition:</b> [types field="condition"][/types]</div>
[/wpv-conditional]
[wpv-conditional if="( '[wpv-post-field name="wpcf-end-date-datetime" id="$sale"]' lt 'TODAY()' )"]
<div class="row"><b>Status:</b> [types field="sold-unsold"][/types] </div>
[/wpv-conditional]
[wpv-conditional if="( $(wpcf-sold-unsold) eq 'sold' )"]
<div class="row"><b>Hammer Price:</b><font color="green"> R[types field="hammer-price" format="FIELD_VALUE"][/types]</font></div>
<div class="row"><b>Hammer Plus:</b><font color="green"> R[types field="hammer-plus" format="FIELD_VALUE"][/types]</font></div>
[/wpv-conditional]
<br>
<div class="row">[addtoany]</div>
[wpv-conditional if="( '[wpv-post-field name="wpcf-end-date-datetime" id="$sale"]' gt 'TODAY()' )"]
<div class="row">
<br><b>Absentee Bid Form: </b><a href='[types field="absentee-bid-form"][/types]'>Download</a>
</div>
<div class="row">
<b>Condition Report:</b> [expand title="Click Here"][contact-form-7 id="35935" title="condition report"][/expand]
</div>
[/wpv-conditional]
</div>
</div>
</div>
</div>
</wpv-loop>
<!-- wpv-loop-end -->
[/wpv-items-found]
[wpv-no-items-found]
<strong>[wpml-string context="wpv-views"] No lots have been added to this sale [/wpml-string]</strong>
[/wpv-no-items-found]
[wpv-layout-end]
I look forward to some advice an guidance for my problem.
Kind Regards.
Josh