/    Sign up×
Community /Pin to ProfileBookmark

Help to find area in code for specific function

Hi,

I have a Calendar for a web page which works out payments and frequency of payments, last payment date etc., then finally shows a date 2 days after the last payment as a delivery date.

I want to change this to 14 days but can’t find where in the script this would be.

I have attached a cart.tpl text file which I think is the code which works it [ATTACH]16189[/ATTACH]out. I also attach an image of what I mean.

Thanks in anticipation.

oz

[canned-message]attachments-removed-during-migration[/canned-message]

to post a comment
JavaScript

6 Comments(s)

Copy linkTweet thisAlerts:
@omnicityJul 03.2014 — I may be wrong, but line 128 seems to be pulling that in through an AJAX call to your server...
Copy linkTweet thisAlerts:
@ozstarauthorJul 04.2014 — I may be wrong, but line 128 seems to be pulling that in through an AJAX call to your server...[/QUOTE]


Thank you, I'll take a look at that route..
Copy linkTweet thisAlerts:
@deathshadowJul 04.2014 — omnicity has it right, it's being pulled via AJAX -- specifically from this file:

index.php?route=laybuy/laybuy

So that's what you need to track down.

Side note though, that's a poster child for everything wrong with opening and closing PHP tags for NOTHING.

Take just this train wreck in the head:
<?php echo $header; ?>
<?php if ($attention) { ?>
<div class="attention"><?php echo $attention; ?><img src="catalog/view/theme/default/image/close.png" alt="" class="close" /></div>
<?php } ?>
<?php if ($success) { ?>
<div class="success"><?php echo $success; ?><img src="catalog/view/theme/default/image/close.png" alt="" class="close" /></div>
<?php } ?>
<?php if ($error_warning) { ?>
<div class="warning"><?php echo $error_warning; ?><img src="catalog/view/theme/default/image/close.png" alt="" class="close" /></div>
<?php } ?>
<?php echo $column_left; ?><?php echo $column_right; ?>
<?php echo $column_left; ?><?php echo $column_right; ?>
<div id="content"><?php echo $content_top; ?>
<div class="breadcrumb">
<?php foreach ($breadcrumbs as $breadcrumb) { ?>
<?php echo $breadcrumb['separator']; ?><a href="<?php echo $breadcrumb['href']; ?>"><?php echo $breadcrumb['text']; ?></a>
<?php } ?>
</div>


Mein gott... There is NO reason for that to be more than:

<?php
echo $header;

<i> </i>if ($attention) echo '
<i> </i> &lt;div class="attention"&gt;
<i> </i> ', $attention, '
<i> </i> &lt;img src="catalog/view/theme/default/image/close.png" alt="" class="close" /&gt;
<i> </i> &lt;/div&gt;';

<i> </i>if ($success) echo '
<i> </i> &lt;div class="success"&gt;
<i> </i> ', $success, '
<i> </i> &lt;img src="catalog/view/theme/default/image/close.png" alt="" class="close" /&gt;
<i> </i> &lt;/div&gt;';

<i> </i>if ($error_warning) echo '
<i> </i> &lt;div class="warning"&gt;
<i> </i> ', $error_warning, '
<i> </i> &lt;img src="catalog/view/theme/default/image/close.png" alt="" class="close" /&gt;
<i> </i> &lt;/div&gt;';

<i> </i>echo $column_left, $column_right, '
<i> </i> &lt;div id="content"&gt;
<i> </i> ', $content_top, '
<i> </i> &lt;div class="breadcrumb"&gt;';

<i> </i>foreach ($breadcrumbs as $breadcrumb) echo
<i> </i> $breadcrumb['separator'],
<i> </i> '&lt;a href="', $breadcrumb['href'], '"&gt;
<i> </i> ', $breadcrumb['text'], '
<i> </i> &lt;/a&gt;';

<i> </i>echo '
<i> </i> &lt;/div&gt;';
?&gt;


[i]NOT that I'd have massive content blocks stored in global strings... memory footprint of that must be a nightmare.[/i]

I see people use PHP that way, and don't understand why they make things so much more difficult for no reason... but then there's a reason I think the PHP 'tags' of <?php <?= <? and ?> should be removed from the language.
Copy linkTweet thisAlerts:
@rootJul 04.2014 — The cart script appears to be incomplete as there are variables that are used yet not defined.

As for the query made by the OP, see previous comment about AJAX

IMHO you might want to ask in the JavaScript Frameworks firm because the cart is reliant on JQuery which is a framework and not JavaScript.
Copy linkTweet thisAlerts:
@deathshadowJul 04.2014 — IMHO you might want to ask in the JavaScript Frameworks firm because the cart is reliant on JQuery which is a framework and not JavaScript.[/QUOTE]
Might be better off in general programming -- it's got flat .js, jQuerytardery, AND server-side code in the form of PHP on this one.

... and in this case the value is coming from his index.php, so it's not a jQuery issue, or a JS issue, it's a PHP issue!

Really getting on people's cases about that is kinda strange in this day and age, the various technologies are so reliant on each-other what starts out in one language quickly leads to another.
Copy linkTweet thisAlerts:
@rootJul 04.2014 — Its a bit of everything but on the surface its a JQuery AJAX call that is retrieving the data.
×

Success!

Help @ozstar spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.17,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...