D
D
Dmitry2015-11-09 00:32:02
JavaScript
Dmitry, 2015-11-09 00:32:02

Is it possible to make edits on AJAX, having access only to the layout?

Hello!

On freelance, the customer asked me to make the following changes in his online store. And he demands to do everything with only the layout on hand, refusing to give access to the real site, or at least a test version.

1. You need to make a promo code activation script via AJAX. When applied, the cost is reduced by the amount of the discount.
Using GET, the following data should be sent to a specific address:
coupon_code: taken from input;
remove: 0 or 1 (0 - apply the coupon, 1 - do not apply).
If a coupon is applied, the response should be:
freetexthost.com/r2p4uvadww

2. On the product page, when you click "Add to cart", the product appears in the drop-down list of the cart (there is a special button) only after the page is refreshed. It needs to happen without a reboot.

Tell me, is it really possible to do this, having access only to layout with HTML/CSS/jQuery? Do I need to know any other requests / responses from the server (especially in the second case) in order to complete this task? Or is this information sufficient?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
W
wellgo, 2015-11-09
@wellgo

It’s real, but this is a crutch for a corn :)
The second case is submit-tite the form (there is probably a form, since the page is being updated) of adding a product via ajax, copy the layout of the product added to the cart and add it via JS upon successful submission of the form (the header in response should come with status:200).
The first case - you have all the data for the implementation.

A
Alexey Tsarapkin, 2015-11-09
@Dreamka

The most important rule in freelancing - If the customer starts to make your brain from the very beginning, then it is better to look for another customer. Otherwise, you will spend more nerves, time and other resources than you will be paid, if at all.

A
Anton B, 2015-11-09
@bigton

Perhaps the customer does not give access to the backend, because no changes need to be made there, that is, you need to work with what is. Therefore, you really do not need access to the project. Just programming you in the same chrome will connect your JS and CSS to solve the customer's problem.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question